Running Ubuntu 20.04 LTS on a 5k iMac
I have run into a problem using the latest LTS version of Ubuntu (20.04) on a late 2015 27" 5k iMac. The current LTS kernel (5.4) is not very useful in booting this Mac, undoubtedly because of the Radeon m9 395x video card in it. It boots, but requires about 4 minutes to get to a working desktop. This can be sped up to about 2 minutes if you don't change the default video settings, but if you don't you will get very tiny text on the display. There is a good solution, but it is only good for a few years. This is to use the Ubuntu 18.04 LTS kernel (4.15), which will be maintained until April 2023, and it is easy to find and install the 4.15 security updates. On this kernel I get to a working desktop in about 20 seconds. Later kernels up to 5.2 also work well, but aren't being maintained for security updates. I have also tried kernels newer than 5.4 (up to 5.8), but they don't work well either. I have submitted bug reports to Ubuntu and even to the kernel maintainers, but there isn't a solution yet.
This is all very strange because one would think that newer kernels work better, not worse. Furthermore, I have a 2011 27" iMac that works fine with Ubuntu 20.04 and the 5.4 kernel. For this reason, I think that the issue either relates to all iMacs with 5k resolution, or to the Radeon m9 video card series. I'm hoping that this posting either helps me get more information on iMac models that do or don't work, or a solution to the problem. Please post if you are having similar problems.
Incidentally, if you are a Linux Mint user, you are in the same situation. Mint 20 uses the same 5.4 kernel that works poorly, but you can install the Ubuntu 18.04 LTS 4.15 kernel on it and it works fine. You can also find and install the security updates on Mint 20 running the 4.15 kernel.
iMac Line (2012 and Later)