Running text interspersed with options prevents DocBook translation; remove.
[xorg/xrandr] / man / xrandr.man
1 .\"
2 .\" Copyright 2001 Keith Packard
3 .\"
4 .\" Permission to use, copy, modify, distribute, and sell this software and its
5 .\" documentation for any purpose is hereby granted without fee, provided that
6 .\" the above copyright notice appear in all copies and that both that
7 .\" copyright notice and this permission notice appear in supporting
8 .\" documentation, and that the name of Keith Packard not be used in
9 .\" advertising or publicity pertaining to distribution of the software without
10 .\" specific, written prior permission.  Keith Packard makes no
11 .\" representations about the suitability of this software for any purpose.  It
12 .\" is provided "as is" without express or implied warranty.
13 .\"
14 .\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 .\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 .\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 .\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 .\" DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 .\" PERFORMANCE OF THIS SOFTWARE.
21 .\"
22 .TH XRANDR __appmansuffix__ __vendorversion__
23 .SH NAME
24 xrandr \- primitive command line interface to RandR extension
25 .SH SYNOPSIS
26 .B "xrandr"
27 [\-help]  [\-display \fIdisplay\fP]
28 [\-q] [\-v]
29 [\-\-verbose]
30 [\-\-dryrun]
31 [\-\-screen \fIsnum\fP]
32 [\-\-q1]
33 [\-\-q12]
34 [\-\-current]
35 [\-\-noprimary]
36 [\-\-panning \fIwidth\fPx\fIheight\fP[+\fIx\fP+\fIy\fP[/\fItrack_width\fPx\fItrack_height\fP+\fItrack_x\fP+\fItrack_y\fP[/\fIborder_left\fP/\fIborder_top\fP/\fIborder_right\fP/\fIborder_bottom\fP]]]]
37 [\-\-scale \fIx\fPx\fIy\fP]
38 [\-\-scale-from \fIw\fPx\fIh\fP]
39 [\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP]
40 [\-\-primary]
41 [\-\-prop]
42 [\-\-fb \fIwidth\fPx\fIheight\fP]
43 [\-\-fbmm \fIwidth\fPx\fIheight\fP]
44 [\-\-dpi \fIdpi\fP]
45 [\-\-newmode \fIname\fP \fImode\fP]
46 [\-\-rmmode \fIname\fP]
47 [\-\-addmode \fIoutput\fP \fIname\fP]
48 [\-\-delmode \fIoutput\fP \fIname\fP]
49 [\-\-output \fIoutput\fP]
50 [\-\-auto]
51 [\-\-mode \fImode\fP]
52 [\-\-preferred]
53 [\-\-pos \fIx\fPx\fIy\fP]
54 [\-\-rate \fIrate\fP]
55 [\-\-reflect \fIreflection\fP]
56 [\-\-rotate \fIorientation\fP]
57 [\-\-left\-of \fIoutput\fP\]
58 [\-\-right\-of \fIoutput\fP\]
59 [\-\-above \fIoutput\fP\]
60 [\-\-below \fIoutput\fP\]
61 [\-\-same-as \fIoutput\fP\]
62 [\-\-set \fIproperty\fP \fIvalue\fP]
63 [\-\-off]
64 [\-\-crtc \fIcrtc\fP]
65 [\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP]
66 [\-\-brightness \fIbrightness\fP]
67 [\-o \fIorientation\fP]
68 [\-s \fIsize\fP]
69 [\-r \fIrate\fP]
70 [\-x] [\-y]
71 .SH DESCRIPTION
72 .I Xrandr
73 is used to set the size, orientation and/or reflection of the outputs for a
74 screen. It can also set the screen size.
75
76 If invoked without any option, it will dump the state of the outputs,
77 showing the existing modes for each of them, with a '+' after the preferred
78 mode and a '*' after the current mode.
79
80 There are a few global options. Other options modify the last output that is
81 specified in earlier parameters in the command line. Multiple outputs may
82 be modified at the same time by passing multiple \-\-output options followed
83 immediately by their corresponding modifying options.
84 .IP \-help
85 Print out a summary of the usage and exit.
86 .IP "\-v, \-\-version"
87 Print out the RandR version reported by the X server and exit.
88 .IP \-\-verbose
89 Causes xrandr to be more verbose. When used with \-q (or without other
90 options), xrandr will display more information about the server state. Please
91 note that the gamma and brightness informations are only approximations of the
92 complete color profile stored in the server. When
93 used along with options that reconfigure the system, progress will be
94 reported while executing the configuration changes.
95 .IP "\-q, \-\-query"
96 When this option is present, or when no configuration changes are requested,
97 xrandr will display the current state of the system.
98 .IP "\-\-dryrun"
99 Performs all the actions specified except that no changes are made.
100 .IP "\-\-nograb"
101 Apply the modifications without grabbing the screen. It avoids to block other
102 applications during the update but it might also cause some applications that
103 detect screen resize to receive old values.
104 .IP "\-d, \-display \fIname\fP"
105 This option selects the X display to use. Note this refers to the X
106 screen abstraction, not the monitor (or output).
107 .IP "\-\-screen \fIsnum\fP"
108 This option selects which screen to manipulate. Note this refers to the X
109 screen abstraction, not the monitor (or output).
110 .IP \-\-q1
111 Forces the usage of the RandR version 1.1 protocol, even if a higher version
112 is available.
113 .IP \-\-q12
114 Forces the usage of the RandR version 1.2 protocol, even if the display does
115 not report it as supported or a higher version is available.
116 .PP
117 .SH "RandR version 1.3 options"
118 .PP
119 Options for RandR 1.3 are used as a superset of the options for RandR 1.2.
120 .PP
121 .IP \-\-current
122 Return the current screen configuration, without polling for hardware changes.
123 .IP \-\-noprimary
124 Don't define a primary output.
125 .PP
126 .B "Per-output options"
127 .IP "\-\-panning \fIwidth\fPx\fIheight\fP[+\fIx\fP+\fIy\fP[/\fItrack_width\fPx\fItrack_height\fP+\fItrack_x\fP+\fItrack_y\fP[/\fIborder_left\fP/\fIborder_top\fP/\fIborder_right\fP/\fIborder_bottom\fP]]]"
128 This option sets the panning parameters.  As soon as panning is
129 enabled, the CRTC position can change with every pointer move.
130 The first four parameters specify the total panning area, the next four the
131 pointer tracking area (which defaults to the same area). The last four
132 parameters specify the border and default to 0. A width or height set to zero
133 disables panning on the according axis. You typically have to set the screen
134 size with \fI--fb\fP simultaneously.
135 .IP "\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP"
136 Specifies a transformation matrix to apply on the output. Automatically a bilinear filter is selected.
137 The mathematical form corresponds to:
138 .RS
139 .RS
140 a b c
141 .br
142 d e f
143 .br
144 g h i
145 .RE
146 The transformation is based on homogeneous coordinates. The matrix multiplied
147 by the coordinate vector of a pixel of the output gives the transformed
148 coordinate vector of a pixel in the graphic buffer.  More precisely, the vector
149 .RI "(x y)"
150 of the output pixel is extended to 3 values
151 .RI "(x y w),"
152 with 1 as the w coordinate and multiplied against the matrix. The final device
153 coordinates of the pixel are then calculated with the so-called homogenic
154 division by the transformed w coordinate.  In other words, the device
155 coordinates
156 .RI "(x' y')"
157 of the transformed pixel are:
158 .RS
159 x' = (ax + by + c) / w'   and
160 .br
161 y' = (dx + ey + f) / w'   ,
162 .br
163 with  w' = (gx + hy + i)  .
164 .RE
165 Typically, \fIa\fP and
166 \fIe\fP corresponds to the scaling on the X and Y axes, \fIc\fP and \fIf\fP
167 corresponds to the translation on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
168 are respectively 0, 0 and 1. The matrix can also be used to express more
169 complex transformations such as keystone correction, or rotation.  For a
170 rotation of an angle T, this formula can be used:
171 .RS
172 cos T  -sin T   0
173 .br
174 sin T   cos T   0
175 .br
176  0       0      1
177 .RE
178 As a special argument, instead of
179 passing a matrix, one can pass the string \fInone\fP, in which case the default
180 values are used (a unit matrix without filter).
181 .RE
182 .IP "\-\-scale \fIx\fPx\fIy\fP"
183 Changes the dimensions of the output picture. Values superior to 1 will lead to
184 a compressed screen (screen dimension bigger than the dimension of the output
185 mode), and values below 1 leads to a zoom in on the output. This option is
186 actually a shortcut version of the \fI\-\-transform\fP option.
187 .IP "\-\-scale-from \fIw\fPx\fIh\fP"
188 Specifies the size in pixels of the area of the framebuffer to be displayed on
189 this output.
190 This option is actually a shortcut version of the \fI\-\-transform\fP option.
191 .IP \-\-primary
192 Set the output as primary.
193 It will be sorted first in Xinerama and RANDR geometry requests.
194 .PP
195 .SH "RandR version 1.2 options"
196 These options are only available for X server supporting RandR version 1.2
197 or newer.
198 .IP "\-\-prop, \-\-properties"
199 This option causes xrandr to display the contents of properties for each
200 output. \-\-verbose also enables \-\-prop.
201 .IP "\-\-fb \fIwidth\fPx\fIheight\fP"
202 Reconfigures the screen to the specified size. All configured monitors must
203 fit within this size. When this option is not provided, xrandr computes the
204 smallest screen size that will hold the set of configured outputs; this
205 option provides a way to override that behaviour.
206 .IP "\-\-fbmm \fIwidth\fPx\fIheight\fP"
207 Sets the reported values for the physical size of the screen. Normally,
208 xrandr resets the reported physical size values to keep the DPI constant.
209 This overrides that computation.
210 .IP "\-\-dpi \fIdpi\fP"
211 This also sets the reported physical size values of the screen, it uses the
212 specified DPI value to compute an appropriate physical size using whatever
213 pixel size will be set.
214 .IP "\-\-newmode \fIname\fP \fImode\fP"
215 New modelines can be added to the server and then associated with outputs.
216 This option does the former. The \fImode\fP is specified using the ModeLine
217 syntax for xorg.conf: clock hdisp hsyncstart hsyncend htotal vdisp vsyncstart
218 vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync,
219 -HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. Several
220 tools permit to compute the usual modeline from a height, width, and refresh
221 rate, for instance you can use \fBcvt\fR.
222 .IP "\-\-rmmode \fIname\fP"
223 This removes a mode from the server if it is otherwise unused.
224 .IP "\-\-addmode \fIoutput\fP \fIname\fP"
225 Add a mode to the set of valid modes for an output.
226 .IP "\-\-delmode \fIoutput\fP \fIname\fP"
227 Remove a mode from the set of valid modes for an output.
228 .PP
229 .B "Per-output options"
230 .IP "\-\-output \fIoutput\fP"
231 Selects an output to reconfigure. Use either the name of the output or the
232 XID.
233 .IP \-\-auto
234 For connected but disabled outputs, this will enable them using their
235 preferred mode (or, something close to 96dpi if they have no preferred
236 mode). For disconnected but enabled outputs, this will disable them.
237 .IP "\-\-mode \fImode\fP"
238 This selects a mode. Use either the name or the XID for \fImode\fP
239 .IP "\-\-preferred"
240 This selects the same mode as \-\-auto, but it doesn't automatically enable or
241 disable the output.
242 .IP "\-\-pos \fIx\fPx\fIy\fP"
243 Position the output within the screen using pixel coordinates. In case reflection
244 or rotation is applied, the translation is applied after the effects.
245 .IP "\-\-rate \fIrate\fP"
246 This marks a preference for refresh rates close to the specified value, when
247 multiple modes have the same name, this will select the one with the nearest
248 refresh rate.
249 .IP "\-\-reflect \fIreflection\fP"
250 Reflection can be one of 'normal' 'x', 'y' or 'xy'. This causes the output
251 contents to be reflected across the specified axes.
252 .IP "\-\-rotate \fIrotation\fP"
253 Rotation can be one of 'normal', 'left', 'right' or 'inverted'. This causes
254 the output contents to be rotated in the specified direction. 'right' specifies
255 a clockwise rotation of the picture and 'left' specifies a counter-clockwise
256 rotation.
257 .IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as \fIanother-output\fP"
258 Use one of these options to position the output relative to the position of
259 another output. This allows convenient tiling of outputs within the screen.
260 The position is always computed relative to the new position of the other
261 output, so it is not valid to say \-\-output a \-\-left\-of b \-\-output
262 b \-\-left\-of a.
263 .IP "\-\-set \fIproperty\fP \fIvalue\fP"
264 Sets an output property. Integer properties may be specified as a valid
265 (see \-\-prop) decimal or hexadecimal (with a leading 0x) value. Atom properties
266 may be set to any of the valid atoms (see \-\-prop). String properties may be
267 set to any value.
268 .IP "\-\-off"
269 Disables the output.
270 .IP "\-\-crtc \fIcrtc\fP"
271 Uses the specified crtc (either as an index in the list of CRTCs or XID).
272 In normal usage, this option is not required as xrandr tries to make
273 sensible choices about which crtc to use with each output. When that fails
274 for some reason, this option can override the normal selection.
275 .IP "\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP"
276 Set the specified floating point values as gamma correction on the crtc
277 currently attached to this output. Note that you cannot get two different values
278 for cloned outputs (i.e.: which share the same crtc) and that switching an output to another crtc doesn't change
279 the crtc gamma corrections at all.
280 .IP "\-\-brightness \fIbrightness\fP"
281 Multiply the gamma values on the crtc currently attached to the output to
282 specified floating value. Useful for overly bright or overly dim outputs.
283 However, this is a software only modification, if your hardware has support to
284 actually change the brightness, you will probably prefer to use \fBxbacklight\fR.
285 .PP
286 .SH "RandR version 1.1 options"
287 These options are available for X servers supporting RandR version 1.1 or
288 older. They are still valid for newer X servers, but they don't interact
289 sensibly with version 1.2 options on the same command line.
290 .IP "\-s, \-\-size \fIsize-index\fP or \-\-size \fIwidth\fPx\fIheight\fP"
291 This sets the screen size, either matching by size or using the index into
292 the list of available sizes.
293 .IP "\-r, \-\-rate, \-\-refresh \fIrate\fP"
294 This sets the refresh rate closest to the specified value.
295 .IP "\-o, \-\-orientation \fIrotation\fP"
296 This specifies the orientation of the screen,
297 and can be one of normal, inverted, left or right.
298 .IP \-x
299 Reflect across the X axis.
300 .IP \-y
301 Reflect across the Y axis.
302 .SH EXAMPLES
303 Sets an output called LVDS to its preferred mode, and on its right put an
304 output called VGA to preferred mode of a screen which has been physically rotated clockwise:
305 .RS
306 xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate left --right-of LVDS
307 .RE
308 .PP
309 Forces to use a 1024x768 mode on an output called VGA:
310 .RS
311 xrandr --newmode "1024x768" 63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
312 .br
313 xrandr --addmode VGA 1024x768
314 .br
315 xrandr --output VGA --mode 1024x768
316 .RE
317 .PP
318 Enables panning on a 1600x768 desktop while displaying 1024x768 mode on an output called VGA:
319 .RS
320 xrandr --fb 1600x768 --output VGA --mode 1024x768 --panning 1600x0
321 .RE
322 .PP
323 Have one small 1280x800 LVDS screen showing a small version of a huge 3200x2000 desktop, and have a
324 big VGA screen display the surrounding of the mouse at normal size.
325 .RS
326 xrandr --fb 3200x2000 --output LVDS --scale 2.5x2.5 --output VGA --pos 0x0 --panning 3200x2000+0+0/3200x2000+0+0/64/64/64/64
327 .RE
328 .PP
329 Displays the VGA output in trapezoid shape so that it is keystone corrected
330 when the projector is slightly above the screen:
331 .RS
332 xrandr --fb 1024x768 --output VGA --transform 1.24,0.16,-124,0,1.24,0,0,0.000316,1
333 .RE
334 .SH "SEE ALSO"
335 Xrandr(__libmansuffix__), cvt(__appmansuffix__), xkeystone(__appmansuffix__), xbacklight(__appmansuffix__)
336 .SH AUTHORS
337 Keith Packard,
338 Open Source Technology Center, Intel Corporation.
339 and
340 Jim Gettys,
341 Cambridge Research Laboratory, HP Labs, HP.