autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

output cannot use crtc

Open hultberg opened this issue 5 years ago • 7 comments

Autorandr does not work for me. Changing to my office layout I'm hit with:

xrandr: output DP-0 cannot use crtc 0x200
Failed to apply profile 'office' (line 857):
  Command failed: xrandr --fb 3840x2160 --output eDP-1-1 --off --output DP-0 --crtc 0 --gamma 1.0:1.0:1.0 --mode 3840x2160 --pos 0x0 --primary --rate 60.00 --reflect normal --rotate normal (line 857)

And changing to mobile layout I'm hit with:

xrandr: output eDP-1-1 cannot use crtc 0x1b9
Failed to apply profile 'mobile' (line 857):
  Command failed: xrandr --fb 1920x1080 --output DP-0 --off --output eDP-1-1 --crtc 0 --gamma 1.0:1.0:1.0 --mode 1920x1080 --pos 0x0 --primary --rate 144.00 --reflect normal --rotate normal (line 857)

The xrandr commands work without --crtc on my laptop.

How to resolve this issue and what to debug?

hultberg avatar May 18 '20 13:05 hultberg

  • What CRTC is reported in xrandr --verbose?
  • There's a command line flag to skip xrandr options. Try to specify crtc there as a workaround!

phillipberndt avatar May 19 '20 06:05 phillipberndt

I have not mentioned it before but I'm using nvidia proprietary drivers (nouveau dont work well on my laptop).

# $ xrandr --verbose
# (some output has been removed)
# Current setup: two monitors and laptop monitor is off.
# On eDP-1-1 there is no CRTC line in output.
HDMI-0 connected primary 2560x1440+0+0 (0x2f8) normal (normal left inverted right x axis y axis) 597mm x 336mm
        CRTC:       0
        CRTCs:      1 0 2 3
DP-0 connected 1920x1080+2560+0 (0x1c6) normal (normal left inverted right x axis y axis) 531mm x 299mm
        CRTC:       1
        CRTCs:      1 0 2 3
eDP-1-1 connected (normal left inverted right x axis y axis)
        CRTCs:      4 5 6

EDIT: typo

hultberg avatar May 20 '20 09:05 hultberg

Doesn't work for me either (also using nvidia drivers).

As a workaround, I've removed the crtc lines from the config files, that seems to work just fine.

gaalcaras avatar Jun 17 '20 10:06 gaalcaras

It doesn't work for me either. xrandr --verbose gives the following for eDP-1-1:

	CRTC:       0
	CRTCs:      0 5 6

man xrandr says that it's usually okay with guessing the crtc value, and that the option is usually used when xrandr fails to guess the crtc. Maybe an option should be added to tell autorandr to keep track of the crtc value, and make it ignore it by default?

EDIT: Oops, I missed @phillipberndt's comment that there is an option to turn off options. Will test that now, sounds like just the thing needed for this problem.

EDIT 2: Indeed works for me if I invoke --change with --skip-option crtc, seems like an appropriate solution.

bobismijnnaam avatar Aug 11 '20 08:08 bobismijnnaam

im having the same issue

zakaria-with-glasses avatar Aug 31 '21 13:08 zakaria-with-glasses

Same issue on a laptop using nvidia for external monitors. One monitor using usb-c directly from laptop and one going through a wd19tbs docking station.

❯ autorandr docked
xrandr: output DP-1-0 cannot use crtc 0x3f
Failed to apply profile 'docked' (line 857):
  Command failed: xrandr --fb 7200x2560 --output DP-1-2.2 --crtc 4 --gamma 1.0:1.0:1.0 --mode 2560x1440 --pos 0x0 --rate 59.95 --reflect normal --rotate left --output DP-1-0 --crtc 0 --gamma 1.0:1.0:1.0 --mode 3840x2160 --pos 1440x0 --primary --rate 60.00 --reflect normal --rotate normal (line 857)

Same thing happens when using a script created by arandr, but opening arandr and manually setting everything up from scratch works.

Will try @phillipberndt workaround above.

chrisaq avatar Sep 24 '21 07:09 chrisaq

Adding this to help with the SEO. I have the same issue on Humanscale M-Connect 2 using DisplayLink, the 4 virtual displays, DVI-I-1-1 through DVI-I-4-4 report weird values for CRTC, using the fix above --skip-options crtc works a treat.

guysherman avatar Apr 11 '23 19:04 guysherman