This file is indexed.

/usr/share/doc/xorg/howto/use-xrandr.html is in xserver-xorg 1:7.6+12ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.6" />
<title>How to use xrandr</title>
<link rel="stylesheet" href="../xsf.css" type="text/css" />
<script type="text/javascript" src="../asciidoc-xhtml11.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install(2);
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1><a href="../index.html">XSF</a> / How to use xrandr</h1>
<span id="author">Cyril Brulebois</span><br />
<span id="email"><tt>&lt;<a href="mailto:kibi@debian.org">kibi@debian.org</a>&gt;</tt></span><br />
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_getting_started">Getting started</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_what_is_xrandr">What is xrandr?</h3>
<div class="paragraph"><p><tt>xrandr</tt> is a command-line tool to interact with the X <tt>RandR</tt>
extension [see <a href="http://www.x.org/wiki/Projects/XRandR">x.org</a>,
<a href="http://en.wikipedia.org/wiki/RandR">wikipedia</a>], which allows for
live (re)configuration of the X server (<em>i.e.</em> without restarting it):
It provides automatic discovery of modes (resolutions, refresh rates,
etc.) together with the ability to configure outputs dynamically
(resize, rotate, move, etc.).</p></div>
<div class="paragraph"><p><strong>FIXME: Status across drivers?</strong></p></div>
</div>
<div class="sect2">
<h3 id="_what_consequences_for_xorg_conf">What consequences for xorg.conf?</h3>
<div class="paragraph"><p>Starting with <tt>squeeze</tt>, removing the <tt>xorg.conf</tt> configuration file
entirely should work well enough, but in case that doesn’t work out,
let’s document what can be removed from it from a <tt>RandR</tt> point of
view.</p></div>
<div class="paragraph"><p>With the driver detecting modes automatically, several configuration
options become useless most of the time in your configuration file
(xorg.conf). You might want to remove:</p></div>
<div class="ulist"><ul>
<li>
<p>
<tt>HorizSync</tt> and <tt>VertRefresh</tt> from the <tt>Monitor</tt> section.
</p>
</li>
<li>
<p>
Modes from <tt>Display</tt> subsection in <tt>Screen</tt> section.
</p>
</li>
<li>
<p>
<tt>ModeLine</tt> from the <tt>Monitor</tt> section.
</p>
</li>
</ul></div>
<div class="paragraph"><p>There’s also no need to keep static dual-head configuration. Some
suggestions to get a tiny <tt>xorg.conf</tt>:</p></div>
<div class="ulist"><ul>
<li>
<p>
Drop dual <tt>Device</tt>/<tt>Screen</tt>/<tt>Monitor</tt> sections, a single one is
   needed.
</p>
</li>
<li>
<p>
Drop <tt>MonitorLayout</tt> option and <tt>Screen</tt> lines from the remaining
   <tt>Device</tt> section.
</p>
</li>
<li>
<p>
Drop the <tt>ServerLayout</tt> section(s).
</p>
</li>
<li>
<p>
Drop <tt>RightOf</tt>/<tt>LeftOf</tt> indication of the remaining <tt>Screen</tt> line
   in <tt>ServerLayout</tt> section.
</p>
</li>
</ul></div>
<div style="page-break-after:always"></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_basic_xrandr_usage">Basic xrandr usage</h2>
<div class="sectionbody">
<div class="paragraph"><p>Once the configuration file (<tt>xorg.conf</tt>) is removed or updated,
starting the server should enable some outputs by default. Their
top-left corners will be at the same part of the image, but their
modes will probably be different.</p></div>
<div class="paragraph"><p>All outputs may be configured through <tt>xrandr</tt>. To see the available
outputs, just run <tt>xrandr</tt>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1280x800+0+0 inverted X and Y axis (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       59.8*+
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
DVI1 disconnected (normal left inverted right x axis y axis)
TV1 disconnected (normal left inverted right x axis y axis)</tt></pre>
</div></div>
<div class="paragraph"><p>Comments:</p></div>
<div class="ulist"><ul>
<li>
<p>
We see 4 outputs: <tt>VGA1</tt>, <tt>LVDS1</tt>, <tt>DVI1</tt>, <tt>TV1</tt>.
</p>
</li>
<li>
<p>
Only the internal panel (<tt>LVDS1</tt>) is connected and it supports 4
   modes at 60 Hz, 1 mode at 56 Hz.
</p>
</li>
<li>
<p>
The mode marked with a star (<tt>*</tt>) is the current mode.
</p>
</li>
<li>
<p>
The one marked with a plus (<tt>+</tt>) is the preferred one. Most
   monitors report a preferred mode to the driver. And the
   server/driver will generally choose it by default.
</p>
</li>
</ul></div>
<div class="paragraph"><p><strong>FIXME: Mention output name conventions?</strong></p></div>
<div class="paragraph"><p>When manipulating <tt>VGA1</tt> output properties, you should use:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output VGA1 &lt;options&gt;</tt></pre>
</div></div>
<div class="sect2">
<h3 id="_adding_removing_heads_dynamically">Adding/removing heads dynamically</h3>
<div class="paragraph"><p>The old days where you had to restart X when plugging a new monitor
are gone. With <tt>RandR</tt> 1.2, you can plug/unplug monitors whenever you
want. Running the following line will query all outputs and enable
them with their default mode:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --auto</tt></pre>
</div></div>
<div class="paragraph"><p>You may also disable one output using:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output LVDS1 --off</tt></pre>
</div></div>
<div class="paragraph"><p>This may be useful for some buggy application that don’t support
multiple outputs well. Also, due to CRTC limitations (see the Caveats
section below), it is often required to disable one output before
enabling another since most hardware only support 2 at the same time.</p></div>
</div>
<div class="sect2">
<h3 id="_changing_the_mode">Changing the mode</h3>
<div class="paragraph"><p>With the above <tt>xrandr</tt> output, you may change the <tt>LVDS1</tt> mode to
<tt>1024x768</tt> using:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output LVDS1 --mode 1024x768</tt></pre>
</div></div>
<div class="paragraph"><p>The refresh rate may also be changed, either at the same time or
independently:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output LVDS1 --mode 1024x768 --rate 75
$ xrandr --output LVDS1 --rate 75</tt></pre>
</div></div>
<div class="paragraph"><p>To get back to the default mode:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output LVDS1 --auto</tt></pre>
</div></div>
<div style="page-break-after:always"></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_placing_outputs_in_a_virtual_screen">Placing outputs in a virtual screen</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_a_bit_of_configuration_for_non_kms_setups">A bit of configuration for non-KMS setups:</h3>
<div class="paragraph"><p>Let’s have a look at the maximal virtual screen size, we see
<tt>4096x4096</tt> in this example:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr|head -1
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096</tt></pre>
</div></div>
<div class="paragraph"><p>With KMS (<strong>FIXME: Link to a page which explains what KMS is</strong>),
there&#8217;s no need to specify any <tt>Virtual</tt> option. With DRI and without
KMS, that might be needed. Indeed, drivers will often create a default
virtual screen with small dimensions, for instance <tt>1600x1200</tt>, to
reduce memory consumption.</p></div>
<div class="paragraph"><p>If you plan to use multiple outputs displaying different zones, you
should configure your <tt>xorg.conf</tt> by adding a <tt>Virtual</tt> line to the
<tt>Display</tt> subsection in the <tt>Screen</tt> section.</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>Section "Screen"
  …
  SubSection "Display"
    Depth 24
    Virtual 3000 2000
  EndSubSection
EndSection</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_place_outputs">Place outputs</h3>
<div class="paragraph"><p>Outputs are placed using the following options:
<tt>--right-of</tt>/<tt>--left-of</tt>/<tt>--above</tt>/<tt>--below</tt>. For instance, to place
the <tt>VGA1</tt> output virtually-right of the internal panel (<tt>LVDS1</tt>):</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --output VGA1 --right-of LVDS1</tt></pre>
</div></div>
<div class="paragraph"><p>Note that hardware and memory limitations may severely restrict the
size of your virtual screen, see the Caveats section below.</p></div>
<div style="page-break-after:always"></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_adding_new_modes">Adding new modes</h2>
<div class="sectionbody">
<div class="paragraph"><p>Under some circumstances, some modes might be missing. For instance,
if the monitor does not report correct EDID information. Or if the
output didn&#8217;t have a CRTC available at startup because another output
was using it and you disabled it in the meantime.</p></div>
<div class="paragraph"><p>If a mode exist, you may add it to one output with:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --addmode VGA1 800x600</tt></pre>
</div></div>
<div class="paragraph"><p>If the mode does not exist, you may first create it by passing a modeline:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ xrandr --newmode &lt;ModeLine&gt;</tt></pre>
</div></div>
<div class="paragraph"><p>You may create a modeline using the <tt>gtf</tt> or <tt>cvt</tt> tools (shipped in
the <tt>xserver-xorg-core</tt> package).</p></div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2011-06-06 07:22:56 UTC
</div>
</div>
</body>
</html>