3

TL;DR: xrandr fails randomly on my system with the error message xrandr: Configure crtc X failed on my setup with two monitors, that are connected to a dockingstation. After I turn on and off single monitors multiple times, I most of the times get it working.

I have a setup with a Lenovo Thinkpad on a dockingstation. To that dockingstation two monitors are connected by display port. Here's the output of xrandr:

razr@notebook [~]
-> % xrandr
Screen 0: minimum 8 x 8, current 7680 x 1440, maximum 32767 x 32767
eDP1 connected 2560x1440+5120+0 (normal left inverted right x axis y axis) 340mm x 190mm
   2880x1620     59.96 +  50.00
   2560x1600     59.97
   2560x1440     59.95*
   2048x1536     60.00
   1920x1440     60.00
   1856x1392     60.01
   1792x1344     60.01
   2048x1152     60.00    59.90    59.91
   1920x1200     59.88    59.95
   1920x1080     59.96    60.00    59.93
   1600x1200     60.00
   1680x1050     59.95    59.88
   1400x1050     59.98
   1600x900      60.00    59.95    59.82
   1280x1024     60.02
   1400x900      59.96    59.88
   1280x960      60.00
   1440x810      60.00
   1368x768      60.00    59.88    59.85
   1280x800      59.81    59.91
   1280x720      59.86    60.00    59.74
   1024x768      60.00
   1024x576      60.00    59.90    59.82
   960x540       60.00    59.63    59.82
   800x600       60.32    56.25
   864x486       60.00    59.92    59.57
   640x480       59.94
   720x405       59.51    60.00    58.99
   640x360       59.84    59.32    60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP2-1 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 610mm x 350mm
   3840x2160     60.00 +  30.00    29.97
   2560x1440     59.95*
   1920x1080     60.00    59.94
   1680x1050     59.95
   1600x900      60.00
   1280x1024     75.02    60.02
   1440x900      59.89
   1280x800      59.81
   1152x864      75.00
   1280x720      60.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08
DP2-2 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 610mm x 350mm
   3840x2160     60.00 +  30.00    29.97
   2560x1440     59.95*
   1920x1080     60.00    59.94
   1680x1050     59.95
   1600x900      60.00
   1280x1024     75.02    60.02
   1440x900      59.89
   1280x800      59.81
   1152x864      75.00
   1280x720      60.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08
DP2-3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
razr@notebook [~]
-> %

I have no xorg.conf on my system. I have a shell script that is called by lightdm on startup, that checks if those monitors are connected (hence the notebook is on the dockingstation) and if that is the case, executes the following command:

xrandr --output eDP1 --mode "1920x1080" --output DP2-1 --mode auto --left-of eDP1 --output DP2-2 --mode auto --primary --left-of DP2-1

Otherwise it just sets the mode of the notebook display to "1920x1080".

But this does not work at all. I always get an error message like xrandr: Configure crtc 1 failed. I think the number changes from time to time.

I already have some experience with a similar issue at work (seen end of my question) and so I know, that I can, most of the time, fix this by deactivating and reactivating the monitors again and again. I installed arandr for that, because it's made it a little easier to do this over and over again. With only one monitor and the notebook display activated it works all the time. It doesn't matter which monitor is active. Only the two monitors (without the notebook display) does not work.

For my (new) setup at home I cannot get this working. I kind-of to get it working, but only with mode "2560x1440" on both monitors. And this also does not work all the time. Sometimes I have to, again, open arandr and de-/reactivate the monitors randomly to get to a state where it works. I couldn't figure out any pattern there until now. Sometimes I just give up, restart my machine and hope that it works afterwards.

As already stated, I have a pretty similar setup at work, where I do basically the same. At work this works at least when I start my machine on the dockingstation. If I start the machine, then connect it to the dockingstation and run the command above, I get the same error. Here the randomly de-/reactivate the monitors works as well, most of the times.

Has anyone any idea why this happens and how I can fix this?

1

My solution was to suspend/sleep the notebook while still on the dock station and wake it up and then it worked again like a charm.

  • Ok, but I already have a workaround (randomly de- and re-activating the monitors until it works :)). And for my home-setup with 4k resolution I don't even get it to work in the first place. So I would assume, that starting from suspend will not help me there.. – razr Jan 9 at 11:40
0

Try to split your xrandr command into multiple commands like this:

xrandr --output eDP1 --mode "1920x1080" 
xrandr --output DP2-1 --mode auto --left-of eDP1 
xrandr --output DP2-2 --mode auto --primary --left-of DP2-1

It's a work-around.

  • as I cannot comment your post: The problem occurred on my box after adding 'Option "DRI" "2"' to my xorg.conf. This also changed the names of all my displays… Maybe somebody more knowledgeable can explain… – Niklas Nov 30 '18 at 12:55
  • I already had this on my work environment. And I had the same issue with it. On initial startup, when connected to the dockingstation it works, after removing the notebook and putting it back on it doesn't. At home with the 4K setup it does not work at all. – razr Nov 30 '18 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.