Bug 16541

Summary: Imac Radeon HD 4850 switch "Mini Display Port" output with ALL kernels after 2.6.31
Product: Drivers Reporter: jeff.artik
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED OBSOLETE    
Severity: high CC: akpm, alan, alexdeucher, kapouer
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.35-14.19 Subsystem:
Regression: Yes Bisected commit-id:

Description jeff.artik 2010-08-08 05:48:38 UTC
I tried to install many linux distro on the new Apple Imac27" with ATI radeon HD 4850 video card. After selected "install", the screen goes black. few investigations later, I discovered display output switch to the Mini Display Port. So, I tried to connect a second screen, and I was right : just after select "install", the video output switch to the second screen, and the main screen turn black.

I continue my installation using my 2nd screen (connected to the mini display port), and after it, I'm on the desktop. I activate Open radeon drivers, they works perfectly, but in the second screen (Vsync is perfect, and very smooth using compiz). Impossible to switch to the main screen. It's not recognized, and stay black.

I tried proprietary ati drivers (10.6). With them, I can activate my main screen, but they are not better than the open ones : there is a big vsync bug. Actually, It's totally impossible for a normal user to use open ati drivers on the main screen with an Imac27 and ati radeon 4850 graphic card.

I think issue is in the kms driver, I tried to deactivate them. Main screen is recognized, but impossible to turn it on, it stay black, and Vsync issue re-appear on the second screen.

I tried 2.6.32, 2.6.34, 2.6.35 released, bug is still here : black screen on all distro (tried ubuntu lucid lynx, open suze 11.3 ...)
Comment 1 Andrew Morton 2010-08-26 22:04:43 UTC
So.. I guess we're talking about drivers/gpu/drm/radeon/ here?
Comment 2 Alex Deucher 2010-08-26 23:56:06 UTC
The DP link training algorithm needs to be adjusted as it's not able to train the link with the 2560x1440 panel used in the imac.
Comment 3 jeff.artik 2010-08-27 13:44:38 UTC
But if you test ubuntu Karmic, installation works. It's since Lucid (so the news kernel). THere is a big topic here : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/542660

and

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/542660/comments/27

The issue is here since new kernels, since Lucid olds one works. It's actually impossible to install LUCID on an Imac27, and I don't think resolution is the issue, black screen comes just after the start instalation, before getting "steps" installations in ubuntu. This bug hits all releases using new kernel, impossible to install anything (tried suze, debian, ubuntu ...) It's a real nightmare.
Comment 4 jeff.artik 2010-08-27 13:45:41 UTC
But why eveything works fine with old kernels and Imac ? it's definitly a new bug, that can be corrected
Comment 5 Alex Deucher 2010-08-27 17:41:45 UTC
It only "worked" before because the driver did not have support for embedded DisplayPort (eDP), so it didn't touch the eDP registers and as such the panel was left as configured by the firmware.
Comment 6 jeff.artik 2010-08-27 17:44:59 UTC
Ok Alex, I understand, but do you think that can be corrected ? Can't imagine linux never won't work on Imac27 :S
Comment 7 Alex Deucher 2010-08-27 17:54:43 UTC
Someone with one of the problematic panels needs to tweak the link training code until they get the monitor and the gpu to agree.  The link training sequence is in dp_link_train() in atombios_dp.c in the kernel if you want to play with it.  I'd suggest playing with the delays to start with.
Comment 8 jeff.artik 2010-09-07 23:49:58 UTC
I never will get these knowledges to tweak something :'(
It seems issue hit many people with ATI cards, still don't understand why this bug is not seriously taken, and nothing has been fixed yet, even it's a regression.

nightmare continue, I just want to kill ATI !!!! why Apple choose them !
https://bugs.launchpad.net/ubuntu/lucid/+source/linux/+bug/542660
Comment 9 jeff.artik 2010-09-07 23:51:58 UTC
http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg44917.html this patch could help ?
Comment 10 jeff.artik 2010-09-08 00:27:14 UTC
Lol Alex sorry, I saw that is you patch, and it seems it is applied in the last kernel, but nothing new. Cold you tell me what do you mean by "playing " ? what king of settings I can change to try some tests ?
Comment 11 Jérémy Lal 2011-05-11 01:19:47 UTC
I think this has become a duplicate of
https://bugs.freedesktop.org/show_bug.cgi?id=27314

and Jeff, cheers up, i'm writing this from an iMac 27 (model 12,2), only i have to boot my linux partition from cd to enable bios instead of efi, then kms works.
Comment 12 jeff.artik 2011-05-11 13:06:16 UTC
Hi Jérémy ! So happy to see people triying to help me ! Could you tell me how to proceed ? (step by step :P) hope that will help me ;)