After suspending (S3) in external-only monitor mode (VGA), resuming doesn't work properly. Both monitors show the Linux console (apparently a fake) with the mouse cursor on the external monitor. After switching to real Linux console and back to X you're back in external-only monitor mode. "powersave -u" (SUSE:SLE-11-SP1) is used for suspend (S3).
libdrm 2.4.23 + git 0184bb1c
Same issue with Ironlake.
The issue is gone on SNB with the latest kernel(drm-intel-fixes)4efe070896e1f7373c98a13713e659d1f5dee52a. But it still exists on the ILK.
It's a regression from 2.6.36, at least for IronLake. 2.6.36 works fine with S3.
Ditto for SandyBridge. 2.6.36 works fine.
Unfortunately, I can't confirm drm-intel-fixes because S3 itself got broken with that branch (ditto for 2.6.38-rc1).
I tried to port all fixes to 2.6.37 so that S3 works.
The commit in comment 2 doesn't fix the problem. Still a black screen after S3 on the VGA, or a broken output.
I bisected 2.6.37. The bad commit is
Author: Keith Packard <firstname.lastname@example.org>
Date: Tue Nov 16 16:03:53 2010 +0800
drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardwa
Reverting this commit fixes the problem. The external monitor is restored properly with S3 resume again.
However, as a side-effect, reverting this commit causes a flickering of screen at each time the mode-setting is changed or turned on/off.
A better fix is to re-trigger the CRT detection after resume.
Below is a simple patch to add that fix. It requires a fix for S4-resume regression in bug 27272 beforehand:
Created attachment 44992 [details]
Fix patch for 2.6.37
Created attachment 45002 [details]
Reset hotplug detection upon resume
Takashi, we were thinking along the same lines. I think this a slightly more elegant approach.
However, connector->restore() is not called from anyway. Neither is crtc->restore(). Bah.
Heh, I falled into the same trap, so I tried to write a minimal fix in i915 without DRM core changes instead. The above was the result of such :)
However, it's cleaner to have a proper callback for resume-preparation indeed.
merged in .38-rc4