How to refresh the list of outputs detected by xrandr?

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 19 06:01:26 PST 2015


On Thu, Nov 19, 2015 at 02:39:21PM +0100, Łukasz Maśko wrote:
> Dnia czwartek, 19 listopada 2015 13:27:37 Chris Wilson pisze:
> [...]
> > The kernel is supposed to send a hotplug notification on resume that
> > should result in the list being updated.
> 
> If I get you right, the kernel does not notify the change of a dock and 
> therefore does not notify X about the change?

The usual report is "suspend, dock/undock, resume". Changing the dock
should generate the usual hardware hotplug notifications. If the machine
was suspended at the time, we have to fake the hotplug event on resume.

> Is there a way to generate such notification using currently available 
> software tools, or am I limited to fix in the kernel to make it notify dock 
> change?

Hmm, can't see a way to synthesize uevents. But still calling xrandr
should be enough to do a forced reprobe of outputs. Without a hotplug
event, there is a small 15s cache of the most recent probe.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg mailing list