I was given some used iMacs 21.5″ and 27″ roughly 4 years respectively 9 years old, and
- iMac 27″ Mid 2011 was no longer booting properly with macOS X, and even reinstalling the OS again did not resolve it, either motherboard or graphics card or perhaps faulty hard disk might be the problem, instead I tried Ubuntu on USB stick and it booted with “safe graphics” setting on – and so I also installed it on that one.
- iMac 21.5″ Late 2015 was deadly slow with macOS X, and once I tried Ubuntu 20.04 on USB stick, it booted faster and was overall more responsive with the same hardware – the decision was made quickly to ditch macOS X and replace it with Ubuntu/Linux
This post is merely my notes to retrace my steps to get both working more or less:
iMac 27″ Mid 2011 & Ubuntu 20.04 LTS
- Boot with USB stick with “Ubuntu 20.04 LTS”
- Push down ALT Key while screen is white
- Select most right icon with [Boot EFI] (boots with USB Stick)
- Boots into GRUB, select “Ubuntu Safe Graphics” (2nd entry) with [CURSOR DOWN] and [RETURN] keys
then either [Try Ubuntu] or [Install Ubuntu].
In case you install Ubuntu, once finished with all, reboot with USB stick connected, and repeat steps 1-4 but then continue like this:
- You logged in with your credentials, and desktop appears
- Hit [COMMAND] key, and enter ‘term’ and click on “Terminal”
- Enter
sudo su
thanks to Ask Ubuntu: How can I reinstall GRUB to the EFI partition? – to the shell direct as root:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run
do mount -B $i /mnt$i
done
chroot /mnt
at this point edit /etc/default/grub with vi or vim and edit one line, add nomodeset:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
exit the editor, and continue on the shell:
update-grub
exit
reboot
Backlight Control
Unfortunately with nomodeset the backlight control no longer works, and so the screen is very bright, and also heats up the entire case for over a period of 1-2 hours.
Final Solution: Baking Graphics Card
After a few days testing, some vertical green stripes appeared on the screen at any stage the display was on – a strong indication that graphics card was severely broken, and a simple remedy was suggested by various people online: put the graphics card into the oven at 200C for 8 mins in order to resolder all connections – which I did. And the graphics card started to work properly again, no nomodeset required anymore, but acpi_backlight=vendor was required in /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
and so the iMac 27″ became a fine Linux Desktop.

I tried to install macOS Catalina (Version 10.15) but it refused, 9 years old hardware is not longer supported by up-to-date macOS (there is Catalina Patcher but it won’t support the GPU and Big Sur Micropatcher which might help to run macOS on “unsupported” hardware) whereas Ubuntu 20.04 LTS just works with the mentioned fine-tuning. Essentially, any 5+ years old Mac hardware stays usable by installing a current Linux distribution.
Replacing Main HDD with SSD
As it looks like a trivial task but turns out tricky if you don’t know:
- remove old HDD, install new SSD
- reboot and fans start to up and makes significant noise without any CPU load (???)
Cause
Old HDD has a temperature sensor built-in, which the SSD is missing – it tries to compensate a misread or non-existing temperature.
Remedy
Run apt install mbpfan which resolves the issue (macfanctld neither fancontrol with lm-sensors did not resolve the issue) and edit /etc/mbpfan.conf:
min_fan2_speed = 1000 max_fan2_speed = 3000 min_fan3_speed = 1000 max_fan3_speed = 1100
and restart the service sudo /etc/init.d/mbpfan restart
Additionally, in case you sleep/suspend the computer, create /usr/lib/systemd/system-sleep/mbpfan script:
#!/bin/sh
case $1 in
post)
/etc/init.d/mbpfan restart
;;
esac
and chmod +x /usr/lib/systemd/system-sleep/mbpfan as well, and you are good so it kicks in after awake.
iMac 21.5″ Late 2015 & Ubuntu 20.04 LTS
So far all worked but the sound, by using and installing snd_hda_macbookpro github repo, I was able to get the sound working (only two loudness levels: silent and full) – be aware you need to re-install this package everytime the kernel is updated as part of apt upgrade.

That’s it.

















Printable:
