Xrandr

The RandR (Resize and Rotate) Article description::[[X protocol extension and its CLI tool are used to manage screen resolutions, rotation and screens with multiply displays in X]].

With version 1.4 support for multiply graphics cards was introduced, future versions (>1.5) will also support monitors attached via USB (this will probably be merged with xorg-server 1.13 with support for DisplayLink ).

Installation
The package can be installed with the following command:

GUI tools
There are several GUI tools to use. Here is a list of tools supported in Gentoo:


 * – Another XRandR GUI (an independent GUI tool)
 * – LXDE GUI interface to RandR extension

Configuration
A common way to execute X related scripts is the use of or  files in a user's home directory. Put the line of code for in one of these files and it will be executed on every X startup to make settings permanent.

Usage
uses the monitors Extended Display Identification Data (EDID) to identify its capabilities. Faulty hardware might report wrong or bad EDIDs, in those cases it is still possible to use custom made setups by trial and error.

Screen query
Running without any arguments will list all available display output interfaces and display devices along with their current state and capabilities:

A query result contains all available interfaces labeled as. Each shows its connection status and the reported screen modes. The connected device's current mode is hinted by, the preferred mode is hinted by.

The RandR naming scheme for common display interfaces:


 * - Laptop screen
 * - High-Definition Multimedia Interface
 * - Digital Visual Interface
 * - DisplayPort
 * - Video Graphics Array
 * - Composite Video
 * - S-Video

Screen manipulation
It is possible to manipulate output interfaces discovered via a query. Examples of common tasks:


 * Set the primary display if more than one device is attached:




 * Extend to an external display attached on a known interface (left-of, right-of, above, below, same-as):




 * Rotate a display (normal, left, right, inverted):




 * Turn off the device:



Screen modes
A mode always consists of a resolution and a refresh-rate. With a query the hardware reports which modes are supported. It is possible to define own modes in case the hardware reports wrong information. To change the mode for an attached device:

It will use the highest refresh-rate in that mode, to also change the refresh-rate (in Hz):

The changes apply immediately and on the hardware listed above it might either produce an error or the screen goes blank, because 75Hz is not supported. This will last until the next session, using ++ will terminate the session and restart X in case something goes wrong.

To add a 75Hz mode, the tool  can be used to get a proper modeline:

Everything after Modeline needs to be appended to the following command:

Running the query again should list the newly added mode.

External resources

 * xrandr man page