Detecting screen disconnection

Owen Taylor otaylor at redhat.com
Mon Nov 1 08:21:17 PST 2004


On Mon, 2004-11-01 at 14:54 +1100, Benjamin Herrenschmidt wrote:
> On Sun, 2004-10-31 at 16:44 +0100, Luc Verhaegen wrote:
> 
> > It would be nice to have so that one can reattach a new monitor without 
> > restarting X entirely (when there are bandwidth/frequency issues). X can 
> > then revalidate modes and switchmode to get a usable display again. Or 
> > attach a TV and see X initialise it, while reinitialising crt. That sort 
> > of thing. From what i can see, it is not that hard a task. 
> > 
> > Polling all outputs all the time would be dreadful though (i'm not sure 
> > if many CRT dacs can tell you if there is anything attached, dcc might 
> > be an option then). Maybe a switchmode event could trigger it, maybe 
> > some sort of keycombination, xrandr too, even though it's use might be 
> > limited if your crt is unable to display the mode :).
> 
> It would be nice indeed if X had the capability to dynamically
> add/remove displays ...
> 
> I noticed that MacOS re-triggers a detection on wakeup from sleep (maybe
> we could do it in Resume() too ?) or via an explicit clic to a certain
> button in a control panel.
> 
> I don't know/think we can extend easily the X protocol to send such a
> message to the driver, though maybe one of the existing extensions can
> be tweaked for that... Or we could have an X magic key combo triggering
> an optional hook in drivers that does re-probing...

This type of protocol extension is easy. (Add a new request to xf86misc
or whatever.) 

The more interesting question is how you represent the dynamic changes
to the set of available screens on the X protocol.

The Xinerama case is easy - just declare that the Xinerama monitor 
configuration can change when a ConfigureNotify is received on the
root window (which is how RANDR signals monitor size changes.) 
I think GTK+ may even support this already.

The non-Xinerama case is harder. The way I'd imagine it working is that
the server always advertises the maximum number of screens; screens
that aren't present act as /dev/null. There is some sort of way for
clients to figure out:

 - What screens are actually present
 - When the set of actually present screens change

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20041101/1ccc018a/attachment.pgp>


More information about the xorg mailing list