1 |
nightmorph 07/02/18 23:44:24 |
2 |
|
3 |
Modified: dri-howto.xml |
4 |
Log: |
5 |
updated hardware 3D acceleration guide, bug 166818. thanks to dberklhoz for reviewing. |
6 |
|
7 |
Revision Changes Path |
8 |
1.37 xml/htdocs/doc/en/dri-howto.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/dri-howto.xml?rev=1.37&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/dri-howto.xml?rev=1.37&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/dri-howto.xml?r1=1.36&r2=1.37 |
13 |
|
14 |
Index: dri-howto.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v |
17 |
retrieving revision 1.36 |
18 |
retrieving revision 1.37 |
19 |
diff -u -r1.36 -r1.37 |
20 |
--- dri-howto.xml 10 Oct 2006 09:36:49 -0000 1.36 |
21 |
+++ dri-howto.xml 18 Feb 2007 23:44:24 -0000 1.37 |
22 |
@@ -1,5 +1,5 @@ |
23 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.36 2006/10/10 09:36:49 neysx Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.37 2007/02/18 23:44:24 nightmorph Exp $ --> |
26 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
27 |
|
28 |
<guide link="/doc/en/dri-howto.xml"> |
29 |
@@ -12,18 +12,21 @@ |
30 |
<author title="Editor"> |
31 |
<mail link="peesh@g.o">Jorge Paulo</mail> |
32 |
</author> |
33 |
+<author title="Editor"> |
34 |
+ <mail link="nightmorph@g.o">Joshua Saddler</mail> |
35 |
+</author> |
36 |
|
37 |
<abstract> |
38 |
-This document is a guide to getting 3D acceleration working using X11-DRM |
39 |
-with Xorg in Gentoo Linux. |
40 |
+This document is a guide to getting 3D acceleration working using the DRM with |
41 |
+Xorg in Gentoo Linux. |
42 |
</abstract> |
43 |
|
44 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
45 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
46 |
<license/> |
47 |
|
48 |
-<version>1.6</version> |
49 |
-<date>2006-10-10</date> |
50 |
+<version>1.7</version> |
51 |
+<date>2007-02-18</date> |
52 |
|
53 |
<chapter> |
54 |
<title>Introduction</title> |
55 |
@@ -53,11 +56,11 @@ |
56 |
In many cases, both binary and open-source drivers exist. Open-source drivers |
57 |
are preferable since we're using Linux and open source is one of its underlying |
58 |
principles. Sometimes, binary drivers are the only option, like with nVidia's |
59 |
-cards. Binary drivers include x11-drivers/nvidia-drivers and |
60 |
-x11-drivers/nvidia-legacy-drivers for nVidia cards and media-video/ati-drivers |
61 |
-for ATI cards. Other open-source drivers include media-video/kyro-kernel for |
62 |
-KyroII cards and media-video/ati-gatos for ATI cards, which aim to support |
63 |
-ATI's video capabilities more fully. |
64 |
+cards. Binary drivers include <c>x11-drivers/nvidia-drivers</c> and |
65 |
+<c>x11-drivers/nvidia-legacy-drivers</c> for nVidia cards and |
66 |
+<c>x11-drivers/ati-drivers</c> for ATI cards. Other open-source drivers include |
67 |
+<c>media-video/ati-gatos</c> for ATI cards, which aims to support ATI's video |
68 |
+capabilities more fully. |
69 |
</p> |
70 |
|
71 |
</body> |
72 |
@@ -77,12 +80,13 @@ |
73 |
</body> |
74 |
</section> |
75 |
<section> |
76 |
-<title>What is X11-DRM and how does it relate to regular Xorg?</title> |
77 |
+<title>What is the DRM and how does it relate to regular Xorg?</title> |
78 |
<body> |
79 |
|
80 |
<p> |
81 |
-X11-DRM is an <e>enhancement</e> to Xorg that adds 3D acceleration for |
82 |
-cards by adding the kernel module necessary for direct rendering. |
83 |
+The DRM (Direct Rendering Manager) is an <e>enhancement</e> to Xorg that adds 3D |
84 |
+acceleration for cards by adding the kernel module necessary for direct |
85 |
+rendering. |
86 |
</p> |
87 |
|
88 |
</body> |
89 |
@@ -93,11 +97,23 @@ |
90 |
|
91 |
<p> |
92 |
This guide is for people who can't get direct rendering working with just Xorg. |
93 |
-X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 and sis300 |
94 |
-series drivers. VIA card owners should not use <c>x11-drm</c>, but should |
95 |
-instead use the DRI provided in recent kernels (>2.6.13). See the <uri |
96 |
-link="http://dri.freedesktop.org/">DRI homepage</uri> for more info and |
97 |
-documentation. |
98 |
+The DRM works for the following drivers: |
99 |
+</p> |
100 |
+ |
101 |
+<ul> |
102 |
+ <li>3dfx</li> |
103 |
+ <li>i8x0</li> |
104 |
+ <li>matrox</li> |
105 |
+ <li>rage128</li> |
106 |
+ <li>radeon</li> |
107 |
+ <li>mach64</li> |
108 |
+ <li>sis300</li> |
109 |
+ <li>via</li> |
110 |
+</ul> |
111 |
+ |
112 |
+<p> |
113 |
+See the <uri link="http://dri.freedesktop.org/">DRI homepage</uri> for more info |
114 |
+and documentation. |
115 |
</p> |
116 |
|
117 |
</body> |
118 |
@@ -150,33 +166,30 @@ |
119 |
</p> |
120 |
|
121 |
<p> |
122 |
-Most, if not all, kernels should have these options. This was configured using |
123 |
-gentoo-sources-2.4.20-r5. |
124 |
+Most, if not all, kernels should have these options. This was configured using a |
125 |
+standard <c>gentoo-sources</c> kernel. |
126 |
</p> |
127 |
|
128 |
<pre caption="Configuring the kernel"> |
129 |
# <i>ls -l /usr/src/linux </i> |
130 |
-lrwxrwxrwx 1 root root 22 May 29 18:20 /usr/src/linux -> linux-2.4.20-gentoo-r5 |
131 |
+lrwxrwxrwx 1 root root 22 2007-02-14 20:12 /usr/src/linux -> linux-2.6.18-gentoo-r4 |
132 |
<comment>(Make sure /usr/src/linux links to your current kernel.)</comment> |
133 |
# <i>cd /usr/src/linux</i> |
134 |
# <i>make menuconfig</i> |
135 |
</pre> |
136 |
|
137 |
<pre caption="make menuconfig options"> |
138 |
-Processor type and features ---> |
139 |
+Processor type and features ---> |
140 |
<*> MTRR (Memory Type Range Register) support |
141 |
-Character devices ---> |
142 |
-<M> /dev/agpgart (AGP Support) |
143 |
-[M] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support |
144 |
+Device drivers ---> |
145 |
+ Character devices ---> |
146 |
+ <M> /dev/agpgart (AGP Support) |
147 |
+ <comment>(The agpgart option is not present on 64-bit kernels; just choose your chipset support.)</comment> |
148 |
+ <M> Intel 440LX/BX/GX, I8xx and E7x05 support |
149 |
<comment>(Enable your chipset instead of the above.)</comment> |
150 |
-< > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) |
151 |
+ <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) |
152 |
</pre> |
153 |
|
154 |
-<p> |
155 |
-Make sure the Direct Rendering Manager (DRM) is <e>off</e>. |
156 |
-The X11-DRM package will provide its own. |
157 |
-</p> |
158 |
- |
159 |
</body> |
160 |
</section> |
161 |
<section> |
162 |
@@ -184,16 +197,12 @@ |
163 |
<body> |
164 |
|
165 |
<pre caption="Compiling and installing kernel"> |
166 |
-<comment>(This example is for a 2.4 kernel)</comment> |
167 |
-# <i>make dep && make clean bzImage modules modules_install</i> |
168 |
-# <i>mount /boot</i> |
169 |
-# <i>cp arch/i386/boot/bzImage /boot</i> |
170 |
+# <i>make && make modules_install</i> |
171 |
</pre> |
172 |
|
173 |
<p> |
174 |
-If you want your kernel to be named something other than bzImage, be sure to |
175 |
-copy to /boot/yourname instead. Don't forget to set up grub.conf or lilo.conf |
176 |
-and run /sbin/lilo if you use LILO. |
177 |
+Don't forget to set up <path>grub.conf</path> or <path>lilo.conf</path> and run |
178 |
+<c>/sbin/lilo</c> if you use LILO. |
179 |
</p> |
180 |
|
181 |
</body> |
182 |
@@ -201,37 +210,12 @@ |
183 |
</chapter> |
184 |
|
185 |
<chapter> |
186 |
-<title>Install X11-DRM and configure direct rendering</title> |
187 |
-<section> |
188 |
-<title>Install X11-DRM</title> |
189 |
-<body> |
190 |
- |
191 |
-<pre caption="Installing X11-DRM"> |
192 |
-# <i>emerge x11-drm</i> |
193 |
-</pre> |
194 |
- |
195 |
-</body> |
196 |
-</section> |
197 |
+<title>Configure direct rendering</title> |
198 |
<section id="configure_xorg"> |
199 |
<title>Configure Xorg.conf</title> |
200 |
<body> |
201 |
|
202 |
<p> |
203 |
-Some chipsets require you to rebuild <c>xorg-x11</c> with |
204 |
-<c>USE="insecure-drivers"</c>. This applies to mach64, unichrome and savage |
205 |
-chipsets on xorg-x11-6.8.2, and to mach64 and unichrome on xorg-x11-6.8.99.x. |
206 |
-Savage users should not try xorg-x11-6.8.99.x as support for the savage there |
207 |
-is broken. |
208 |
-</p> |
209 |
- |
210 |
-<pre caption="Rebuilding xorg-x11"> |
211 |
-<comment>(Add the insecure-drivers USE flag if you use one of the aforementioned chipsets)</comment> |
212 |
-# <i>echo "x11-base/xorg-x11 insecure-drivers" >> /etc/portage/package.use</i> |
213 |
- |
214 |
-# <i>emerge xorg-x11</i> |
215 |
-</pre> |
216 |
- |
217 |
-<p> |
218 |
Open <path>/etc/X11/xorg.conf</path> with your favorite text editor and edit |
219 |
it to enable DRI and GLX. |
220 |
</p> |
221 |
@@ -246,6 +230,7 @@ |
222 |
... |
223 |
Section "Device" |
224 |
Driver "radeon" |
225 |
+ <comment>(Replace radeon with the name of your driver.)</comment> |
226 |
... |
227 |
EndSection |
228 |
... |
229 |
@@ -254,10 +239,6 @@ |
230 |
EndSection |
231 |
</pre> |
232 |
|
233 |
-<p> |
234 |
-If you are using a different driver, replace "radeon" with yours. |
235 |
-</p> |
236 |
- |
237 |
</body> |
238 |
</section> |
239 |
<section> |
240 |
@@ -303,135 +284,16 @@ |
241 |
direct rendering: Yes |
242 |
<comment>(If it says "No", you don't have 3D acceleration.)</comment> |
243 |
$ <i>glxgears</i> |
244 |
-<comment>(Test your frames per second (FPS) at the default size. The number should be )</comment> |
245 |
-<comment>(significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.)</comment> |
246 |
-</pre> |
247 |
- |
248 |
-</body> |
249 |
-</section> |
250 |
-</chapter> |
251 |
- |
252 |
-<chapter> |
253 |
-<title>Using the CVS sources</title> |
254 |
-<section> |
255 |
-<body> |
256 |
- |
257 |
-<warn> |
258 |
-Don't do this if the package worked. |
259 |
-</warn> |
260 |
- |
261 |
-</body> |
262 |
-</section> |
263 |
-<section> |
264 |
-<title>Do you need the CVS?</title> |
265 |
-<body> |
266 |
- |
267 |
-<p> |
268 |
-First you have to check whether the x11-drm package works. If it doesn't and |
269 |
-you have checked your logs to verify it's not a configuration error, you might |
270 |
-want to consider the CVS sources. There are also daily driver snapshots |
271 |
-available if you do not wish to build the full CVS. |
272 |
-</p> |
273 |
- |
274 |
-</body> |
275 |
-</section> |
276 |
-<section> |
277 |
-<title>Do the CVS sources support your card?</title> |
278 |
-<body> |
279 |
- |
280 |
-<p> |
281 |
-Check the DRI <uri link="http://dri.freedesktop.org/wiki/Status">supported |
282 |
-cards list</uri> to see if the CVS supports your card. Even if it doesn't, but |
283 |
-it supports a similar card, try it. |
284 |
-</p> |
285 |
- |
286 |
-<!-- I see a couple of 8x AGP stuff on the Internet about vanilla 2.4 kernels; |
287 |
- is this now available or not? I've commented it out for the time being, |
288 |
- hoping that this doesn't affect us :) |
289 |
- |
290 |
-<warn> |
291 |
-"Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport |
292 |
-works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only |
293 |
-gotten it to work with vanilla, straight from the tarball (not ebuild)). First |
294 |
-go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It |
295 |
-was on a mailing list somewhere. It doesn't patch cleanly - - one file fails, |
296 |
-the pci_ids.h file, but if you actually read the file and the reject list, it's |
297 |
-very easy to fix. But it does load, and it gives me 1600x1200 with video |
298 |
-(although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on |
299 |
-#gentoo) |
300 |
-</warn> |
301 |
- |
302 |
-<impo> |
303 |
-The patch is a little tricky to work with but <uri |
304 |
-link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's |
305 |
-the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you |
306 |
-may not need the patch. |
307 |
-</impo> |
308 |
---> |
309 |
- |
310 |
-</body> |
311 |
-</section> |
312 |
-<section> |
313 |
-<title>Follow the CVS Instructions</title> |
314 |
-<body> |
315 |
- |
316 |
-<p> |
317 |
-The DRI project has a document about CVS compiling themselves. Please read <uri |
318 |
-link="http://dri.freedesktop.org/wiki/Building">the document</uri> and follow |
319 |
-the instructions up to the <e>Installing for X.org</e> part. |
320 |
-</p> |
321 |
- |
322 |
-</body> |
323 |
-</section> |
324 |
-<section> |
325 |
-<title>Install the CVS</title> |
326 |
-<body> |
327 |
- |
328 |
-<p> |
329 |
-Verify that the DRI kernel module(s) for your system were built: |
330 |
-</p> |
331 |
- |
332 |
-<pre caption="Verification"> |
333 |
-# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel; ls</i> |
334 |
-</pre> |
335 |
- |
336 |
-<p> |
337 |
-For the 3dfx Voodoo, you should see <path>tdfx.o</path>. For the Matrox |
338 |
-G200/G400, you should see <path>mga.o</path>. For the ATI Rage 128, you should |
339 |
-see <path>r128.o</path>. For the ATI Radeon, you should see |
340 |
-<path>radeon.o</path>. For the Intel i810, you should see <path>i810.o</path>. |
341 |
-If the DRI kernel module(s) failed to build, you should verify that you're |
342 |
-using the right version of the Linux kernel. The most recent kernels are not |
343 |
-always supported. |
344 |
-</p> |
345 |
- |
346 |
-<p> |
347 |
-Install over your X.org installation. You may wish to back up xorg-x11. |
348 |
-</p> |
349 |
- |
350 |
-<pre caption="Backing up Xorg"> |
351 |
-# <i>quickpkg xorg-x11</i> |
352 |
-<comment>(This backs up your Xorg-X11 package.)</comment> |
353 |
-# <i>make install</i> |
354 |
+<comment>(Test your frames per second (FPS) at the default size. The number should be |
355 |
+significantly higher than before configuring DRM. Do this while the CPU is as idle as |
356 |
+possible.)</comment> |
357 |
</pre> |
358 |
|
359 |
-<p> |
360 |
-Follow the "Configure Xorg" section above. |
361 |
-</p> |
362 |
- |
363 |
-<p> |
364 |
-To load the appropriate DRM module in your running kernel, copy the kernel |
365 |
-module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then |
366 |
-run <c>modules-update</c> and restart your X server. If you're not running the |
367 |
-kernel you'll be using it in, instead of <c>`uname -r`,</c> use that kernel's |
368 |
-name. |
369 |
-</p> |
370 |
- |
371 |
-<warn> |
372 |
-Make sure you first unload any older DRI kernel modules that might be already |
373 |
-loaded. Note that some DRM modules require that the agpgart module be loaded |
374 |
-first. |
375 |
-</warn> |
376 |
+<note> |
377 |
+FPS may be limited by your screen's refresh rate, so keep this in mind if |
378 |
+<c>glxgears</c> reports only about 70-100 FPS. <c>games-fps/ut2004-demo</c> is a |
379 |
+better benchmarking tool, as it can give you real-world performance results. |
380 |
+</note> |
381 |
|
382 |
</body> |
383 |
</section> |
384 |
@@ -545,25 +407,13 @@ |
385 |
<chapter> |
386 |
<title>Troubleshooting</title> |
387 |
<section> |
388 |
-<title>It doesn't work. I just recompiled my kernel or switched to a new one.</title> |
389 |
-<body> |
390 |
- |
391 |
-<p> |
392 |
-Whenever you rebuild your kernel or switch to another kernel, you'll have to |
393 |
-rebuild the kernel module. Note that you don't need to remerge xorg-x11, but |
394 |
-you will need to remerge x11-drm. |
395 |
-</p> |
396 |
- |
397 |
-</body> |
398 |
-</section> |
399 |
- |
400 |
-<section> |
401 |
<title>It doesn't work. I don't have rendering, and I can't tell why.</title> |
402 |
<body> |
403 |
|
404 |
<p> |
405 |
-Try <c>insmod radeon</c> before you start the X server. Also, try building |
406 |
-agpgart into the kernel instead of as a module. |
407 |
+Try <c>modprobe radeon</c> before you start the X server (replace <c>radeon</c> |
408 |
+with the name of your driver). Also, try building agpgart into the kernel |
409 |
+instead of as a module. |
410 |
</p> |
411 |
|
412 |
</body> |
413 |
@@ -580,34 +430,27 @@ |
414 |
</body> |
415 |
</section> |
416 |
<section> |
417 |
-<title>Direct rendering doesn't work, and in /var/log/Xorg.0.log I have an error about driver version too low.</title> |
418 |
-<body> |
419 |
- |
420 |
-<p> |
421 |
-You aren't using the x11-drm driver. Check if you compiled DRM and the driver |
422 |
-into the kernel; you shouldn't have. |
423 |
-</p> |
424 |
- |
425 |
-</body> |
426 |
-</section> |
427 |
-<section> |
428 |
<title>I have a Radeon, and I want TV-Out.</title> |
429 |
<body> |
430 |
|
431 |
<p> |
432 |
-Check out ati-gatos drivers. <c>emerge -s gatos</c>. |
433 |
+Check out <c>ati-gatos</c> drivers. <c>emerge -av ati-gatos</c>. |
434 |
</p> |
435 |
|
436 |
</body> |
437 |
</section> |
438 |
<section> |
439 |
-<title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title> |
440 |
+<title> |
441 |
+It doesn't work. My card is so incredibly new and cool that it isn't supported |
442 |
+at all. |
443 |
+</title> |
444 |
<body> |
445 |
|
446 |
<p> |
447 |
-Try out the binary drivers. For ati-drivers, a listing is at |
448 |
-<uri>http://www.schneider-digital.de/html/download_ati.php</uri>. If those |
449 |
-don't support it, use fbdev. It's slow, but it works. |
450 |
+Try out the binary drivers. For <c>ati-drivers</c>, a listing is at |
451 |
+<uri>http://ati.amd.com/support/drivers/linux/linux-radeon.html</uri> (for x86) |
452 |
+and at <uri>http://ati.amd.com/support/drivers/linux64/linux64-radeon.html</uri> |
453 |
+(for amd64). If those don't support it, use fbdev. It's slow, but it works. |
454 |
</p> |
455 |
|
456 |
</body> |
457 |
@@ -617,7 +460,7 @@ |
458 |
<body> |
459 |
|
460 |
<p> |
461 |
-In section "Device" enable ForcePCIMode. |
462 |
+Edit <path>/etc/X11/xorg.conf</path>. In section "Device" enable ForcePCIMode. |
463 |
</p> |
464 |
|
465 |
<pre caption="Enabling ForcePCIMode"> |
466 |
|
467 |
|
468 |
|
469 |
-- |
470 |
gentoo-doc-cvs@g.o mailing list |