Gentoo Archives: gentoo-doc-cvs

From: "Joshua Saddler (nightmorph)" <nightmorph@g.o>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en: xorg-config.xml
Date: Sun, 29 Aug 2010 03:40:07
Message-Id: 20100829033955.3555C2004C@flycatcher.gentoo.org
1 nightmorph 10/08/29 03:39:55
2
3 Modified: xorg-config.xml
4 Log:
5 rewrite X guide for KMS, open-source drivers, and whatnot. inspired by bug 328001.
6
7 Revision Changes Path
8 1.40 xml/htdocs/doc/en/xorg-config.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/xorg-config.xml?rev=1.40&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/xorg-config.xml?rev=1.40&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/xorg-config.xml?r1=1.39&r2=1.40
13
14 Index: xorg-config.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/xorg-config.xml,v
17 retrieving revision 1.39
18 retrieving revision 1.40
19 diff -u -r1.39 -r1.40
20 --- xorg-config.xml 23 May 2010 21:31:50 -0000 1.39
21 +++ xorg-config.xml 29 Aug 2010 03:39:55 -0000 1.40
22 @@ -1,6 +1,6 @@
23 <?xml version='1.0' encoding='UTF-8'?>
24 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
25 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xorg-config.xml,v 1.39 2010/05/23 21:31:50 nightmorph Exp $ -->
26 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/xorg-config.xml,v 1.40 2010/08/29 03:39:55 nightmorph Exp $ -->
27
28 <guide>
29 <title>The X Server Configuration HOWTO</title>
30 @@ -22,8 +22,8 @@
31 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
32 <license/>
33
34 -<version>1.29</version>
35 -<date>2010-05-23</date>
36 +<version>2</version>
37 +<date>2010-08-28</date>
38
39 <chapter>
40 <title>What is the X Window Server?</title>
41 @@ -34,8 +34,8 @@
42 <p>
43 The average user may be frightened at the thought of having to type in commands.
44 Why wouldn't he be able to point and click his way through the freedom provided
45 -by Gentoo (and Linux in general)? Well, *big smile*, of course you are able to
46 -do this. :-) Linux offers a wide variety of flashy user interfaces and
47 +by Gentoo (and Linux in general)? Well, of course you are able to
48 +do this! Linux offers a wide variety of flashy user interfaces and
49 environments which you can install on top of your existing installation.
50 </p>
51
52 @@ -88,15 +88,26 @@
53 <chapter>
54 <title>Installing Xorg</title>
55 <section>
56 -<title>Kernel configuration</title>
57 +<body>
58 +
59 +<p>
60 +Before you can install Xorg, you need to prepare your system for it. First,
61 +we'll set up the kernel to support input devices and video cards. Then we'll
62 +prepare <path>/etc/make.conf</path> so that the right drivers and Xorg packages
63 +are built and installed.
64 +</p>
65 +
66 +</body>
67 +</section>
68 +<section>
69 +<title>Input driver support</title>
70 <body>
71
72 <p>
73 By default, Xorg uses <c>evdev</c>, a generic input driver. You'll need to
74 activate support for <c>evdev</c> by making a change to your kernel
75 -configuration. (Read the
76 -<uri link="/doc/en/kernel-config.xml">Kernel Configuration Guide</uri> if you
77 -don't know how to setup your kernel.)
78 +configuration. Read the <uri link="/doc/en/kernel-config.xml">Kernel
79 +Configuration Guide</uri> if you don't know how to setup your kernel.
80 </p>
81
82 <pre caption="Enabling evdev in the kernel">
83 @@ -108,29 +119,149 @@
84 </body>
85 </section>
86 <section>
87 +<title>Kernel modesetting</title>
88 +<body>
89 +
90 +<p>
91 +Modern open-source video drivers rely on kernel modesetting (KMS). KMS provides
92 +an improved graphical boot with less flickering, faster user switching, a
93 +built-in framebuffer console, seamless switching from the console to Xorg, and
94 +other features. KMS conflicts with legacy framebuffer drivers, which must remain
95 +<b>disabled</b> in your kernel configuration.
96 +</p>
97 +
98 +<p>
99 +First, prepare your kernel for KMS. You need to do this step regardless of which
100 +Xorg video driver you're using.
101 +</p>
102 +
103 +<pre caption="Configuring framebuffers">
104 +Device Drivers ---&gt;
105 + Graphics support ---&gt;
106 + Support for frame buffer devices ---&gt;
107 + <comment>(Disable all drivers, including VGA, Intel, nVidia, and ATI)</comment>
108 +
109 + <comment>(Further down, enable basic console support. KMS uses this.)</comment>
110 + Console display driver support ---&gt;
111 + &lt;*&gt; Framebuffer Console Support
112 +</pre>
113 +
114 +<p>
115 +Next, configure your kernel to use the proper KMS driver for your video card.
116 +Intel, nVidia, and ATI are the most common cards, so follow code listing for
117 +your card below.
118 +</p>
119 +
120 +<p>
121 +For Intel cards:
122 +</p>
123 +
124 +<pre caption="Intel settings">
125 +Device Drivers ---&gt;
126 + Graphics support ---&gt;
127 + /dev/agpgart (AGP Support) ---&gt;
128 + &lt;*&gt; Intel 440LX/BX/GX, I8xx and E7x05 chipset support
129 + Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt;
130 + &lt;*&gt; Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver)
131 + i915 driver
132 + [*] Enable modesetting on intel by default
133 +</pre>
134 +
135 +<p>
136 +For nVidia cards:
137 +</p>
138 +
139 +<pre caption="nVidia settings">
140 +<comment>(Enable DRM)</comment>
141 +Device Drivers ---&gt;
142 + Graphics support ---&gt;
143 + &lt;*&gt; Direct Rendering Manager ---&gt;
144 +
145 +<comment>(Nouveau is currently in the Staging drivers section)</comment>
146 +Device Drivers ---&gt;
147 + Staging drivers ---&gt;
148 + [ ] Exclude Staging drivers from being built
149 + &lt;*&gt; Nouveau (nVidia) cards
150 +</pre>
151 +
152 +<p>
153 +For newer ATI cards (<uri link="/doc/en/ati-faq.xml">RadeonHD 2000 and
154 +up</uri>), you will need to emerge <c>radeon-ucode</c>. Once you have installed
155 +<c>radeon-ucode</c>, configure your kernel as shown:
156 +</p>
157 +
158 +<pre caption="ATI settings">
159 +<comment>(Setup the kernel to use the radeon-ucode firmware)</comment>
160 +Device Drivers ---&gt;
161 + Generic Driver Options ---&gt;
162 + [*] Include in-kernel firmware blobs in kernel binary
163 + <comment># RadeonHD 2000, 3000, and 4000 series cards:</comment>
164 + (radeon/R600_rlc.bin radeon/R700_rlc.bin) External firmware blobs
165 + <comment># RadeonHD 5000, a.k.a Evergreen, and newer cards:</comment>
166 + (radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin
167 + radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin
168 + radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin
169 + radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin
170 + radeon/REDWOOD_rlc.bin) External firmware blobs
171 + (/lib/firmware/) Firmware blobs root directory
172 +
173 +<comment>(Enable Radeon KMS support)</comment>
174 +Device Drivers ---&gt;
175 + Graphics support ---&gt;
176 + &lt;*&gt; Direct Rendering Manager ---&gt;
177 + &lt;*&gt; ATI Radeon
178 + [*] Enable modesetting on radeon by default
179 +</pre>
180 +
181 +<note>
182 +Old Radeon cards (X1900 series and older) don't need the <c>radeon-ucode</c>
183 +package or any firmware configuration. Just enable the Direct Rendering Manager
184 +and ATI Radeon modesetting.
185 +</note>
186 +
187 +<p>
188 +Now that you're done setting up KMS, continue with preparing
189 +<path>/etc/make.conf</path> in the next section.
190 +</p>
191 +
192 +</body>
193 +</section>
194 +<section>
195 <title>make.conf configuration</title>
196 <body>
197
198 <p>
199 -Before you install Xorg, you have to configure two important variables in the
200 -<path>/etc/make.conf</path> file.
201 +Now that your kernel is prepared, you have to configure two important variables
202 +in the <path>/etc/make.conf</path> file before you can install Xorg.
203 </p>
204
205 <p>
206 The first variable is <c>VIDEO_CARDS</c>. This is used to set the video drivers
207 -that you intend to use and is usually based on the kind and brand of card you
208 -have. The most common settings are <c>nvidia</c> for Nvidia cards or
209 -<c>fglrx</c> for ATI Radeon cards. Those are the proprietary drivers from Nvidia
210 -and ATI respectively. If you would like to use the open source nVidia driver,
211 -use <c>nv</c> rather than <c>nvidia</c> in the variable, but bear in mind that
212 -using this driver means no 3D acceleration at all. The free <c>radeon</c> and
213 -<c>radeonhd</c> drivers are available for ATI cards, and are more or less the
214 -equal of the proprietary <c>fglrx</c> driver. The <c>intel</c> driver may be
215 -used for desktops or laptops with common Intel integrated graphics chipsets.
216 -<c>VIDEO_CARDS</c> may contain more than one driver, in this case list of them
217 -should be separated with spaces.
218 +that you intend to use and is usually based on the kind of video card you have.
219 +The most common settings are <c>nouveau</c> for nVidia cards or <c>radeon</c>
220 +for ATI cards. Both have actively developed, well-supported open-source
221 +drivers.
222 </p>
223
224 +<note>
225 +You may also try the proprietary drivers from nVidia and ATI, <c>nvidia</c> and
226 +<c>fglrx</c> respectively. However, setting up the proprietary drivers is
227 +beyond the scope of this guide. Please read the <uri
228 +link="/doc/en/nvidia-guide.xml">Gentoo Linux nVidia Guide</uri> and <uri
229 +link="/doc/en/ati-faq.xml">Gentoo Linux ATI FAQ</uri>. If you don't know which
230 +drivers you should choose, refer to these guides for more information.
231 +</note>
232 +
233 +<p>
234 +The <c>intel</c> driver may be used for desktops or laptops with common Intel
235 +integrated graphics chipsets.
236 +</p>
237 +
238 +<note>
239 +<c>VIDEO_CARDS</c> may contain more than one driver, each separated with a
240 +space.
241 +</note>
242 +
243 <p>
244 The second variable is <c>INPUT_DEVICES</c> and is used to determine which
245 drivers are to be built for input devices. In most cases setting it to
246 @@ -147,43 +278,34 @@
247 <pre caption="Sample make.conf entries">
248 <comment>(For mouse, keyboard, and Synaptics touchpad support)</comment>
249 INPUT_DEVICES="evdev synaptics"
250 -<comment>(For Nvidia cards)</comment>
251 -VIDEO_CARDS="nvidia"
252 +<comment>(For nVidia cards)</comment>
253 +VIDEO_CARDS="nouveau"
254 <comment>(OR, for ATI Radeon cards)</comment>
255 VIDEO_CARDS="radeon"
256 </pre>
257
258 -<note>
259 -More instructions on how to configure nVidia and ATI cards can be found in the
260 -<uri link="/doc/en/nvidia-guide.xml">Gentoo Linux nVidia Guide</uri> and in the
261 -<uri link="/doc/en/ati-faq.xml">Gentoo Linux ATI FAQ</uri>. If you don't know
262 -which drivers you should choose, refer to these guides for more information.
263 -</note>
264 -
265 <p>
266 If the suggested settings don't work for you, you should run <c>emerge -pv
267 -xorg-server</c>, check all the options available and choose those which apply to
268 +xorg-drivers</c>, check all the options available and choose those which apply to
269 your system. This example is for a system with a keyboard, mouse, Synaptics
270 touchpad, and a Radeon video card.
271 </p>
272
273 <pre caption="Displaying all the driver options available">
274 -# <i>emerge -pv xorg-server</i>
275 +# <i>emerge -pv xorg-drivers</i>
276
277 These are the packages that would be merged, in order:
278
279 Calculating dependencies... done!
280 -[ebuild R ] x11-base/xorg-server-1.6.3.901-r2 USE="hal nptl xorg -debug
281 --dmx -ipv6 -kdrive -minimal -sdl -tslib" 0 kB
282 -[ebuild R ] x11-base/xorg-drivers-1.6 INPUT_DEVICES="evdev synaptics
283 --acecad -aiptek -citron -elographics -fpit -hyperpen -joystick -keyboard -mouse
284 --mutouch -penmount -tslib -virtualbox -vmmouse -void -wacom"
285 +[ebuild R ] x11-base/xorg-drivers-1.8 INPUT_DEVICES="evdev synaptics
286 +-acecad -aiptek -elographics% -fpit% -joystick -keyboard -mouse -penmount -tslib
287 +-virtualbox -vmmouse -void -wacom"
288 VIDEO_CARDS="radeon -apm -ark -ast -chips -cirrus -dummy -epson -fbdev -fglrx
289 -(-geode) -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic
290 -(-newport) -nv -nvidia -r128 -radeonhd -rendition -s3 -s3virge -savage
291 +(-geode) -glint -i128 (-i740) (-impact) -intel -mach64 -mga -neomagic (-newport)
292 +-nouveau -nv -nvidia -r128 -radeonhd -rendition -s3 -s3virge -savage
293 -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb)
294 -(-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -vesa -via
295 --virtualbox -vmware (-voodoo) (-xgi)" 0 kB
296 +(-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -via -virtualbox
297 +-vmware (-voodoo) (-xgi)" 0 kB
298 </pre>
299
300 <p>
301 @@ -237,8 +359,8 @@
302 <body>
303
304 <p>
305 -Recent X server versions are designed to work out-of-the-box, with no need to
306 -manually edit Xorg's configuration files.
307 +The X server is designed to work out-of-the-box, with no need to manually edit
308 +Xorg's configuration files.
309 </p>
310
311 <p>
312 @@ -432,7 +554,7 @@
313
314 <p>
315 Now try <c>startx</c> to start up your X server. <c>startx</c> is a script
316 -that executes an <e>X session</e>, that is, it starts the X servers and some
317 +that executes an <e>X session</e>, that is, it starts the X server and some
318 graphical applications on top of it. It decides which applications to run
319 using the following logic:
320 </p>
321 @@ -446,10 +568,11 @@
322 Otherwise, it will read the value of the XSESSION variable and will execute
323 one of the sessions available in <path>/etc/X11/Sessions/</path>
324 accordingly. You can set the value of XSESSION in
325 - <path>/etc/env.d/90xsession</path> to make it a default for all the users on
326 - the system. For example, as root, run <c>echo XSESSION="Xfce4" >
327 + <path>/etc/env.d/90xsession</path> to make it a default for all the users
328 + on the system. For example, as root, run <c>echo XSESSION="Xfce4" >
329 /etc/env.d/90xsession</c>. This will create the <path>90xsession</path> file
330 - and set the default X session to Xfce4.
331 + and set the default X session to <uri
332 + link="/doc/en/xfce-config.xml">Xfce</uri>.
333 </li>
334 </ul>
335
336 @@ -458,7 +581,7 @@
337 </pre>
338
339 <p>
340 -You can kill the X session by using the Ctrl-Alt-Backspace combination. This
341 +You can kill the X session by using the Ctrl-Alt-Backspace key combination. This
342 will, however, make X exit disgracefully -- something that you might not always
343 want.
344 </p>
345 @@ -512,24 +635,25 @@
346 </warn>
347
348 <p>
349 -Now let us change the resolutions. In the next example from
350 -<path>/etc/X11/xorg.conf</path> we add the <c>Modes</c> lines and the
351 -<c>DefaultDepth</c> so that our X server starts with 24 bits at 1440x900 by
352 -default. Don't mind the given strings -- they are examples and will most likely
353 -differ from the settings on your system.
354 -</p>
355 -
356 -<pre caption="Changing the Screen section in /etc/X11/xorg.conf">
357 -Section "Screen"
358 - Identifier "Default Screen"
359 - Device "RadeonHD 4550"
360 - Monitor "Generic Monitor"
361 - <i>DefaultDepth 24</i>
362 - <comment># Skipping some text to improve readability</comment>
363 - SubSection "Display"
364 - Depth 24
365 - <i>Modes "1440x900"</i>
366 - EndSubSection
367 +Now let us change the resolution. In the next example from
368 +<path>/etc/X11/xorg.conf</path> we add the <c>PreferredMode</c> line so that our
369 +X server starts at 1440x900 by default. Don't mind the given strings -- they are
370 +examples and will most likely differ from the settings on your system. However,
371 +the <c>Option</c> in the <c>Device</c> section must match the name of your
372 +monitor (<c>DVI-0</c>), which can be obtained by running <c>xrandr</c>. You'll
373 +need to <c>emerge xrandr</c> just long enough to get this information. The
374 +argument after the monitor name (in the <c>Device</c> section) must match the
375 +<c>Identifier</c> in the <c>Monitor</c> section.
376 +</p>
377 +
378 +<pre caption="Changing the Monitor section in /etc/X11/xorg.conf">
379 +Section "Device"
380 + Identifier "RadeonHD 4550"
381 + Option "Monitor-DVI-0" "DVI screen"
382 +EndSection
383 +Section "Monitor"
384 + Identifier "DVI screen"
385 + Option "PreferredMode" "1440x900"
386 EndSection
387 </pre>
388
389 @@ -573,8 +697,8 @@
390 <p>
391 Run <c>startx</c> and be happy about the result. Congratulations, you now
392 (hopefully) have a working Xorg on your system. The next step is to install a
393 -useful window manager (or even a desktop environment) such as KDE or GNOME, but
394 -that's not part of this guide.
395 +useful window manager or desktop environment such as KDE, GNOME, or
396 +Xfce, but that's not part of this guide.
397 </p>
398
399 </body>
400 @@ -625,9 +749,9 @@
401 </p>
402
403 <p>
404 -If you're upgrading to xorg-server-1.6 from an earlier version, then be sure to
405 -read the <uri
406 -link="/proj/en/desktop/x/x11/xorg-server-1.6-upgrade-guide.xml">migration
407 +If you're upgrading to <c>xorg-server</c> 1.8 from an earlier version, then be
408 +sure to read the <uri
409 +link="/proj/en/desktop/x/x11/xorg-server-1.8-upgrade-guide.xml">migration
410 guide</uri>.
411 </p>