1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.19 2005/01/19 14:12:38 swift Exp $ --> |
|
|
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
|
|
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.49 2011/09/11 08:43:18 swift Exp $ --> |
4 | |
4 | |
5 | <guide link="/doc/en/dri-howto.xml"> |
5 | <guide> |
6 | <title>Hardware 3D Acceleration Guide</title> |
6 | <title>Hardware 3D Acceleration Guide</title> |
|
|
7 | |
7 | <author title="Author"> |
8 | <author title="Author"> |
8 | <mail link="spyderous@gentoo.org">Donnie Berkholz</mail> |
9 | <mail link="dberkholz"/> |
9 | </author> |
10 | </author> |
10 | <author title="Editor"> |
11 | <author title="Editor"> |
11 | <mail link="peesh@gentoo.org">Jorge Paulo</mail> |
12 | <mail link="peesh"/> |
12 | </author> |
13 | </author> |
|
|
14 | <author title="Editor"> |
|
|
15 | <mail link="nightmorph"/> |
|
|
16 | </author> |
13 | |
17 | |
14 | <abstract> |
18 | <abstract> |
15 | This document is a guide to getting 3D acceleration working using X11-DRM |
19 | This document is a guide to getting 3D acceleration working using the DRM with |
16 | with Xorg in Gentoo Linux. |
20 | Xorg in Gentoo Linux. |
17 | </abstract> |
21 | </abstract> |
18 | |
22 | |
|
|
23 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
|
|
24 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
19 | <license/> |
25 | <license/> |
20 | |
26 | |
21 | <version>1.0.8</version> |
27 | <version>5</version> |
22 | <date>2005-01-19</date> |
28 | <date>2011-09-11</date> |
23 | |
29 | |
24 | <chapter> |
30 | <chapter> |
25 | <title>Introduction</title> |
31 | <title>Introduction</title> |
26 | <section> |
32 | <section> |
27 | <title>What is hardware 3D acceleration and why do I want it?</title> |
33 | <title>What is hardware 3D acceleration and why do I want it?</title> |
28 | <body> |
34 | <body> |
29 | |
35 | |
30 | <p> |
36 | <p> |
31 | With hardware 3D acceleration, three-dimensional rendering uses the graphics |
37 | With hardware 3D acceleration, three-dimensional rendering uses the graphics |
32 | processor on your video card instead of taking up valuable CPU resources |
38 | processor on your video card instead of taking up valuable CPU resources |
33 | drawing 3D images. It's also referred to as "hardware acceleration" instead of |
39 | drawing 3D images. It's also referred to as "hardware acceleration" instead of |
34 | "software acceleration" because without this 3D acceleration your CPU is forced |
40 | "software acceleration" because without this 3D acceleration your CPU is forced |
35 | to draw everything itself using the Mesa software rendering libraries, which |
41 | to draw everything itself using the Mesa software rendering libraries, which |
36 | takes up quite a bit of processing power. While Xorg typically supports 2D |
42 | takes up quite a bit of processing power. While Xorg typically supports 2D |
37 | hardware acceleration, it often lacks hardware 3D acceleration. |
43 | hardware acceleration, it often lacks hardware 3D acceleration. |
38 | Three-dimensional hardware acceleration is valuable in situations requiring |
44 | Three-dimensional hardware acceleration is valuable in situations requiring |
39 | rendering of 3D objects such as games, 3D CAD and modeling. |
45 | rendering of 3D objects such as games, 3D CAD and modeling. |
40 | </p> |
46 | </p> |
41 | |
47 | |
42 | </body> |
48 | </body> |
43 | </section> |
49 | </section> |
44 | <section> |
50 | <section> |
45 | <title>How do I get hardware 3D acceleration?</title> |
51 | <title>How do I get hardware 3D acceleration?</title> |
46 | <body> |
52 | <body> |
47 | |
53 | |
48 | <p> |
54 | <p> |
49 | In many cases, both binary and open-source drivers exist. Open-source drivers |
55 | In many cases, both binary and open-source drivers exist. Open source drivers |
50 | are preferable since we're using Linux and open source is one of its underlying |
56 | are preferable since we're using Linux and open source is one of its underlying |
51 | principles. Sometimes, binary drivers are the only option, like with nVidia's |
57 | principles. Sometimes, binary drivers are the only option, especially if your |
52 | cards. Binary drivers include media-video/nvidia-kernel and |
58 | graphics card is so new that open source drivers have not yet been written to |
53 | media-video/nvidia-glx for nVidia cards, media-video/mgavideo for Matrox cards |
59 | support its features. Binary drivers include <c>x11-drivers/nvidia-drivers</c> |
54 | and media-video/ati-drivers for ATI cards. Other open-source drivers include |
60 | for nVidia cards and <c>x11-drivers/ati-drivers</c> for AMD/ATI cards. |
55 | media-video/kyro-kernel for KyroII cards and media-video/ati-gatos for ATI |
|
|
56 | cards, which aim to support ATI's video capabilities more fully. |
|
|
57 | </p> |
61 | </p> |
58 | |
62 | |
59 | </body> |
63 | </body> |
60 | </section> |
64 | </section> |
61 | <section> |
65 | <section> |
62 | <title>What is DRI?</title> |
66 | <title>What is DRI?</title> |
63 | <body> |
67 | <body> |
64 | |
68 | |
65 | <p> |
69 | <p> |
66 | The Direct Rendering Infrastructure (<uri |
70 | The <uri link="http://dri.freedesktop.org/wiki/">Direct Rendering |
67 | link="http://dri.sourceforge.net">dri.sourceforge.net</uri>), also known as the |
71 | Infrastructure</uri>, also known as the DRI, is a framework for allowing direct |
68 | DRI, is a framework for allowing direct access to graphics hardware in a safe |
72 | access to graphics hardware in a safe and efficient manner. It includes changes |
69 | and efficient manner. It includes changes to the X server, to several client |
73 | to the X server, to several client libraries and to the kernel. The first major |
70 | libraries and to the kernel. The first major use for the DRI is to create fast |
74 | use for the DRI is to create fast OpenGL implementations. |
71 | OpenGL implementations. |
|
|
72 | </p> |
75 | </p> |
73 | |
76 | |
74 | </body> |
77 | </body> |
75 | </section> |
|
|
76 | <section> |
78 | </section> |
|
|
79 | <section> |
77 | <title>What is X11-DRM and how does it relate to regular Xorg?</title> |
80 | <title>What is the DRM and how does it relate to regular Xorg?</title> |
78 | <body> |
81 | <body> |
79 | |
82 | |
80 | <p> |
83 | <p> |
81 | X11-DRM is an <e>enhancement</e> to Xorg that adds 3D acceleration for |
84 | The DRM (Direct Rendering Manager) is an <e>enhancement</e> to Xorg that adds 3D |
82 | cards by adding the kernel module necessary for direct rendering. |
85 | acceleration for cards by adding the kernel module necessary for direct |
|
|
86 | rendering. |
83 | </p> |
87 | </p> |
84 | |
88 | |
85 | </body> |
89 | </body> |
86 | </section> |
90 | </section> |
87 | <section> |
91 | <section> |
88 | <title>Purpose</title> |
92 | <title>Purpose</title> |
89 | <body> |
93 | <body> |
90 | |
94 | |
91 | <p> |
95 | <p> |
92 | This guide is for people who can't get direct rendering working with just |
96 | This guide is for people who can't get direct rendering working with just Xorg. |
93 | Xorg. X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 |
97 | The DRM works for the following drivers: |
94 | and sis300 series drivers. See the <uri |
98 | </p> |
95 | link="http://dri.sourceforge.net">DRI homepage</uri> for more info and |
99 | |
|
|
100 | <ul> |
|
|
101 | <li>3dfx</li> |
|
|
102 | <li>intel</li> |
|
|
103 | <li>matrox</li> |
|
|
104 | <li>nouveau</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 |
96 | documentation. |
114 | and documentation. |
97 | </p> |
|
|
98 | |
|
|
99 | </body> |
|
|
100 | </section> |
|
|
101 | <section> |
|
|
102 | <title>Feedback</title> |
|
|
103 | <body> |
|
|
104 | |
|
|
105 | <p> |
|
|
106 | With suggestions, questions, etc., e-mail <mail |
|
|
107 | link="spyderous@gentoo.org">Donnie Berkholz</mail>. |
|
|
108 | </p> |
115 | </p> |
109 | |
116 | |
110 | </body> |
117 | </body> |
111 | </section> |
118 | </section> |
112 | </chapter> |
119 | </chapter> |
… | |
… | |
133 | </p> |
140 | </p> |
134 | |
141 | |
135 | <pre caption="Checking your AGP chipset"> |
142 | <pre caption="Checking your AGP chipset"> |
136 | # <i>emerge pciutils; lspci | grep AGP</i> |
143 | # <i>emerge pciutils; lspci | grep AGP</i> |
137 | # <i>00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)</i> |
144 | # <i>00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)</i> |
138 | <codenote>Your output may not match the above due to different hardware.</codenote> |
145 | <comment>(Your output may not match the above due to different hardware.)</comment> |
139 | </pre> |
146 | </pre> |
140 | |
147 | |
141 | <p> |
148 | <p> |
142 | If your chipset is not supported by the kernel you might have some succes by |
149 | If your chipset is not supported by the kernel you might have some succes by |
143 | passing <c>agp=try_unsupported</c> as a kernel parameter. This will use Intel's |
150 | passing <c>agp=try_unsupported</c> as a kernel parameter. This will use Intel's |
144 | generic routines for AGP support. To add this parameter, edit your bootloader |
151 | generic routines for AGP support. To add this parameter, edit your bootloader |
145 | configuration file! |
152 | configuration file! |
146 | </p> |
153 | </p> |
147 | |
154 | |
148 | <p> |
155 | <p> |
149 | Most, if not all, kernels should have these options. This was configured using |
156 | Most, if not all, kernels should have these options. This was configured using a |
150 | gentoo-sources-2.4.20-r5. |
157 | standard <c>gentoo-sources</c> kernel. |
151 | </p> |
158 | </p> |
152 | |
159 | |
153 | <pre caption="Configuring the kernel"> |
160 | <pre caption="Configuring the kernel"> |
154 | # <i>ls -l /usr/src/linux </i> |
161 | # <i>ls -l /usr/src/linux </i> |
155 | lrwxrwxrwx 1 root root 22 May 29 18:20 /usr/src/linux -> linux-2.4.20-gentoo-r5 |
162 | lrwxrwxrwx 1 root root 22 2007-02-14 20:12 /usr/src/linux -> linux-2.6.18-gentoo-r4 |
156 | <codenote>Make sure /usr/src/linux links to your current kernel.</codenote> |
163 | <comment>(Make sure /usr/src/linux links to your current kernel.)</comment> |
157 | # <i>cd /usr/src/linux</i> |
164 | # <i>cd /usr/src/linux</i> |
158 | # <i>make menuconfig</i> |
165 | # <i>make menuconfig</i> |
159 | </pre> |
166 | </pre> |
160 | |
167 | |
161 | <pre caption="make menuconfig options"> |
168 | <pre caption="make menuconfig options"> |
162 | Processor type and features ---> |
169 | Processor type and features ---> |
163 | <*> MTRR (Memory Type Range Register) support |
170 | <*> MTRR (Memory Type Range Register) support |
164 | Character devices ---> |
171 | Device drivers ---> |
|
|
172 | Graphics support ---> |
165 | <M> /dev/agpgart (AGP Support) |
173 | <M> /dev/agpgart (AGP Support) ---> |
166 | [*] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support |
174 | <comment>(The agpgart option is not present on 64-bit kernels; just choose your chipset support.)</comment> |
|
|
175 | <M> Intel 440LX/BX/GX, I8xx and E7x05 support |
167 | <codenote>Enable your chipset instead of the above.</codenote> |
176 | <comment>(Enable your chipset instead of the above.)</comment> |
168 | [ ] Direct Rendering Manager (XFree86 DRI support) |
177 | <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> |
169 | </pre> |
178 | <M> <comment>(Select your graphics card from the list)</comment> |
170 | |
|
|
171 | <p> |
|
|
172 | Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The X11-DRM |
|
|
173 | package will provide its own. |
|
|
174 | </p> |
179 | </pre> |
175 | |
180 | |
176 | </body> |
181 | </body> |
177 | </section> |
182 | </section> |
178 | <section> |
183 | <section> |
179 | <title>Compile and install your kernel</title> |
184 | <title>Compile and install your kernel</title> |
180 | <body> |
185 | <body> |
181 | |
186 | |
182 | <pre caption="Compiling and installing kernel"> |
187 | <pre caption="Compiling and installing kernel"> |
183 | # <i>make dep && make clean bzImage modules modules_install</i> |
188 | # <i>make && make modules_install</i> |
184 | # <i>mount /boot</i> |
|
|
185 | # <i>cp arch/i386/boot/bzImage /boot</i> |
|
|
186 | </pre> |
189 | </pre> |
187 | |
190 | |
188 | <p> |
|
|
189 | If you want your kernel to be named something other than bzImage, be sure to |
|
|
190 | copy to /boot/yourname instead. Don't forget to set up grub.conf or lilo.conf |
|
|
191 | and run /sbin/lilo if you use LILO. |
|
|
192 | </p> |
191 | <p> |
|
|
192 | Don't forget to set up <path>grub.conf</path> or <path>lilo.conf</path> and run |
|
|
193 | <c>/sbin/lilo</c> if you use LILO. |
|
|
194 | </p> |
193 | |
195 | |
194 | </body> |
196 | </body> |
195 | </section> |
|
|
196 | </chapter> |
|
|
197 | |
|
|
198 | <chapter> |
|
|
199 | <title>Install X11-DRM and configure direct rendering</title> |
|
|
200 | <section> |
197 | </section> |
201 | <title>Install X11-DRM</title> |
|
|
202 | <body> |
|
|
203 | |
|
|
204 | <pre caption="Installing X11-DRM"> |
|
|
205 | # <i>emerge x11-drm</i> |
|
|
206 | </pre> |
|
|
207 | |
|
|
208 | </body> |
|
|
209 | </section> |
198 | <section> |
|
|
199 | <title>Add your user to the video group</title> |
|
|
200 | <body> |
|
|
201 | |
|
|
202 | <p> |
|
|
203 | Next, add your user(s) to the video group, as explained in the <uri |
|
|
204 | link="/doc/en/handbook">handbook</uri>: |
|
|
205 | </p> |
|
|
206 | |
|
|
207 | <pre caption="Adding a user to the video group"> |
|
|
208 | # <i>gpasswd -a username video</i> |
|
|
209 | </pre> |
|
|
210 | |
|
|
211 | </body> |
210 | <section> |
212 | </section> |
|
|
213 | </chapter> |
|
|
214 | |
|
|
215 | <chapter> |
|
|
216 | <title>Configure direct rendering</title> |
|
|
217 | <section id="configure_xorg"> |
211 | <title>Configure Xorg.conf</title> |
218 | <title>Configure Xorg</title> |
212 | <body> |
219 | <body> |
213 | |
220 | |
214 | <p> |
|
|
215 | Open <path>/etc/X11/xorg.conf</path> with your favorite text editor and edit |
|
|
216 | it to enable DRI and GLX. |
|
|
217 | </p> |
221 | <p> |
|
|
222 | Hopefully just adding your user to the <c>video</c> group is sufficient to |
|
|
223 | enable direct rendering. However, you may also need to create a file in |
|
|
224 | <path>/etc/X11/xorg.conf.d/</path>. You can name it anything you like; just make |
|
|
225 | sure it ends in <path>.conf</path>. Open up your favorite text editor and create |
|
|
226 | a file with this inside it: |
|
|
227 | </p> |
218 | |
228 | |
219 | <pre caption="xorg.conf"> |
229 | <pre caption="/etc/X11/xorg.conf.d/10-dri.conf"> |
220 | ... |
|
|
221 | Section "Module" |
|
|
222 | Load "dri" |
|
|
223 | Load "glx" |
|
|
224 | ... |
|
|
225 | EndSection |
|
|
226 | ... |
|
|
227 | Section "Device" |
230 | Section "Device" |
228 | Driver "radeon" |
231 | Driver "radeon" |
229 | ... |
232 | <comment>(Replace radeon with the name of your driver.)</comment> |
230 | EndSection |
233 | EndSection |
231 | ... |
|
|
232 | Section "dri" |
234 | Section "dri" |
233 | Mode 0666 |
235 | Mode 0666 |
234 | EndSection |
236 | EndSection |
235 | </pre> |
237 | </pre> |
236 | |
238 | |
237 | <p> |
239 | </body> |
238 | If you are using a different driver, replace "radeon" with yours. |
240 | </section> |
|
|
241 | <section> |
|
|
242 | <title>Changes to /etc/conf.d/modules</title> |
|
|
243 | <body> |
|
|
244 | |
239 | </p> |
245 | <p> |
|
|
246 | You will need to add the module name that your card uses to |
|
|
247 | <path>/etc/conf.d/modules</path> to ensure that the module is |
|
|
248 | loaded automatically when the system starts up. |
|
|
249 | </p> |
|
|
250 | |
|
|
251 | <pre caption="Editing /etc/conf.d/modules"> |
|
|
252 | <comment>(Change module name as required.)</comment> |
|
|
253 | modules="<i>intel-agp</i>" |
|
|
254 | </pre> |
|
|
255 | |
|
|
256 | <note> |
|
|
257 | If you compiled <c>agpgart</c> as a module, you will also need to add it to |
|
|
258 | <path>/etc/conf.d/modules</path>. |
|
|
259 | </note> |
240 | |
260 | |
241 | </body> |
261 | </body> |
242 | </section> |
262 | </section> |
243 | </chapter> |
263 | </chapter> |
244 | |
264 | |
… | |
… | |
247 | <section> |
267 | <section> |
248 | <title>Reboot to the new kernel</title> |
268 | <title>Reboot to the new kernel</title> |
249 | <body> |
269 | <body> |
250 | |
270 | |
251 | <p> |
271 | <p> |
252 | Reboot your computer to your new kernel. It's time to see if you have direct |
272 | Reboot your computer to your new kernel and login as a normal user. It's time to |
253 | rendering and how good it is. |
273 | see if you have direct rendering and how good it is. <c>glxinfo</c> and |
|
|
274 | <c>glxgears</c> are part of the <c>mesa-progs</c> package, so make sure it is |
|
|
275 | installed before you attempt to run these commands. |
254 | </p> |
276 | </p> |
255 | |
277 | |
256 | <pre caption="Testing rendering"> |
278 | <pre caption="Testing rendering"> |
257 | # <i>startx</i> |
279 | $ <i>startx</i> |
258 | <codenote>No need to load modules for your driver or agpgart, if you compiled agpgart as a module.</codenote> |
280 | <comment>(No need to load modules for your driver or agpgart, even if you compiled them as a module.)</comment> |
259 | <codenote>They will be loaded automatically.</codenote> |
281 | <comment>(They will be loaded automatically.)</comment> |
260 | # <i>glxinfo | grep rendering</i> |
282 | $ <i>glxinfo | grep rendering</i> |
261 | direct rendering: Yes |
283 | direct rendering: Yes |
262 | <codenote>If it says "No," you don't have 3D acceleration.</codenote> |
284 | <comment>(If it says "No", you don't have 3D acceleration.)</comment> |
263 | # <i>glxgears</i> |
285 | $ <i>glxgears</i> |
264 | <codenote>Test your frames per second (FPS) at the default size. The number should be </codenote> |
286 | <comment>(Test your frames per second (FPS) at the default size. The number should be |
265 | <codenote>significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.</codenote> |
287 | significantly higher than before configuring DRM. Do this while the CPU is as idle as |
|
|
288 | possible.)</comment> |
266 | </pre> |
289 | </pre> |
267 | |
290 | |
268 | </body> |
291 | <note> |
269 | </section> |
292 | FPS may be limited by your screen's refresh rate, so keep this in mind if |
270 | </chapter> |
293 | <c>glxgears</c> reports only about 70-100 FPS. <c>games-fps/ut2004-demo</c> or |
|
|
294 | other 3D games are better benchmarking tools, as they give you real-world |
|
|
295 | performance results. |
|
|
296 | </note> |
271 | |
297 | |
272 | <chapter> |
298 | </body> |
273 | <title>Using the CVS sources</title> |
|
|
274 | <section> |
299 | </section> |
275 | <body> |
|
|
276 | |
|
|
277 | <warn> |
|
|
278 | Don't do this if the package worked. |
|
|
279 | </warn> |
|
|
280 | |
|
|
281 | </body> |
|
|
282 | </section> |
|
|
283 | <section> |
|
|
284 | <title>Do you need the CVS?</title> |
|
|
285 | <body> |
|
|
286 | |
|
|
287 | <p> |
|
|
288 | First you have to check whether the x11-drm package works. If it doesn't and |
|
|
289 | you have checked your logs to verify it's not a configuration error, you might |
|
|
290 | want to consider the CVS sources. There are also daily driver snapshots |
|
|
291 | available if you do not wish to build the full CVS. |
|
|
292 | </p> |
|
|
293 | |
|
|
294 | </body> |
|
|
295 | </section> |
|
|
296 | <section> |
|
|
297 | <title>Do the CVS sources support your card?</title> |
|
|
298 | <body> |
|
|
299 | |
|
|
300 | <p> |
|
|
301 | Check the DRI <uri |
|
|
302 | link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Status">supported cards |
|
|
303 | list</uri> to see if the CVS supports your card. Even if it doesn't, but it |
|
|
304 | supports a similar card, try it. |
|
|
305 | </p> |
|
|
306 | |
|
|
307 | <!-- I see a couple of 8x AGP stuff on the Internet about vanilla 2.4 kernels; |
|
|
308 | is this now available or not? I've commented it out for the time being, |
|
|
309 | hoping that this doesn't affect us :) |
|
|
310 | |
|
|
311 | <warn> |
|
|
312 | "Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport |
|
|
313 | works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only |
|
|
314 | gotten it to work with vanilla, straight from the tarball (not ebuild)). First |
|
|
315 | go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It |
|
|
316 | was on a mailing list somewhere. It doesn't patch cleanly - - one file fails, |
|
|
317 | the pci_ids.h file, but if you actually read the file and the reject list, it's |
|
|
318 | very easy to fix. But it does load, and it gives me 1600x1200 with video |
|
|
319 | (although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on |
|
|
320 | #gentoo) |
|
|
321 | </warn> |
|
|
322 | |
|
|
323 | <impo> |
|
|
324 | The patch is a little tricky to work with but <uri |
|
|
325 | link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's |
|
|
326 | the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you |
|
|
327 | may not need the patch. |
|
|
328 | </impo> |
|
|
329 | --> |
|
|
330 | |
|
|
331 | </body> |
|
|
332 | </section> |
|
|
333 | <section> |
|
|
334 | <title>Follow the CVS Instructions</title> |
|
|
335 | <body> |
|
|
336 | |
|
|
337 | <p> |
|
|
338 | The DRI project has a document about CVS compiling themselves. Please read <uri |
|
|
339 | link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Building">the document</uri> |
|
|
340 | and follow the instructions up to the <e>Installing for XFree86</e> or |
|
|
341 | <e>Installing for X.org</e> part. |
|
|
342 | </p> |
|
|
343 | |
|
|
344 | </body> |
|
|
345 | </section> |
|
|
346 | <section> |
|
|
347 | <title>Install the CVS</title> |
|
|
348 | <body> |
|
|
349 | |
|
|
350 | <p> |
|
|
351 | Verify that the DRI kernel module(s) for your system were built: |
|
|
352 | </p> |
|
|
353 | |
|
|
354 | <pre caption="Verification"> |
|
|
355 | # <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel; ls</i> |
|
|
356 | </pre> |
|
|
357 | |
|
|
358 | <p> |
|
|
359 | For the 3dfx Voodoo, you should see <path>tdfx.o</path>. For the Matrox |
|
|
360 | G200/G400, you should see <path>mga.o</path>. For the ATI Rage 128, you should |
|
|
361 | see <path>r128.o</path>. For the ATI Radeon, you should see |
|
|
362 | <path>radeon.o</path>. For the Intel i810, you should see <path>i810.o</path>. |
|
|
363 | If the DRI kernel module(s) failed to build, you should verify that you're |
|
|
364 | using the right version of the Linux kernel. The most recent kernels are not |
|
|
365 | always supported. |
|
|
366 | </p> |
|
|
367 | |
|
|
368 | <p> |
|
|
369 | Install over your XFree86 or X.org installation. You may wish to back up xfree |
|
|
370 | or xorg-x11. |
|
|
371 | </p> |
|
|
372 | |
|
|
373 | <pre caption="Backing up Xorg"> |
|
|
374 | # <i>quickpkg xorg-x11</i> |
|
|
375 | <codenote>This backs up your Xorg-X11 package.</codenote> |
|
|
376 | # <i>make install</i> |
|
|
377 | </pre> |
|
|
378 | |
|
|
379 | <p> |
|
|
380 | Follow the "Configure Xorg" section above. |
|
|
381 | </p> |
|
|
382 | |
|
|
383 | <p> |
|
|
384 | To load the appropriate DRM module in your running kernel, copy the kernel |
|
|
385 | module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then |
|
|
386 | run <c>modules-update</c> and restart your X server. If you're not running the |
|
|
387 | kernel you'll be using it in, instead of <c>`uname -r`,</c> use that kernel's |
|
|
388 | name. |
|
|
389 | </p> |
|
|
390 | |
|
|
391 | <warn> |
|
|
392 | Make sure you first unload any older DRI kernel modules that might be already |
|
|
393 | loaded. Note that some DRM modules require that the agpgart module be loaded |
|
|
394 | first. |
|
|
395 | </warn> |
|
|
396 | |
|
|
397 | </body> |
|
|
398 | </section> |
|
|
399 | </chapter> |
|
|
400 | |
|
|
401 | <chapter> |
|
|
402 | <title>Tweak your performance</title> |
|
|
403 | <section> |
300 | <section> |
404 | <title>Get the most out of direct rendering</title> |
301 | <title>Get the most out of direct rendering</title> |
405 | <body> |
302 | <body> |
406 | |
303 | |
407 | <p> |
304 | <p> |
408 | A few options may increase performance by up to 30 percent (or more) over the |
305 | If you want to set more features, for performance or other reasons, check out |
409 | default. Set them in <path>/etc/X11/xorg.conf</path>. |
306 | the <uri link="http://dri.freedesktop.org/wiki/FeatureMatrix">feature |
|
|
307 | matrix</uri> on the DRI web site or the <uri |
|
|
308 | link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features |
|
|
309 | listing</uri> on Sourceforge. |
|
|
310 | </p> |
|
|
311 | |
|
|
312 | </body> |
|
|
313 | </section> |
|
|
314 | </chapter> |
|
|
315 | |
|
|
316 | <chapter> |
|
|
317 | <title>Troubleshooting</title> |
|
|
318 | <section> |
|
|
319 | <title>It doesn't work. I don't have rendering, and I can't tell why.</title> |
|
|
320 | <body> |
|
|
321 | |
410 | </p> |
322 | <p> |
|
|
323 | Try <c>modprobe radeon</c> before you start the X server (replace <c>radeon</c> |
|
|
324 | with the name of your driver). Also, try building agpgart into the kernel |
|
|
325 | instead of as a module. |
|
|
326 | </p> |
411 | |
327 | |
412 | <pre caption="xorg.conf"> |
328 | </body> |
|
|
329 | </section> |
|
|
330 | <section> |
|
|
331 | <title>When I startx, I get this error: "[drm] failed to load kernel module agpgart"</title> |
|
|
332 | <body> |
|
|
333 | |
|
|
334 | <p> |
|
|
335 | That's because you compiled agpgart into the kernel instead of as a module. |
|
|
336 | Ignore it unless you're having problems. |
|
|
337 | </p> |
|
|
338 | |
|
|
339 | </body> |
|
|
340 | </section> |
|
|
341 | <section> |
|
|
342 | <title>I have a Radeon, and I want TV-Out.</title> |
|
|
343 | <body> |
|
|
344 | |
|
|
345 | <p> |
|
|
346 | The drivers originally developed by the <uri |
|
|
347 | link="http://gatos.sf.net">GATOS</uri> project have been merged into Xorg's |
|
|
348 | codebase. You don't need anything special for TV-Out; |
|
|
349 | <c>x11-drivers/xf86-video-ati</c> will work just fine. |
|
|
350 | </p> |
|
|
351 | |
|
|
352 | </body> |
|
|
353 | </section> |
|
|
354 | <section> |
|
|
355 | <title> |
|
|
356 | It doesn't work. My card is so incredibly new and cool that it isn't supported |
|
|
357 | at all. |
|
|
358 | </title> |
|
|
359 | <body> |
|
|
360 | |
|
|
361 | <p> |
|
|
362 | Try out the binary drivers. For AMD cards, use <c>ati-drivers</c>; a listing is |
|
|
363 | at <uri>http://support.amd.com/us/gpudownload/Pages/index.aspx</uri>. If those |
|
|
364 | don't support it, use fbdev. It's slow, but it works. |
|
|
365 | </p> |
|
|
366 | |
|
|
367 | </body> |
|
|
368 | </section> |
|
|
369 | <section> |
|
|
370 | <title>I have a PCI card and it doesn't work. Help!</title> |
|
|
371 | <body> |
|
|
372 | |
|
|
373 | <p> |
|
|
374 | Create a config file in <path>/etc/X11/xorg.conf.d/</path>; name it anything you |
|
|
375 | want as long as it ends in <path>.conf</path>. Add the following to it: |
|
|
376 | </p> |
|
|
377 | |
|
|
378 | <pre caption="/etc/X11/xorg.conf.x/10-pcimode.conf"> |
413 | Section "Device" |
379 | Section "Device" |
414 | Option "AGPMode" "4" |
380 | Option "ForcePCIMode" "True" |
415 | <codenote>This increased FPS from 609 to 618.</codenote> |
|
|
416 | Option "AGPFastWrite" "True" |
|
|
417 | <codenote>This had no measurable effect, but it may increase instability of your computer.</codenote> |
|
|
418 | <codenote>You may also need to set it in your BIOS.</codenote> |
|
|
419 | Option "EnablePageFlip" "True" |
|
|
420 | <codenote>This improved FPS from 618 to 702. It also is "risky" but few people have reported problems.</codenote> |
|
|
421 | ... |
|
|
422 | EndSection |
381 | EndSection |
423 | </pre> |
382 | </pre> |
424 | |
383 | |
425 | <p> |
|
|
426 | If you want to set even more features, check out the <uri |
|
|
427 | link="http://dri.sourceforge.net/doc/dri_driver_features.phtml">features |
|
|
428 | listing</uri> on the DRI Web site. |
|
|
429 | </p> |
|
|
430 | |
|
|
431 | </body> |
384 | </body> |
432 | </section> |
|
|
433 | </chapter> |
|
|
434 | |
|
|
435 | <chapter> |
|
|
436 | <title>Troubleshooting</title> |
|
|
437 | <section> |
385 | </section> |
438 | <title>It doesn't work. I just recompiled my kernel or switched to a new one.</title> |
|
|
439 | <body> |
|
|
440 | |
|
|
441 | <p> |
|
|
442 | Whenever you rebuild your kernel or switch to another kernel, you'll have to |
|
|
443 | rebuild the kernel module. Note that you don't need to remerge xfree or |
|
|
444 | xorg-x11, but you will need to remerge x11-drm. |
|
|
445 | </p> |
|
|
446 | |
|
|
447 | </body> |
|
|
448 | </section> |
|
|
449 | |
|
|
450 | <section> |
|
|
451 | <title>It doesn't work. I don't have rendering, and I can't tell why.</title> |
|
|
452 | <body> |
|
|
453 | |
|
|
454 | <p> |
|
|
455 | Try <c>insmod radeon</c> before you start the X server. Also, try building |
|
|
456 | agpgart into the kernel instead of as a module. |
|
|
457 | </p> |
|
|
458 | |
|
|
459 | </body> |
|
|
460 | </section> |
|
|
461 | <section> |
|
|
462 | <title>When I startx, I get this error: "[drm] failed to load kernel module agpgart"</title> |
|
|
463 | <body> |
|
|
464 | |
|
|
465 | <p> |
|
|
466 | That's because you compiled agpgart into the kernel instead of as a module. |
|
|
467 | Ignore it unless you're having problems. |
|
|
468 | </p> |
|
|
469 | |
|
|
470 | </body> |
|
|
471 | </section> |
|
|
472 | <section> |
|
|
473 | <title>Direct rendering doesn't work, and in /var/log/Xorg.0.log I have an error about driver version too low.</title> |
|
|
474 | <body> |
|
|
475 | |
|
|
476 | <p> |
|
|
477 | You aren't using the x11-drm driver. Check if you compiled DRM and the driver |
|
|
478 | into the kernel; you shouldn't have. |
|
|
479 | </p> |
|
|
480 | |
|
|
481 | </body> |
|
|
482 | </section> |
|
|
483 | <section> |
|
|
484 | <title>I have a Radeon, and I want TV-Out.</title> |
|
|
485 | <body> |
|
|
486 | |
|
|
487 | <p> |
|
|
488 | Check out ati-gatos drivers. <c>emerge -s gatos</c>. |
|
|
489 | </p> |
|
|
490 | |
|
|
491 | </body> |
|
|
492 | </section> |
|
|
493 | <section> |
|
|
494 | <title>It doesn't work. My card is so incredibly new and cool that it isn't supported at all.</title> |
|
|
495 | <body> |
|
|
496 | |
|
|
497 | <p> |
|
|
498 | Try out the binary drivers. For ati-drivers, a listing is at |
|
|
499 | <uri>http://www.schneider-digital.de/html/download_ati.html</uri>. If those |
|
|
500 | don't support it, use fbdev. It's slow, but it works. |
|
|
501 | </p> |
|
|
502 | |
|
|
503 | </body> |
|
|
504 | </section> |
|
|
505 | <section> |
|
|
506 | <title>I have a PCI card and it doesn't work. Help!</title> |
|
|
507 | <body> |
|
|
508 | |
|
|
509 | <p> |
|
|
510 | In section "Device" enable ForcePCIMode. |
|
|
511 | </p> |
|
|
512 | |
|
|
513 | <pre caption="Enabling ForcePCIMode"> |
|
|
514 | Option "ForcePCIMode" "True" |
|
|
515 | </pre> |
|
|
516 | |
|
|
517 | </body> |
|
|
518 | </section> |
|
|
519 | </chapter> |
|
|
520 | |
|
|
521 | <chapter> |
386 | </chapter> |
522 | <title>Acknowledgments</title> |
387 | |
|
|
388 | <chapter> |
|
|
389 | <title>References</title> |
523 | <section> |
390 | <section> |
524 | <body> |
391 | <body> |
525 | |
392 | |
526 | <ol> |
393 | <ol> |
527 | <li> |
394 | <li><uri>http://forums.gentoo.org/viewtopic.php?t=46681</uri></li> |
528 | Christopher Webber for suggesting a troubleshooting question about changing |
395 | <li><uri>http://forums.gentoo.org/viewtopic.php?t=29264</uri></li> |
529 | or recompiling kernels |
396 | <li><uri>http://dri.freedesktop.org/</uri></li> |
530 | </li> |
397 | <li><uri>http://www.retinalburn.net/linux/dri_status.html</uri></li> |
531 | <li> |
|
|
532 | Steve, for suggesting consistency between the cases of dri and DRI in |
|
|
533 | XF86Config |
|
|
534 | </li> |
|
|
535 | </ol> |
398 | </ol> |
536 | |
399 | |
537 | </body> |
400 | </body> |
538 | </section> |
401 | </section> |
539 | </chapter> |
402 | <section> |
540 | |
|
|
541 | <chapter> |
|
|
542 | <title>References</title> |
403 | <title>Feedback</title> |
543 | <section> |
|
|
544 | <body> |
404 | <body> |
545 | |
405 | |
546 | <ol> |
406 | <p> |
547 | <li>http://forums.gentoo.org/viewtopic.php?t=46681</li> |
407 | With suggestions, questions, etc., e-mail <mail link="dberkholz"/>. |
548 | <li>http://forums.gentoo.org/viewtopic.php?t=29264</li> |
408 | </p> |
549 | <li>http://dri.sourceforge.net/</li> |
|
|
550 | <li>http://www.retinalburn.net/linux/dri_status.html</li> |
|
|
551 | </ol> |
|
|
552 | |
409 | |
553 | </body> |
410 | </body> |
554 | </section> |
411 | </section> |
555 | </chapter> |
412 | </chapter> |
556 | </guide> |
413 | </guide> |