>> I've been investigating more, and it turns out all the >> infrastructure is there - there is already such an event defined by >> Xrandr. > Do you mean "monitor connected" or "DDC info populated" as the event?
I meant "monitor connected", but "DDC info newly available" is perhaps closer to what is actually possible. >> In 8.0 it doesn't actually work - the event isn't sent upon monitor >> connect or disconnect, at least not in the case of my test machine, >> but is instead delayed until some (other) client queries state > I've always wondered about this. In my case, I've got some > superstition that having the VGA HD15 connector present when the > machine powers on has been needed in some cases. I always felt like > the DDC-getting mechanism was a bit of magic (which one of those pins > carries that data? I thought VGA was pretty much all analog...). I don't know which pin(s) it is. And it's been a while since I read the description. But I as I recall, there is a pin that carries digital data from the monitor to the computer. Memory is very fuzzy by now, but I _think_ it's something like I²C slowed down by an order of magnitude or two. >> but there is no need to define a new event or a new event-carrying >> mechanism or any of that. > So, in your experimentation are you able to connect the VGA HD15 to > the monitor after the system starts up, issue some xrandr command to > gather DDC, then reset your video mode with that updated timing? The sequence of my test was: - Disconnect monitor cable - Boot system - Start X - Verify (env DISPLAY=:0 xdpyinfo) that X started 800x600 and (env DISPLAY=:0 xrandr) that nothing higher-resolution is available - Start my RandR-using test program, which selects for RandR events using XRRSelectInput - Plug monitor in - Nothing happens - Issue xrandr command to query available options (no change specified) - My program gets events - That xrandr command reports 1024x768 and 1280x1024 available If I've understood your question correctly, that's a "yes". Of course, some aspects of this are likely to be hardware-specific; I daresay not all hardware can notice monitor connect/disconnect. Heck, there's probably hardware out there that can't even fetch DDC info from the monitor.... /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B