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