Bug 22539

Summary: xrandr weirdness: cannot find crtc
Product: xorg Reporter: Gilad Arnold <arnold>
Component: App/xrandrAssignee: Keith Packard <keithp>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: gezuru, j_suni
Version: 7.4 (2008.09)Keywords: love
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

Description Gilad Arnold 2009-06-29 12:25:23 UTC
I'm running xf86-video-ati 6.12.2 on a Thinkpad T40/42. After startup, x11 is configured as follows:

$ xrandr
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1920 x 1200
VGA-0 connected 1400x1050+0+0 (normal left inverted right x axis y axis) 546mm x 352mm
   1920x1200      60.0 +   60.0
   1600x1200      75.0     70.0     65.0     60.0     60.0
   1680x1050      60.0
   1600x1000      60.0
   1400x1050      74.8     60.0*
   1280x1024      85.0     75.0     60.0
   1280x960       85.0     60.0     60.0
   1152x864       75.0
   1024x768       85.0     75.1     75.0     70.1     60.0
   832x624        74.6
   800x600        85.1     72.2     75.0     60.3     56.2
   640x480        85.0     75.0     72.8     75.0     60.0     59.9
   720x400        85.0     70.1
   640x400        85.1
   640x350        85.1
DVI-0 connected 1400x1050+0+0 (normal left inverted right x axis y axis) 546mm x 352mm
   1920x1200      60.0 +
   1600x1200      60.0     60.0
   1680x1050      60.0
   1600x1000      60.0
   1400x1050      74.8     60.0*
   1280x1024      85.0     75.0     60.0
   1280x960       85.0     60.0     60.0
   1152x864       75.0
   1024x768       85.0     75.1     75.0     70.1     60.0
   832x624        74.6
   800x600        85.1     72.2     75.0     60.3     56.2
   640x480        85.0     75.0     72.8     75.0     60.0     59.9
   720x400        85.0     70.1
   640x400        85.1
   640x350        85.1
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1400x1050      50.0*+
   1280x1024      59.9     60.0
   1280x960       60.0     59.9
   1280x854       59.9
   1280x800       59.8
   1280x720       59.9
   1152x768       59.8
   1024x768       60.0     59.9
   800x600        60.3     59.9     56.2
   640x480        59.9     59.4
S-video disconnected (normal left inverted right x axis y axis)


Running xrandr with --verbose reveals that VGA-0 and DVI-0 share crtc 1 (clones) while LVDS uses crtc 0. Now I try to change mode on DVI-0 but the command fails with an error message:

$ xrandr --output DVI-0 --mode 1680x1050
xrandr: cannot find crtc for output DVI-0

Same happens with different modes (including --auto) and with VGA-0. The two monitors (in fact, two inputs of the same monitor) have the exact same modelines, including refresh rate (verified with verbose output).

To work around the problem I have to turn off one of the two, then change mode on the other (it has to be two separate commands, otherwise the same error occurs):

$ xrandr --output VGA-0 --off
$ xrandr --output DVI-0 --mode 1680x1050

Posting to the xf86-video-ati mailing list, it is believed that this is a problem with xrandr incorrectly trying to set the modes. Thanks for your help!
Comment 1 Jeremy Huddleston Sequoia 2011-10-05 20:56:38 UTC
Probably a simple fix... has this been addressed yet?
Comment 2 Krister Svanlund 2012-06-23 11:48:59 UTC
There is also a problem when running a command such as

$ xrandr --output VGA-0 --off --ouput TV-0 --auto

which in my opinion should turn of the VGA-0 which should free the crtc and then try to activate the TV-0 output. Instead it reports that there is no free crtcs.
Comment 3 gezuru 2012-12-14 15:54:09 UTC
Same problem here, when trying to switch from a "2 external screens" setup back to "1 internal screen" with autorandr.

xrandr should disable the disabled outputs *before* enabling the enabled outputs, to free the crtc. Otherwise it's sometimes not possible to switch from one configuration to another one, even though both configurations are valid. Are there any plans to fix this bug?

Possibly related to or duplicate of Bug #29929.
Comment 4 GitLab Migration User 2018-08-10 20:33:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xrandr/issues/5.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.