The Retina 5K iMac has a 5K screen but it is only possible to go up to 4K with Linux. I should probably attach some files here but I am not sure which....
Created attachment 164231 [details] dmesg
An old bug with not much info. If the problem persists, I think you'll have better luck reporting a bug at https://bugs.freedesktop.org/.