Comment 8 for bug 1060365

Revision history for this message
Jacob Beck (beckjake) wrote :

Okay, the -d argument has the same issue. After some fiddling about with the xrandr utility, I have come to an interesting conclusion. With only one graphics device that has 3 monitors plugged in, only two can be 'active' at a given time. To my knowledge, that's a known limitation of pretty much every graphics card and is therefore expected behavior. What was unexpected is that only 'active' monitors seem to have a crtc value (or maybe only active monitors can be queried, same end result). So if I want to switch to my laptop screen:

xrandr --output VGA-0 --off --output DP-2 --off; xrandr --output LVDS-0 --auto

And if I want to switch back:
xrandr --output LVDS-0 --off; xrandr --output VGA-0 --auto --output DP-2 --right-of VGA-0

The results of this are a little flaky, but work most of the time. I'd rather do it through disper since it's a much nicer interface.

I don't see how my xrandr discoveries would map to what disper does, especially in the general case. Perhaps you have more insight into the workings of the xrandr library.
I can't think of a way to get crtc information for the 'off' monitor without disabling an active one first. I assume it's necessary for enabling (hence the exception) so maybe some sort of switching at the point where you know what the user wants?