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