Bug 21554 - RANDR outputs should be re-probed when unsuspending
Summary: RANDR outputs should be re-probed when unsuspending
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 20899 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-04 17:24 UTC by Federico Mena-Quintero
Modified: 2009-07-20 15:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xserver-bfo21554-randr-reprobe-on-unsuspend.diff (5.22 KB, patch)
2009-05-05 16:44 UTC, Federico Mena-Quintero
no flags Details | Splinter Review
xserver-bfo21554-randr-reprobe-on-unsuspend.diff (2.57 KB, patch)
2009-05-05 19:33 UTC, Federico Mena-Quintero
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Mena-Quintero 2009-05-04 17:24:59 UTC
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
Comment 1 Federico Mena-Quintero 2009-05-05 16:44:34 UTC
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 :)
Comment 2 Federico Mena-Quintero 2009-05-05 19:33:27 UTC
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.
Comment 3 Daniel Stone 2009-05-05 20:20:02 UTC
looks okay to me, though i haven't tested it at all.
Comment 4 Søren Sandmann Pedersen 2009-05-27 12:57:28 UTC
Applied, thanks.
Comment 5 Federico Mena-Quintero 2009-07-20 15:00:45 UTC
*** 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.