i810: missing modes when unpluging CRT

Ross Burton ross at burtonini.com
Mon Feb 5 09:42:17 PST 2007


I've nearly got the modesettings/xrandr1.2 foo all working as I want,
but I'm having a problem whilst writing a small script to automatically
adjust.  The magic part of the script:

xrandr -q | grep -q  "VGA connected"
if [ $? ]; then
  xrandr --output 0x5d --off --output 0x5c --mode 0x6c
  xrandr --output 0x5c --off --output 0x5d --mode 0x60

Basically if VGA is connected, turn off the LCDS (0x5d) and switch to
1680x1050 (0x6c) on the CRT (0x5c).  If the VGA isn't connected, power
off the CRT, and switch to 1024x768 (0x60) on the LVDS.

However, if I unplug my CRT and run the script, I just get this:

$ change-display 
xrandr: cannot find mode 0x6c

I'm not surprised it can't find 0x6c, as the display it was on is no
longer present.  This is confirmed by running xrandr without the CRT
plugged in:

$ xrandr  --verbose
Screen 0: minimum 320 x 240, current 1680 x 1050, maximum 1680 x 1050
VGA disconnected 1680x1050+0+0 normal 0mm x 0mm
        Identifier: 0x5c
        Timestamp:  26749995
        Subpixel:   unknown
        CRTC:       0
LVDS connected 246mm x 185mm
        Identifier: 0x5d

So, why does xrandr try to use a mode that no longer exists?  I'm
guessing this is a bug in the xrandr app, or is it in i810?

Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

More information about the xorg mailing list