Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to apply profile due to --crtc option #380

Open
aimoff opened this issue Feb 19, 2024 · 2 comments
Open

Failed to apply profile due to --crtc option #380

aimoff opened this issue Feb 19, 2024 · 2 comments

Comments

@aimoff
Copy link

aimoff commented Feb 19, 2024

Hi,

My PC has iGPU and dGPU.
The dGPU is connected to a monitor directly via HDMI, and the iGPU is connected to another monitor through USB dock by DisplayPort over Alternative Mode.
On this environment, autorandr fails to apply profile as:

$ autorandr mix
Failed to apply profile 'mix' (line 1017):
  Command failed: xrandr --fb 3840x1200 --output DisplayPort-1-4 --crtc 0 --gamma 1.0:1.0:1.0 --mode 1920x1200 --pos 0x0 --primary --rate 59.95 --reflect normal --rotate normal --set Colorspace Default --set 'max bpc' 16 --set non-desktop 0 --set 'scaling mode' None --set TearFree auto --set underscan off --set 'underscan hborder' 0 --set 'underscan vborder' 0 --output HDMI-A-1 --crtc 1 --gamma 1.0:1.0:1.0 --mode 1920x1080 --pos 1920x120 --rate 59.94 --reflect normal --rotate normal --set Colorspace Default --set 'max bpc' 16 --set non-desktop 0 --set 'scaling mode' None --set TearFree auto --set underscan off --set 'underscan hborder' 0 --set 'underscan vborder' 0 (line 1017)

When I ran xrandr manually with same options, the xrandr failed as:

$ xrandr --version
xrandr program version       1.5.1
Server reports RandR version 1.6
$ xrandr --fb 3840x1200 --output DisplayPort-1-4 --crtc 0 --gamma 1.0:1.0:1.0 --mode 1920x1200 --pos 0x0 --primary --rate 59.95 --reflect normal --rotate normal --set Colorspace Default --set 'max bpc' 16 --set non-desktop 0 --set 'scaling mode' None --set TearFree auto --set underscan off --set 'underscan hborder' 0 --set 'underscan vborder' 0 --output HDMI-A-1 --crtc 1 --gamma 1.0:1.0:1.0 --mode 1920x1080 --pos 1920x120 --rate 59.94 --reflect normal --rotate normal --set Colorspace Default --set 'max bpc' 16 --set non-desktop 0 --set 'scaling mode' None --set TearFree auto --set underscan off --set 'underscan hborder' 0 --set 'underscan vborder' 0
xrandr: output DisplayPort-1-4 cannot use crtc 0x4e

As the result, I found autorandr with --skip-options crtc works fine.

$ autorandr --skip-options crtc mix

I'm not sure if it is caused by xrandr version.

Are there any way to apply --skip-options crtc automatically at login or udev trigger? Sorry, I found it.

@imLew
Copy link

imLew commented Feb 27, 2024

I have the same issue using autorandr 1.14 and

xrandr program version       1.5.2
Server reports RandR version 1.6

The saved profile of laptop display + one external display with DP over USB-C applies the command

xrandr --fb 3840x3760 --output DP-1-3 --crtc 0 --gamma 1.0:1.0:1.0 --mode 3840x2160 --pos 0x0 --primary --rate 60.00 --reflect normal --rotate normal --set non-desktop 0 --output eDP-2 --crtc 1 --gamma 1.0:1.0:1.0 --mode 2560x1600 --pos 582x2160 --rate 240.00 --reflect normal --rotate normal --set 'Broadcast RGB' Automatic --set Colorspace Default --set 'max bpc' 12 --set non-desktop 0 --set 'scaling mode' 'Full aspect'

which fails.
Entering the command manually it fails with

xrandr: output DP-1-3 cannot use crtc 0x3e

while the external display is not active.

Running it without --crtc 0 works and afterwards running the command with --crtc 0 works as well.

Are there any way to apply --skip-options crtc automatically at login or udev trigger? Sorry, I found it.

Where did you find it?

Found it as well, in case anyone else has this issue, add

[config]
skip-options=crtc

to your autorandr/settings.ini.

@aimoff
Copy link
Author

aimoff commented Feb 27, 2024

Thanks for supplementary comments.
On my environment, the interface names are sometimes changed.
Thus, my current autorandr/settings.ini is:

[config]
skip-options=crtc
match-edid=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants