Configuring 2 monitors with xrandr

on December 25, 2011. in Software. A 1 minute read.

My current, most used set up, includes a laptop and a second screen attached to it. The laptop is always to the left of the second monitor and together they give one big screen with a total resolution of 3046x1050. From time to time, X11 gets confused and shows the same image, with the same resolution, on both monitors.

The tool which can help fix this is xrandr.

First, query X11 to find out what monitors there are:

$ xrandr -q

Once the monitor IDs are known, this fixes things for me:

$ xrandr --output VGA1 --auto --right-of LVDS1

Where LVDS1 is the laptop’s screen and VGA1 is the second screen.

Happy hackin’!

Tags: monitors, x11, xrandr.

Get the next article to your inbox

If you'd like, you can get the next article I write to your email inbox.