Several fatal() were missing \n.
[xorg/xrandr] / 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 .\"
23 .\" $XFree86: xc/programs/xrandr/xrandr.man,v 1.6 2003/06/12 14:12:39 eich Exp $
24 .\"
25 .TH XRANDR __appmansuffix__ __vendorversion__
26 .SH NAME
27 xrandr \- primitive command line interface to RandR extension
28 .SH SYNOPSIS
29 .B "xrandr"
30 [\-help]  [\-display \fIdisplay\fP]
31 [\-q] [\-v]
32 [\-\-verbose]
33 [\-\-dryrun]
34 [\-\-screen \fIsnum\fP]
35 [\-\-q1]
36 [\-\-q12]
37 .br
38 .B RandR version 1.3 options
39 .br
40 .B Per-output options
41 .br
42 [\-\-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]]]]
43 [\-\-scale \fIx\fPx\fIy\fP]
44 [\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP]
45 .br
46 .B RandR version 1.2 options
47 .br
48 [\-\-prop]
49 [\-\-fb \fIwidth\fPx\fIheight\fP]
50 [\-\-fbmm \fIwidth\fPx\fIheight\fP]
51 [\-\-dpi \fIdpi\fP]
52 [\-\-newmode \fIname\fP \fImode\fP]
53 [\-\-rmmode \fIname\fP]
54 [\-\-addmode \fIoutput\fP \fIname\fP]
55 [\-\-delmode \fIoutput\fP \fIname\fP]
56 .br
57 .B Per-output options
58 .br
59 [\-\-output \fIoutput\fP]
60 [\-\-auto]
61 [\-\-mode \fImode\fP]
62 [\-\-preferred]
63 [\-\-pos \fIx\fPx\fIy\fP]
64 [\-\-rate \fIrate\fP]
65 [\-\-reflect \fIreflection\fP]
66 [\-\-rotate \fIorientation\fP]
67 [\-\-left\-of \fIoutput\fP\]
68 [\-\-right\-of \fIoutput\fP\]
69 [\-\-above \fIoutput\fP\]
70 [\-\-below \fIoutput\fP\]
71 [\-\-same-as \fIoutput\fP\]
72 [\-\-set \fIproperty\fP \fIvalue\fP]
73 [\-\-off]
74 [\-\-crtc \fIcrtc\fP]
75 [\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP]
76
77 .br
78 .B RandR version 1.0 and version 1.1 options
79 .br
80 [\-o \fIorientation\fP]
81 [\-s \fIsize\fP]
82 [\-r \fIrate\fP]
83 [\-x] [\-y]
84 .SH DESCRIPTION
85 .I Xrandr
86 is used to set the size, orientation and/or reflection of the outputs for a
87 screen. It can also set the screen size.
88
89 If invoked without any option, it will dump the state of the outputs,
90 showing the existing modes for each of them, with a '+' after the preferred
91 mode and a '*' after the current mode.
92
93 There are a few global options. Other options modify the last output that is
94 specified in earlier parameters in the command line. Multiple outputs may
95 be modified at the same time by passing multiple \-\-output options followed
96 immediately by their corresponding modifying options.
97 .IP \-help
98 Print out a summary of the usage and exit.
99 .IP "\-v, \-\-version"
100 Print out the RandR version reported by the X server and exit.
101 .IP \-\-verbose
102 Causes xrandr to be more verbose. When used with \-q (or without other
103 options), xrandr will display more information about the server state. When
104 used along with options that reconfigure the system, progress will be
105 reported while executing the configuration changes.
106 .IP "\-q, \-\-query"
107 When this option is present, or when no configuration changes are requested,
108 xrandr will display the current state of the system. 
109 .IP "\-\-dryrun"
110 Performs all the actions specified except that no changes are made.
111 .IP "\-d, \-display \fIname\fP"
112 This option selects the X display to use. Note this refers to the X
113 screen abstraction, not the monitor (or output).
114 .IP "\-\-screen \fIsnum\fP"
115 This option selects which screen to manipulate. Note this refers to the X
116 screen abstraction, not the monitor (or output).
117 .IP \-\-q1
118 Forces the usage of the RandR version 1.1 protocol, even if a higher version
119 is available.
120 .IP \-\-q12
121 Forces the usage of the RandR version 1.2 protocol, even if the display does
122 not report it as supported or a higher version is available.
123 .PP
124 .SH "RandR version 1.3 options"
125 .PP
126 Options for RandR 1.3 are used as a superset of the options for RandR 1.2.
127 .PP
128 .B "Per-output options"
129 .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]]]"
130 This option sets the panning parameters.  As soon as panning is
131 enabled, the CRTC position can change with every pointer move.
132 The first four parameters specify the total panning area, the next four the
133 pointer tracking area (which defaults to the same area). The last four
134 parameters specify the border and default to 0. A width or height set to zero
135 disables panning on the according axis. You typically have to set the screen
136 size with \fI--fb\fP simultaneously.
137 .IP "\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP"
138 Specifies a transformation matrix to apply on the output. Automatically a bilinear filter is selected.
139 The mathematical form corresponds to:
140 .RS 
141 .RS 
142 a b c
143 .br
144 d e f
145 .br
146 g h i
147 .RE
148 The transformation matrix multiplied by a coordinate vector of a pixel of the
149 output (extended to 3 values) gives the approximate coordinate vector of a pixel
150 in the graphic buffer. Typically, \fIa\fP and
151 \fIe\fP corresponds to the scaling on the X and Y axes, \fIc\fP and \fIf\fP
152 corresponds to the tranlastion on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
153 are respectively 0, 0 and 1. It also allows to express a rotation of an angle T
154 with:
155 .RS 
156 cos T  -sin T   0
157 .br
158 sin T   cos T   0
159 .br
160  0       0      1
161 .RE
162 As a special argument, instead of
163 passing a matrix, one can pass the string \fInone\fP, in which case the default
164 values are used (a unit matrix without filter).
165 .IP "\-\-scale \fIx\fPx\fIy\fP"
166 Changes the dimensions of the output picture. Values superior to 1 will lead to
167 a compressed screen (screen dimension bigger than the dimension of the output
168 mode), and values below 1 leads to a zoom in on the output. This option is
169 actually a shortcut version of the \fI\-\-transform\fP option.
170 .PP
171 .SH "RandR version 1.2 options"
172 These options are only available for X server supporting RandR version 1.2
173 or newer.
174 .IP "\-\-prop, \-\-properties"
175 This option causes xrandr to display the contents of properties for each
176 output. \-\-verbose also enables \-\-prop.
177 .IP "\-\-fb \fIwidth\fPx\fIheight\fP"
178 Reconfigures the screen to the specified size. All configured monitors must
179 fit within this size. When this option is not provided, xrandr computes the
180 smallest screen size that will hold the set of configured outputs; this
181 option provides a way to override that behaviour.
182 .IP "\-\-fbmm \fIwidth\fPx\fIheight\fP"
183 Sets the reported values for the physical size of the screen. Normally,
184 xrandr resets the reported physical size values to keep the DPI constant.
185 This overrides that computation.
186 .IP "\-\-dpi \fIdpi\fP"
187 This also sets the reported physical size values of the screen, it uses the
188 specified DPI value to compute an appropriate physical size using whatever
189 pixel size will be set.
190 .IP "\-\-newmode \fIname\fP \fImode\fP"
191 New modelines can be added to the server and then associated with outputs.
192 This option does the former. The \fImode\fP is specified using the ModeLine
193 syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart
194 vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync,
195 -HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. Several
196 tools permit to compute the usual modeline from a height, width, and refresh
197 rate, for instance you can use \fBcvt\fR.
198 .IP "\-\-rmmode \fIname\fP"
199 This removes a mode from the server if it is otherwise unused.
200 .IP "\-\-addmode \fIoutput\fP \fIname\fP"
201 Add a mode to the set of valid modes for an output.
202 .IP "\-\-delmode \fIoutput\fP \fIname\fP"
203 Remove a mode from the set of valid modes for an output.
204 .PP
205 .B "Per-output options"
206 .IP "\-\-output \fIoutput\fP"
207 Selects an output to reconfigure. Use either the name of the output or the
208 XID.
209 .IP \-\-auto
210 For connected but disabled outputs, this will enable them using their
211 preferred mode (or, something close to 96dpi if they have no preferred
212 mode). For disconnected but enabled outputs, this will disable them.
213 .IP "\-\-mode \fImode\fP"
214 This selects a mode. Use either the name or the XID for \fImode\fP
215 .IP "\-\-preferred"
216 This selects the same mode as \-\-auto, but it doesn't automatically enable or
217 disable the output.
218 .IP "\-\-pos \fIx\fPx\fIy\fP"
219 Position the output within the screen using pixel coordinates. In case reflection
220 or rotation is applied, the translation is applied after the effects.
221 .IP "\-\-rate \fIrate\fP"
222 This marks a preference for refresh rates close to the specified value, when
223 multiple modes have the same name, this will select the one with the nearest
224 refresh rate.
225 .IP "\-\-reflect \fIreflection\fP"
226 Reflection can be one of 'normal' 'x', 'y' or 'xy'. This causes the output
227 contents to be reflected across the specified axes.
228 .IP "\-\-rotate \fIrotation\fP"
229 Rotation can be one of 'normal', 'left', 'right' or 'inverted'. This causes
230 the output contents to be rotated in the specified direction. 'right' specifies
231 a clockwise rotation of the picture and 'left' specifies a counter-clockwise
232 rotation.
233 .IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as \fIanother-output\fP"
234 Use one of these options to position the output relative to the position of
235 another output. This allows convenient tiling of outputs within the screen.
236 The position is always computed relative to the new position of the other
237 output, so it is not valid to say \-\-output a \-\-left\-of b \-\-output 
238 b \-\-left\-of a.
239 .IP "\-\-set \fIproperty\fP \fIvalue\fP"
240 Sets an output property. Integer properties may be specified as a valid
241 (see \-\-prop) decimal or hexadecimal (with a leading 0x) value. Atom properties
242 may be set to any of the valid atoms (see \-\-prop). String properties may be
243 set to any value.
244 .IP "\-\-off"
245 Disables the output.
246 .IP "\-\-crtc \fIcrtc\fP"
247 Uses the specified crtc (either as an index in the list of CRTCs or XID).
248 In normal usage, this option is not required as xrandr tries to make
249 sensible choices about which crtc to use with each output. When that fails
250 for some reason, this option can override the normal selection.
251 .IP "\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP"
252 Set the specified floating point values as gamma correction on the crtc 
253 currently attached to this output. Note that you cannot get two different values
254 for cloned outputs and that switching an output to another crtc doesn't change
255 the crtc gamma corrections at all.
256 .PP
257 .SH "RandR version 1.1 options"
258 These options are available for X servers supporting RandR version 1.1 or
259 older. They are still valid for newer X servers, but they don't interact
260 sensibly with version 1.2 options on the same command line.
261 .IP "\-s, \-\-size \fIsize-index\fP or \-\-size \fIwidth\fPx\fIheight\fP"
262 This sets the screen size, either matching by size or using the index into
263 the list of available sizes.
264 .IP "\-r, \-\-rate, \-\-refresh \fIrate\fP"
265 This sets the refresh rate closest to the specified value.
266 .IP "\-o, \-\-orientation \fIrotation\fP"
267 This specifies the orientation of the screen,
268 and can be one of normal, inverted, left or right.
269 .IP \-x
270 Reflect across the X axis.
271 .IP \-y
272 Reflect across the Y axis.
273 .SH EXAMPLES
274 Sets an output called LVDS to its preferred mode, and on its right put an
275 output called VGA to preferred mode of a screen which has been physically rotated clockwise:
276 .RS 
277 xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate left --right-of LVDS
278 .RE
279 .PP
280 Forces to use a 1024x768 mode on an output called VGA:
281 .RS 
282 xrandr --newmode "1024x768" 63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync
283 .br
284 xrandr --addmode VGA 1024x768
285 .br
286 xrandr --output VGA --mode 1024x768
287 .RE
288 .PP
289 Enables panning on a 1600x768 desktop while displaying 1024x768 mode on an output called VGA:
290 .RS 
291 xrandr --fb 1600x768 --output VGA --mode 1024x768 --panning 1600x0
292 .RE
293 .PP
294 Have one small 1280x800 LVDS screen showing a small version of a huge 3200x2000 desktop, and have a
295 big VGA screen display the surrounding of the mouse at normal size.
296 .RS 
297 xrandr --fb 3200x2000 --output LVDS --scale 2.5x2.5 --output VGA --pos 0x0 --panning 3200x2000+0+0/3200x2000+0+0/64/64/64/64
298 .RE
299 .SH "SEE ALSO"
300 Xrandr(3), cvt(1)
301 .SH AUTHORS
302 Keith Packard,
303 Open Source Technology Center, Intel Corporation.
304 and
305 Jim Gettys, 
306 Cambridge Research Laboratory, HP Labs, HP.