1. Plug an external monitor to your laptop. 2. Use xrandr(1) or any tool to enable the external monitor, and disable the laptop's built-in LCD. 3. Suspend your laptop. 4. Unplug the external monitor. 5. Unsuspend the laptop. You are left with a black LCD. If you are lucky, userspace tools (say, gnome-settings-daemon) will let you hit the XF86Display hotkey to scan for a suitable RANDR configuration. I think the X server should automatically re-probe the RANDR outputs when it comes back from unsuspend. Then it could emit the RRNotify event to tell userspace, "hey, the outputs changed; go and configure them in a sensible way". I was talking to ajax on IRC the other day... (01:59:36 PM) federico: ajax: do you know where in the X sources I could put the "unsuspended, now rescan!" bit? (02:00:06 PM) ajax: randr would need to wrap the EnterVT call chain (02:00:24 PM) ajax: so uh, **/xf86RandR12.c
Created attachment 25528 [details] [review] xserver-bfo21554-randr-reprobe-on-unsuspend.diff Patch in progress to fix this. This seems to work sometimes, but I'm not sure if my client-side code to pick up the RANDR events is 100% correct. Patch review is appreciated :)
Created attachment 25529 [details] [review] xserver-bfo21554-randr-reprobe-on-unsuspend.diff Updated version that doesn't mess up the includes nor the non-xf86-specific structures.
looks okay to me, though i haven't tested it at all.
Applied, thanks.
*** Bug 20899 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.