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

Fix issue 149 crtc not found by initialising all displays first #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

madduck
Copy link
Contributor

@madduck madduck commented Jan 6, 2020

This patch causes autorandr to call xrandr --auto before making
other changes. This has no discernable side-effects, but it seems to fix
issues where xrandr would report an
error
like

cannot find crtc for output HDMI-1

Closes: #149

This patch causes `autorandr` to call `xrandr --auto` before making
other changes. This has no discernable side-effects, but it seems to fix
[issues where `xrandr` would report an
error](phillipberndt#149) like

```
cannot find crtc for output HDMI-1
```

Closes: phillipberndt#149
Signed-off-by: martin f. krafft <[email protected]>
@phillipberndt
Copy link
Owner

There's use cases where people don't want to switch on disabled outputs, and for them this creates flickering. That makes this an undesired solution, unfortunately. I personally worked around this in my setup using the predetect hook when I faced a similar issue.

@phillipberndt
Copy link
Owner

phillipberndt commented Jan 7, 2020

Curious: What happens if you only enable the output that didn't work using xrandr --output foo --auto? What happens if you only -q?

@madduck
Copy link
Contributor Author

madduck commented Jan 7, 2020

Is that what xrandr --auto doesn, switch on disabled displays? Using predetect will work for me, for sure.

I'll try the other suggestions when I get back to the workplace and have a bit of time.

@madduck
Copy link
Contributor Author

madduck commented Jan 8, 2020

FYI:

lotus:~% autorandr --change                                                                                                                         #(pts/6) 09 11:09:30.317
catalyst (detected)
default
xrandr: cannot find crtc for output DP-2-2
Failed to apply profile 'catalyst' (line 762):
  Command failed: xrandr --fb 5760x1080 --output DP-2-1 --gamma 1.0:1.0:1.0 --mode 1920x1080 --pos 0x0 --rate 60.00 --reflect normal --rotate normal --output DP-2-2 --gamma 1.0:1.0:1.0 --mode 1920x1080 --pos 1920x0 --primary --rate 60.00 --reflect normal --rotate normal (line 762)

lotus:~% xrandr --output DP-2-2 --auto                                                                                                          #(130 pts/6) 09 11:09:39.705
xrandr: cannot find crtc for output DP-2-2

lotus:~% xrandr -q                                                                                                                                #(1 pts/6) 09 11:09:47.892
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   2560x1440     60.01 +  59.99    59.99    59.96    59.95
   1920x1440     60.00
   1856x1392     60.01
   1792x1344     60.01
   2048x1152     59.99    59.98    59.90    59.91
   1920x1200     59.88    59.95
   1920x1080     60.01*   59.97    59.96    59.93
   1600x1200     60.00
   1680x1050     59.95    59.88
   1600x1024     60.17
   1400x1050     59.98
   1600x900      59.99    59.94    59.95    59.82
   1280x1024     60.02
   1440x900      59.89
   1400x900      59.96    59.88
   1280x960      60.00
   1440x810      60.00    59.97
   1368x768      59.88    59.85
   1360x768      59.80    59.96
   1280x800      59.99    59.97    59.81    59.91
   1152x864      60.00
   1280x720      60.00    59.99    59.86    59.74
   1024x768      60.04    60.00
   960x720       60.00
   928x696       60.05
   896x672       60.01
   1024x576      59.95    59.96    59.90    59.82
   960x600       59.93    60.00
   960x540       59.96    59.99    59.63    59.82
   800x600       60.00    60.32    56.25
   840x525       60.01    59.88
   864x486       59.92    59.57
   800x512       60.17
   700x525       59.98
   800x450       59.95    59.82
   640x512       60.02
   720x450       59.89
   700x450       59.96    59.88
   640x480       60.00    59.94
   720x405       59.51    58.99
   684x384       59.88    59.85
   680x384       59.80    59.96
   640x400       59.88    59.98
   576x432       60.06
   640x360       59.86    59.83    59.84    59.32
   512x384       60.00
   512x288       60.00    59.92
   480x270       59.63    59.82
   400x300       60.32    56.34
   432x243       59.92    59.57
   320x240       60.05
   360x202       59.51    59.13
   320x180       59.84    59.32
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  50.00    59.94
   1680x1050     59.95
   1600x900      75.00    60.00
   1280x1024     75.02    70.00    60.02
   1440x900      59.89
   1152x864      75.00
   1280x720      60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    60.00    59.94
   720x400       70.08
DP-2-2 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  50.00    59.94
   1680x1050     59.95
   1600x900      75.00    60.00
   1280x1024     75.02    70.00    60.02
   1440x900      59.89
   1152x864      75.00
   1280x720      60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    60.00    59.94
   720x400       70.08
DP-2-3 disconnected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm

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

Successfully merging this pull request may close these issues.

Switching between profiles failing: "cannot find crtc for output LVDS-1"
2 participants