I got myself an iMac from the Ecoshop in Christchurch, it was super cheap ($NZ150) because it had just gone out of support from apple.
Specs:
- Apple Inc. iMac17,1
- 24G RAM
- Intel® Core™ i5-6600 × 4
- 2TB HDD, 121G SSD
- 5K Built in Display (is absolutely lovely)
I put ubuntu 24.10 on it and most things ran really well except for a couple of things:
- bluetooth
- wake up took forever
The bluetooth I gave up on (without much effort).
The wake up was taking up to 1min to show a login screen.
Firstly - the fix:
sudo nano /etc/default/grub
Modify the line that starts with GRUB_CMDLINE_LINUX_DEFAULT to include amdgpu.dpm=0
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dpm=0"
sudo update-grub
sudo reboot
Secondly - how I diagnosed it.
(I am not a linux guru by any stretch so take this with a pinch of salt - a generous one)
The first obvious thing I found was gnome-shell hitting 100% of 1 core while waiting for the login screen to show.
I tried a lot of things suggest by Microsoft Copilot and other AIs, none of them worked.
On the advice of a workmate (who is a linux guru) I used strace to see what was going on inside gnome-shell. (4941 is the process id of gnome-shell)
sudo strace -c -p 4941
strace: Process 4941 attached
^C
strace: Process 4941 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
99.55 41.940671 2796044 15 ioctl
0.45 0.188158 2939 64 ppoll
0.00 0.001259 16 75 write
0.00 0.000698 11 59 1 futex
0.00 0.000405 10 37 read
0.00 0.000081 5 14 close
0.00 0.000064 16 4 eventfd2
0.00 0.000003 3 1 prlimit64
------ ----------- ----------- --------- --------- ----------------
100.00 42.131339 156622 269 1 total
Based on Microsoft Copilot’s recommendation, I tried
sudo strace -tt -v -e trace=ioctl -o gnome_shell_detail.txt -p 4941
Which gave the following delightful output
cat gnome_shell_detail.txt
11:46:05.168554 ioctl(12, DRM_IOCTL_MODE_CREATEPROPBLOB, "\x1c\x0f\x02\x24\x40\x75\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00" => "\x1c\x0f\x02\x24\x40\x75\x00\x00\x44\x00\x00\x00\x69\x00\x00\x00") = 0
11:46:05.168722 ioctl(12, DRM_IOCTL_MODE_ATOMIC, "\x01\x04\x00\x00\x11\x00\x00\x00\xa0\xa5\x02\x24\x40\x75\x00\x00\x20\x8e\x02\x24\x40\x75\x00\x00\x10\x2c\x00\x24\x40\x75\x00\x00"... => "\x01\x04\x00\x00\x11\x00\x00\x00\xa0\xa5\x02\x24\x40\x75\x00\x00\x20\x8e\x02\x24\x40\x75\x00\x00\x10\x2c\x00\x24\x40\x75\x00\x00"...) = 0
11:46:47.153714 ioctl(12, DRM_IOCTL_MODE_DESTROYPROPBLOB, "\x69\x00\x00\x00" => "\x69\x00\x00\x00") = 0
11:46:47.167083 ioctl(12, DRM_IOCTL_MODE_CREATEPROPBLOB, "\x20\x11\x03\x24\x40\x75\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00" => .... (goes on for some time)
Microsoft Copilot helpfully explained that "Your detailed strace log shows a series of DRM (Direct Rendering Manager) ioctl calls."
We got to the suggestion of turning off Dynamic Power Management (DPM) which fixed the issue.
I now have a really nice development machine with a beautiful screen which is big enough to not need a second monitor.