Post

Linux Screen Control

Linux Screen Control

Linux Display Management with xrandr

Basic Usage

Get information about available displays and their supported resolutions:

1
2
# List all connected displays and available resolutions
xrandr

Setting Display Resolutions

Configure resolution for specific displays:

1
2
3
4
5
6
7
8
9
10
11
# Set laptop display (eDP) to 1280x720
xrandr --output eDP --mode 1280x720

# Set first HDMI output to 1280x720
xrandr --output HDMI1 --mode 1280x720

# Set laptop display (eDP1) to 1280x720
xrandr --output eDP1 --mode 1280x720

# Set second HDMI output to 1280x1024
xrandr --output HDMI2 --mode 1280x1024

Multi-Monitor Configuration

Set up dual-monitor configurations:

1
2
# Extend desktop to HDMI1 on the right of the laptop display
xrandr --output HDMI1 --mode 1920x1200 --right-of eDP1

Additional Options

Other useful xrandr options:

1
2
3
4
5
6
7
8
9
10
11
# Mirror displays
xrandr --output HDMI1 --same-as eDP1

# Position second monitor above primary
xrandr --output HDMI1 --above eDP1

# Disable a display
xrandr --output HDMI1 --off

# Set primary display
xrandr --output eDP1 --primary
This post is licensed under CC BY 4.0 by the author.