Xrandr

From regional-training

xrandr is used to inspect and control connected displays - see

problems

Note: On my meta-box LInux laptop the first DP port shows up as HDMI2, the second DP shows up as DP-1. The regular size HDMI is HDMI1 and the internal display is eDP-1 (ask the Chinese motherboard manufacturer why this happens - lol).

displays do not extend properly

You have connected multiple displays but they don't extend properly. This is what happened when I connected two external Phillips monitors, one on the first Display Port and the other on the main HDM connector of my metabox laptop. Note the eDP-1 is my laptop's own display.

  • obtain a list of your displays via
xrandr -q
Screen 0: minimum 320 x 200, current 5760 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    120.00*+  59.93  
   snip ...
   360x200       85.04  
   320x200       85.27  
   320x175       85.27  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  50.00    59.94  
   snip ...
   720x400       70.08  
HDMI-2 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   snip ..
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
  • inform the display manager how I want my three screens run. HDMI-1 is plugged into mini-display port 1, HDMI-2 is plugged into the HDMI port
xrandr --output eDP-1 --auto --primary
xrandr --output HDMI-1 --auto --left-of eDP-1
xrandr --output HDMI-2 --auto --right-of eDP-1

lxpanel on wrong display

  • right click on the lxpanel and set the display

Or locate the task via:

ps auxf | grep lxpanel

Then kill and replace concurrently (will not work unless you do it concurrently):

kill xxx && lxpanel

references

categories