generic display reprobing at user's request
nemesis-lists at icequake.net
Tue Dec 7 15:32:30 PST 2004
Strange thought that occurred to me. Swapping monitors, plugging in TV
cables, etc while the X server is already running doesn't work well in
general, first of all because DDC is only probed on startup, and second
because there is no way for these sort of external events to be
propagated into the driver (i.e. they don't generate interrupts, so you
would have to sit there and poll for them).
In my experimental TV patches for matrox, one of the things I do is
re-detect the presence of the TV cable on a VT switch. The user could
then just switch to a VT and switch back, and that head would be
re-setup to display on the TV without having to restart the server. I
was also thinking that I could stick DDC probing in there so that when
the user switches back to the monitor, it can use the DDC data to pick
an appropriate mode. What bothers me about this is that it feels like
this could be done more generically. I haven't thought about this for
very long, but the two things that immediately came to mind were:
1) Extend this behavior to all drivers which support things other than
monitors or with multiple heads. i.e., in FooEnterVT and FooLeaveVT,
always call internal functions which re-probe for display devices and
setup appropriate modes. Then the user is expected to switch to a vc
when changing stuff and then switch back to the X server afterwards.
2) Provide a key combination that allows the user to tell the X server
to re-probe display devices and re-setup modes. I like this better, but
there are still two problems:
- The probing functions in each driver need to be expected to be called
more than once per server generation (this may already be the case)
- Hard coding key combinations into the server is arguably bad taste, so
maybe this is something better done by the WM - counterargument, WM
doesn't deal with hardware and this is a behavior that is directly
tied to the hardware
- Plugging in a monitor before its capabilities have been probed can
destroy the monitor. I doubt this happens with any frequency, but
perhaps the key combination should first disable video signal, then
only re-enable it once the user has hooked up the new setup.
anyway, any thoughts? It would be super nice if I were i.e. able to
take a running session on my laptop, hook it up to a VGA display, and
have it magically reconfigured instead of having to restart the server.
Same for e.g. changing from a DVI to an analog display, or hooking up a
TV cable on a G550.
Ryan Underwood, <nemesis at icequake.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the xorg