💾 Archived View for dctrud.randomroad.net › gemlog › 20200724-fedora-imac.gmi captured on 2020-09-24 at 00:44:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
I recently wrote about all the computers I have, and they have been shuffled around a bit again within a week! My Ryzen desktop, which was my main personal Linux machine, has become a family Windows PC so I have our family iMac now. We have been setting up ready for at-home schooling (due to COVID) to start soon, and some of the resources used at the end of last year were a bit flaky on the Mac. Don't want to mess with that, and my son was also keen to play Minecraft Bedrock multiplayer, so computer musical chairs took place.
The iMac is an 18,3 (mid-2017) model. It's the bottom 27" spec of that vintage with a lovely 5K screen, half decent quad core i5-7500, 4GB AMD GPU, and has been upgraded to 24GB of RAM. I set about putting Linux on it, as that's what I prefer to use.
The weak link on the iMac is the storage. It has a 1TB fusion-drive, which is Apple's small NVMe + HDD combination. That works surprisingly well under macOS, but the NVMe drive is too small to use as a root drive for Linux and I don't want to muck around with bcache or dm-cache right now. Luckily I have a 1TB USB-C SSD, and it's straightforward to install Linux onto that and boot off of it. Also means I have MacOS for any firmware updates etc.
Fedora 32 installed without issue, other than the graphical installer is a bit on the small side due to the HiDPI screen. The iMac has a 5K screen, but under Linux you can only get a 4K resolution on it. Doing the sums that gives a pixel density of 163dpi. Setting the scaling in KDE, or with xrandr and in .Xresources for i3, worked fine. Though it's not at the native resolution things look very very nice, even compared to the pretty decent Dell UltraSharp 2560x1440 monitor I had on the Ryzen desktop.
There are just a small number of things that don't work properly under Fedora on the iMac hardware. With modern MacBooks things are a lot worse but it's manageable on this desktop machine from 3 years ago:
The onboard speakers and headphone jack are seen, and you can choose them in PulseAudio mixer controls, but there is no sound out. This is a problem common to Linux on recent-ish iMacs and MacBooks. I have a USB audio interface which works fine, so it's not a big deal. Apparently if you drove a second monitor from the iMac you could get the audio out via the Thunderbolt->HDMI too.
Suspend does happen, and the machine will wake back up but with I/O errors to the USB SSD. I'm not clear whether this is a limitation of having the install on a USB SSD in this case, or a general USB suspend/resume issue on the hardware. Either way it's not a big deal. This is a machine that's in the home office and I tend to sit down, turn it on, and switch it off when I'm done. It won't sit on for hours unused.
The cooling issue is slightly more involved. The fan does run, and does cool the system, but only ramps up when things seem to be getting very hot. To address that was a case of using mbpfan from the Fedora repos:
$ sudo dnf install mbpfan $ sudo systemctl enable --now mbpfan
Much better by default, but still a bit on the hot side. The defaults are for laptop systems, so I changed them in /etc/mbpfan.conf to:
min_fan1_speed = 1200 # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min" max_fan1_speed = 2700 # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max" low_temp = 60 # try ranges 55-63, default is 63 high_temp = 65 # try ranges 58-66, default is 66 max_temp = 80 # take highest number returned by "cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max", divide by 1000
Those fan speeds and max_temp are read out of /sys per the instructions. The 60 and 65 low/high temps seem to roughly match what I was used to the system doing when running hefty stuff under macOS.
The iMac is definitely a bit slower Linux system than the Ryzen desktop I was using, but I think the screen at 4K makes it quite a bit more enjoyable to use. Particularly in i3 when looking at lots of terminal windows of text-mode programs, things are so clear and crisp. I think I'll be able to more than survive using Linux on this iMac, and I've stuck a tux sticker over the Apple logo for good measure :-) Doesn't change that we don't plan to buy any more Apple hardware (due to the cost and poor repairability), but I have decided I like HiDPI monitors for a Linux desktop now.