TrumanWong

xrandr

X Window System Configuration Management Tool

Supplementary instructions

xrandr command RandR (Rotate and Resize, Rotate and Scale) is an X Window System extension that allows the client to dynamically adjust (i.e. scale, rotate, flip) the screen. xrandr is an official randr extension configuration tool.

grammar

xrandr(options)(parameters)

Options

--auto #Output at the system's maximum resolution
--off #Specify the device to be turned off
--output #Output device
--mode #Set resolution
--rate #Set refresh rate
--right-of #right side of main monitor
--left-of #Left side of main monitor
--above #Above the main monitor
--below #Below the main monitor

Parameters

  • Display device number

Example

Test configuration, listing available devices and their information

xrandr
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
    1920x1080 59.93 + 60.00* 50.00 59.94
    1920x1080i 60.00 50.00 59.94
    1680x1050 59.88
…

clone screen

xrandr --output HDMI-1 --auto

Multi-monitor shutdown is not required

xrandr --output HDMI-1 --off --output HDMI-2 --auto

Specify resolution and refresh rate

xrandr --output HDMI-1 --mode 1920x1080 --rate 60

VGA1 is located on the left side of HDMI1, both use the best resolution and split screen display

xrandr --output VGA1 --auto --output HDMI1 --auto --right-of VGA1