Failure to switch external monitors: xrandr --auto should free unused crtcs
Submitted by tim..@..il.com
Assigned to Keith Packard @keithp
Description
If your laptop video card has only 2 crtcs (one of which is devoted to the laptop LVDS display), then switching between two different external monitors often fails if one of them is connected with a digital (DVI) connector and the other uses a VGA connector, unless one explicitly turns off the first output, e.g., xrandr --output VGA-0 --off
xrandr's command line output does not clearly convey the problem or the solution; moreover, the behavior of "xrandr --auto" clearly does not live up to the second promise it makes in the man page:
--auto: For connected but disabled outputs, this will enable them using their preferred mode (or, something close to 96dpi if they have no preferred mode). For disconnected but enabled outputs, this will disable them.
The "disabling disconnected outputs" part must be incomplete because the crtc remains held by the first output even though it is disconnected, resulting in errors like: xrandr: cannot find crtc for output DVI-0
For more information, see the discussion here: https://bugs.freedesktop.org/show_bug.cgi?id=29852
Suggested fixes:
- xrandr --auto should first turn off any disconnected outputs before enabling new outputs
- The output of xrandr -q should more clearly distinguish disconnected but not disabled outputs.
Version: 7.5 (2009.10)