Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


xrandr

Prerequisite(s)

Reference(s)

Table of contents


TODO


Install

Install xandr:

# emerge -a xrandr
# pacman -S xorg-xrandr




Config

Detect devices:

# xrandr -q # to detect devices names and states


Use

  • Turn the specified monitor output on (e.g. HDMI-1) and set the preferred resolution automatically (default to max resolution):

    $ xrandr --output HDMI-1 --auto
    

  • Change the resolution of the specified monitor and change it's refresh rate:

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

  • Duplicate main monitor (e.g. eDP1) to second monitor (e.g. DP1):

    $ xrandr --output DP1 --auto --same-as eDP1 --auto
    

  • Turn off main monitor (e.g. eDP1) but not second monitor (e.g. DP1):

    xrandr --output eDP1 --off --output DP1 --auto
    

  • Turn on main monitor (e.g. eDP1) and second monitor (e.g. DP1):

    xrandr --output eDP1 --primary --auto --output DP1 --right-of eDP1 --auto.
    

xinerama vs xrandr

TODO

Troubleshooting

Cursor not moving

If the cursor moves with startx run as root but not when run as a user:

If not, it might be related to this problem:


If this cheat sheet has been useful to you, then please consider leaving a star here.