If your external displays not switching on or showing a weird behavior (for e.g. all displays getting the same configuration all the time) you can fix it by switching off all external displays and re-enabling only one in the first step. Afterwards you can apply your whole configuration via xrandr
. This behavior could be a bug in the kernel and may be fixed in linux 4.8.
Example display configuration
Screen 0: minimum 8 x 8, current 5760 x 1200, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 276mm x 155mm
1920x1080 60.00*+ 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 60.00
1280x1024 60.02
1440x900 59.89
1280x960 60.00
1368x768 60.00
1360x768 59.80 59.96
1152x864 60.00
1280x720 60.00
1024x768 60.00
1024x576 60.00
960x540 60.00
800x600 60.32 56.25
864x486 60.00
640x480 59.94
720x405 60.00
640x360 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 primary 1920x1200+3840+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95*+
1920x1080 60.00
1600x1200 60.00
1680x1050 59.95
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 60.00
720x400 70.08
DP2-2 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95*+
1920x1080 60.00
1600x1200 60.00
1680x1050 59.88
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 60.00
720x400 70.08
DP2-3 disconnected (normal left inverted right x axis y axis)
-
disable external displays connected via
DP
xrandr --output DP2-1 --off --output DP2-2 --off
-
enable just one of the external displays
xrandr --output DP2-2 --auto
-
now you can apply your display configuration. in my case it looks like this:
xrandr --output eDP1 --auto --output DP2-2 --auto --primary --pos 1920x0 --right-of eDP1 --output DP2-1 --auto --pos 3840x0 --right-of DP2-2
-
You can stick your commands together and for e.g. apply them with a udev rule when attaching external displays:
xrandr --output DP2-1 --off --output DP2-2 --off && xrandr --output DP2-2 --auto && xrandr --output eDP1 --auto --output DP2-2 --auto --primary --pos 1920x0 --right-of eDP1 --output DP2-1 --auto --pos 3840x0 --right-of DP2-2
Posted by Claus-Theodor Riegg to makandra dev (2016-11-29 10:10)