Change display resolution with `xrandr`

The forgotten tool when a monitor comes up at the wrong resolution or an external display isn't detected at all — output names, modes and rates from one command.

Linuxxrandrx11displayresolutionLow risk
Run `xrandr` alone to list outputs and available modes, then `xrandr --output HDMI-1 --mode 1920x1080 --rate 60` to apply a mode.

01Command

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

02What it does

Bare `xrandr` prints each connected output (e.g. eDP-1, HDMI-1) with star-marked current mode and the mode list — the names are what everyone forgets. `--auto` enables the preferred mode and is also the safest undo. Also forgotten but useful: `xrandr --output HDMI-1 --auto --output eDP-1 --off` to enable only the external screen, and `xrandr --output HDMI-1 --brightness 0.8` for software brightness.

03Risk

RiskLow risk
RequirementsRequires xrandr (x11-xserver-utils on Debian/Ubuntu); X11 sessions only — Wayland needs a compositor tool instead
!Warning: On Wayland sessions xrandr only reports compatibility info — resolution changes must go through your desktop's display settings.

04Undo

Undo
$ xrandr --output HDMI-1 --auto

05Sources

Last verified: 2026-09-17 · Category: Media