xrandr: picking CRTC's
Arnout Engelen
xorg at bzzt.net
Sat Oct 20 05:43:10 PDT 2012
Hi,
I'm running into a problem with the 'xrandr' command-line tool, which appears
to be caused by the way it tries to rearrange CRTC's.
The usecase: as far as I understand, I have a video card with 2 CRTC's and more
ports. LVDS-1 remains active, and I'd like to, with 1 invocation, disable VGA-1
and enable DP-1, something like this:
./xrandr --output VGA-1 --off --output LVDS-1 --mode 1920x1080 --pos 1920x0
--rotate normal --output DP-1 --mode 1920x1080 --pos 0x0 --rotate normal
This, unfortunately, produces an error message:
./xrandr: cannot find crtc for output LVDS-1
The code fragment of interest is pick_crtcs. In its first loop, it cycles
though all outputs, and when it encounters DP-1, calls 'find_crtc_for_output'
to find a CRTC for this output. You'd expect it to pick the CRTC that was
originally connected to VGA-1, but inside check_crtc_for_output it notices
crtc->crtc_info->outputs[0] is still VGA-1, so it skips that CRTC.
As pick_crtcs's first attempt thus fails, it tries to fall back to
'pick_crtcs_score', which also uses check_crtc_for_output and basically
fails for mostly the same reason.
A bit of searching around turned up http://www.spinics.net/lists/xorg/msg29635.html
in which Matthias Hopf mentions:
I also created a kind of test suite for verifying xrandr behavior, but I
have to clean that one up before committing.
Did this happen?
What would be the way to fix this?
Kind regards,
Arnout
More information about the xorg-devel
mailing list