Configure X display resolution
March 5 2017193 words, ~1 min. read
linux, X, display, xrandr
xrandr is a configuration utility for the X Window system; it can be used to set the size, orientation or reflection of the outputs for a screen.
Without any arguments, xrandr will print the current settings.
sbchand@localhost $ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1366x768 60.00*+
1360x768 59.80 59.96
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 800mm x 450mm
1920x1080 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94
1600x1200 60.00
1600x900 59.98
1280x1024 60.02
1280x960 60.00
1280x720 60.00 50.00 59.94
1440x576i 50.00
1024x768 60.00*
1440x480i 60.00 59.94
800x600 60.32
720x576 50.00
720x480 60.00 59.94
640x480 60.00 59.94
DP1 disconnected (normal left inverted right x axis y axis)
In the above, example HDMI1 is connected using 1024x768 (note that the current setting is marked as *). Since HDMI1 supports 1920x1080, use the following command to set the resolution accordingly,
sbchand@localhost $ xrandr --output HDMI1 --mode 1920x1080