Title: Theory / Unimportant / CS / command line / admin / xrandr
Tags: computer_to_instruction fromCommandLine hasNotNewEffectReturnsMeaning

Instruction: xrandr
Effect: Show each monitors configurations unless there are arguments

Fla: --output foo
Effect: State that the current line configure the output foo
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr

Fla: --mode bar
Effect: State that the screen size is bar
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr --output foo

Fla: --rate bar
Effect: Configure the refresh rate of foo to be bar
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr --output foo

Fla: --auto
Effect: Configure foo to the preferred (maximal) resolution
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr --output foo

Fla: --off
Effect: Turn off the screen foo
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr --output foo

Fla: --left-of bar
Effect: Place foo at the left of bar
Page: https://wiki.archlinux.org/index.php/xrandr
Prefix: xrandr --output foo

Fla: -help
Effect: Print out a summary of the usage and exit.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: --version
Effect: Print out the RandR version reported by the X server and exit.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr
Flag abbreviation: -v

Fla: --verbose
Effect: Causes xrandr to be more verbose. When used with -q (or without other options), xrandr will display more information about the server state. When used along with options that reconfigure the system, progress will be reported while executing the configuration changes.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: --query
Effect: When this option is present, or when no configuration changes are requested, it will display the current state of the system.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr
Flag abbreviation: -q

Fla: --dryrun
Effect: Performs all the actions specified except that no changes are made.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: --nograb
Effect: Apply the modifications without grabbing the screen. It avoids to block other applications during the update but it might also cause some applications that detect screen resize to receive old values.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: -display foo
Effect: This option selects the X display to use. Note this refers to the X screen abstraction, not the monitor (or output).
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr
Flag abbreviation: -d foo

Fla: --screen foo
Effect: This option selects which screen to manipulate. Note this refers to the X screen abstraction, not the monitor (or output).
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: -q1
Effect: Forces the usage of the RandR version 1.1 protocol, even if a higher version is available.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: -q12
Effect: Forces the usage of the RandR version 1.2 protocol, even if the display does not report it as supported or a higher version is available.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: --current
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr
Print: The current screen configuration, without polling for hardware changes.

Fla: --noprimary
Effect: Don't define a primary output.
Page: ftp://www.x.org/pub/X11R7.5/doc/man/man1/xrandr.1.html
Prefix: xrandr

Fla: --transform a,b,c,d,e,f,g,h,i
Effect: Specifies a transformation matrix to apply on the output. Automatically a bilinear filter is selected. The mathematical form corresponds to:
a b c
d e f
g h i The transformation matrix multiplied by a coordinate vector of a pixel of the output (extended to 3 values) gives the approximate coordinate vector of a pixel in the graphic buffer. Typically, a and e corresponds to the scaling on the X and Y axes, c and f corresponds to the tranlastion on those axes, and g, h, and i are respectively 0, 0 and 1. It also allows to express a rotation of an angle T with:
cos T -sin T 0
sin T cos T 0
0 0 1
As a special argument, instead of passing a matrix, one can pass the string none, in which case the default values are used (a unit matrix without filter).
Prefix: xrandr
Context: version 1.3,

Fla: --scale xxy
Effect: Changes the dimensions of the output picture. Values superior to 1 will lead to a compressed screen (screen dimension bigger than the dimension of the output mode), and values below 1 leads to a zoom in on the output. This option is actually a shortcut version of the --transform option.
Prefix: xrandr
Context: version 1.3,

Fla: --primary
Effect: Set the output as primary. It will be sorted first in Xinerama and RANDR geometry requests.These options are only available for X server supporting
Prefix: xrandr
Context: version 1.3,

Fla: --prop, --properties
Effect: This option causes xrandr to display the contents of properties for each output. --verbose also enables --prop.
Prefix: xrandr
Context: Version 1.2

Fla: --fb widthxheight
Effect: Reconfigures the screen to the specified size. All configured monitors must fit within this size. When this option is not provided, xrandr computes the smallest screen size that will hold the set of configured outputs; this option provides a way to override that behaviour.
Prefix: xrandr
Context: Version 1.2

Fla: --fbmm widthxheight
Effect: Sets the reported values for the physical size of the screen. Normally, xrandr resets the reported physical size values to keep the DPI constant. This overrides that computation.
Prefix: xrandr
Context: Version 1.2

Fla: --dpi dpi
Effect: This also sets the reported physical size values of the screen, it uses the specified DPI value to compute an appropriate physical size using whatever pixel size will be set.
Prefix: xrandr
Context: Version 1.2

Fla: --newmode name mode
Effect: New modelines can be added to the server and then associated with outputs. This option does the former. The mode is specified using the ModeLine syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal flags. flags can be zero or more of +HSync, -HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. Several tools permit to compute the usual modeline from a height, width, and refresh rate, for instance you can use cvt.
Prefix: xrandr
Context: Version 1.2

Fla: --rmmode name
Effect: This removes a mode from the server if it is otherwise unused.
Prefix: xrandr
Context: Version 1.2

Fla: --addmode output name
Effect: Add a mode to the set of valid modes for an output.
Prefix: xrandr
Context: Version 1.2

Fla: --delmode output name
Effect: Remove a mode from the set of valid modes for an output.
Prefix: xrandr
Context: Version 1.2

Fla: --output output
Effect: Selects an output to reconfigure. Use either the name of the output or the XID.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --auto
Effect: For connected but disabled outputs, this will enable them using their preferred mode (or, something close to 96dpi if they have no preferred mode). For disconnected but enabled outputs, this will disable them.
Prefix: xrandr per-output
Context: Version 1.2

Fla: --mode mode
Effect: This selects a mode. Use either the name or the XID for mode
Prefix: xrandr
Context: Version 1.2per-output

Fla: --preferred
Effect: This selects the same mode as --auto, but it doesn't automatically enable or disable the output.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --pos xxy
Effect: Position the output within the screen using pixel coordinates. In case reflection or rotation is applied, the translation is applied after the effects.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --rate rate
Effect: This marks a preference for refresh rates close to the specified value, when multiple modes have the same name, this will select the one with the nearest refresh rate.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --reflect xy
Effect: Reflection accross both x and y axises
Prefix: xrandr
Context: Version 1.2per-output

Fla: --rotate normal
Effect: Screen content is not rotated
Prefix: xrandr
Context: Version 1.2per-output
Extra: 'right' specifies a clockwise rotation of the picture and 'left' specifies a counter-clockwise rotation.

Fla: --set property value
Effect: Sets an output property. Integer properties may be specified as a valid (see --prop) decimal or hexadecimal (with a leading 0x) value. Atom properties may be set to any of the valid atoms (see --prop). String properties may be set to any value.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --off
Effect: Disables the output.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --crtc crtc
Effect: Uses the specified crtc (either as an index in the list of CRTCs or XID). In normal usage, this option is not required as xrandr tries to make sensible choices about which crtc to use with each output. When that fails for some reason, this option can override the normal selection.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --gamma red:green:blue
Effect: Set the specified floating point values as gamma correction on the crtc currently attached to this output. Note that you cannot get two different values for cloned outputs and that switching an output to another crtc doesn't change the crtc gamma corrections at all.
RandR version 1.1 options
These options are available for X servers supporting
Prefix: xrandr
Context: Version 1.2per-output

Fla: -s, --size size-index or --size widthxheight
Effect: This sets the screen size, either matching by size or using the index into the list of available sizes.
Prefix: xrandr
Context: version 1.1

Fla: -r, --rate, --refresh rate
Effect: This sets the refresh rate closest to the specified value.
Prefix: xrandr
Context: version 1.1

Fla: -o, --orientation rotation
Effect: This specifies the orientation of the screen, and can be one of normal, inverted, left or right.
-x
Reflect across the X axis.
-y
Reflect across the Y axis.
Prefix: xrandr
Context: version 1.1

Fla: --left-of, --right-of, --above, --below, --same-as another-output
Effect: Use one of these options to position the output relative to the position of another output. This allows convenient tiling of outputs within the screen. The position is always computed relative to the new position of the other output, so it is not valid to say --output a --left-of b --output b --left-of a.
Prefix: xrandr
Context: Version 1.2per-output

Fla: --reflect x
Effect: Reflection accros the x axis
Prefix: xrandr
Context: Version 1.2per-output

Fla: --reflect normal
Effect: No reflection
Prefix: xrandr
Context: Version 1.2per-output

Fla: --rotate right/left
Effect: Screen content is rotated right/left
Prefix: xrandr

Fla: --rotate inverted
Effect: Screen content is rotated 180°
Prefix: xrandr