/[gentoo]/xml/htdocs/doc/en/nvidia-guide.xml
Gentoo

Contents of /xml/htdocs/doc/en/nvidia-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.36 - (show annotations) (download) (as text)
Thu Feb 8 00:09:31 2007 UTC (7 years, 5 months ago) by diox
Branch: MAIN
Changes since 1.35: +62 -11 lines
File MIME type: application/xml
applying wolf31o2s patch for nvidia-guide.xml #165844

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.35 2006/11/29 15:57:52 nightmorph Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 <guide link="/doc/en/nvidia-guide.xml">
6 <title>Gentoo Linux nVidia Guide</title>
7
8 <author title="Author">
9 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
10 </author>
11 <author title="Editor">
12 <mail link="curtis119@gentoo.org">M Curtis Napier</mail>
13 </author>
14 <author title="Editor">
15 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
16 </author>
17 <author title="Editor">
18 <mail link="wolf31o2@gentoo.org">Chris Gianelloni</mail>
19 </author>
20
21 <abstract>
22 Many Gentooists have an nVidia chipset on their system. nVidia provides specific
23 Linux drivers to boost the performance of your card. This guide informs you how
24 to install and configure these drivers.
25 </abstract>
26
27 <!-- The content of this document is licensed under the CC-BY-SA license -->
28 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
29 <license/>
30
31 <version>1.28</version>
32 <date>2006-10-23</date>
33
34 <chapter>
35 <title>Introduction</title>
36 <section>
37 <body>
38
39 <p>
40 The nVidia drivers in the tree are released by nVidia and are built against the
41 Linux kernel. They contain a binary blob that does the heavy lifting for talking
42 to the card. The drivers consist of two parts, a kernel module, and an X11
43 driver. Both parts are included in a single package. Due to the way nVidia has
44 been packaging their drivers, you will need to make some choices before you
45 install the drivers. Currently, there are two driver packages in the tree. The
46 first, <c>nvidia-drivers</c>, is the latest drivers from nVidia and includes
47 support for the latest cards. The second, <c>nvidia-legacy-drivers</c>, supports
48 older cards, from the original TNT through the GeForce 6800. However, this
49 driver does not support the latest features of the newer cards. You should only
50 use <c>nvidia-legacy-driver</c> if your cards is not supported in the
51 <c>nvidia-drivers</c> package.
52 </p>
53
54 <note>
55 Previously, Gentoo provided separate ebuilds for the nVidia kernel module
56 (<c>nvidia-kernel</c>) and the X11 GLX libraries (<c>nvidia-glx</c>). These
57 ebuilds have since been removed from the Portage tree in favor of
58 <c>nvidia-drivers</c> and <c>nvidia-legacy-drivers</c>. If you use
59 <c>nvidia-kernel</c> and <c>nvidia-glx</c>, then you should migrate to the
60 newer packages.
61 </note>
62
63 </body>
64 </section>
65 </chapter>
66
67 <chapter>
68 <title>Driver compatibility</title>
69 <section>
70 <title>nvidia-legacy-drivers</title>
71 <body>
72
73 <p>
74 The <c>nvidia-legacy-driver</c> branch supports older nVidia cards which are no
75 longer supported in the latest driver releases. This branch is based on an older
76 code base of the nVidia drivers, and supports the latest kernels and X.Org
77 versions. You should use this driver if you have a TNT, TNT2, GeForce, or
78 GeForce 2 series card. The driver compatibility information can be found in
79 Appendix A of
80 <uri>http://download.nvidia.com/XFree86/Linux-x86/1.0-7184/README/readme.txt</uri>.
81 </p>
82
83 </body>
84 </section>
85 <section>
86 <title>nvidia-drivers</title>
87 <body>
88
89 <p>
90 The <c>nvidia-drivers</c> branch supports the features in newer nVidia cards.
91 The latest version of these drivers has dropped support for the NV2x based
92 cards. If you have a GeForce 3 or GeForce 4 series card, you should mask
93 <c>>=x11-drivers/nvidia-drivers-1.0.9700</c> in your
94 <path>/etc/portage/package.mask</path> file. This will prevent newer versions of
95 the driver which are incompatible with your card from being installed. You can
96 check for driver compatibility for your card at to determine if it is supported
97 on the newer drivers at
98 <uri>http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9746/README/appendix-a.html</uri>.
99 </p>
100
101 </body>
102 </section>
103 </chapter>
104
105 <chapter>
106 <title>Configuring your Card</title>
107 <section>
108 <title>Kernel Configuration</title>
109 <body>
110
111 <p>
112 As mentioned above, the nVidia kernel driver installs and runs against your
113 current kernel. It builds as a module, so it makes sense that your kernel must
114 support the loading of kernel modules. If you used <c>genkernel all</c> to
115 configure the kernel for you, then you're all set. If not, double check your
116 kernel configuration so that this support is enabled:
117 </p>
118
119 <pre caption="Enabling the Loading of Kernel Modules">
120 Loadable module support ---&gt;
121 [*] Enable loadable module support
122 </pre>
123
124 <p>
125 You also need to enable <e>Memory Type Range Register</e> in your kernel:
126 </p>
127
128 <pre caption="Enabling MTRR">
129 Processor and Features ---&gt;
130 [*] MTRR (Memory Type Range Register) support
131 </pre>
132
133 <p> Also, if you have an AGP graphics card, you can optionally enable
134 <c>agpgart</c> support to your kernel, either compiled in or as a module. If
135 you do not use the in-kernel agpgart, then the drivers will use their own
136 <c>agpgart</c> implementation, called <c>NvAGP</c>. On certain systems, this
137 performs better than the in-kernel agpgart, and on others, it performs worse.
138 You will need to evaluate this on your own system to get the best performance.
139 If you are unsure what to do, use the in-kernel agpgart:
140 </p>
141
142 <pre caption="Enabling agpgart">
143 Device Drivers ---&gt;
144 Character devices ---&gt;
145 &lt;*&gt; /dev/agpgart (AGP Support)
146 </pre>
147
148 <note>
149 On amd64, the IOMMU controls the agpgart setting.
150 </note>
151
152 </body>
153 </section>
154 <section>
155 <title>Arch-specific notes</title>
156 <body>
157
158 <impo>
159 For x86 and AMD64 processors, the in-kernel driver conflicts with the binary
160 driver provided by nVidia. If you will be compiling your kernel for these CPUs,
161 you must completely remove support for the in-kernel driver as shown:
162 </impo>
163
164 <pre caption="Remove the in-kernel driver">
165 Device Drivers ---&gt;
166 Graphics Support ---&gt;
167 &lt; &gt; nVidia Framebuffer Support
168 &lt; &gt; nVidia Riva support
169 </pre>
170
171 <p>
172 A good framebuffer alternative is <c>VESA</c>:
173 </p>
174
175 <pre caption="Enable VESA support">
176 Device Drivers ---&gt;
177 Graphics Support ---&gt;
178 &lt;*&gt; VESA VGA graphics support
179 </pre>
180
181 <p>
182 Then, under "VESA driver type" select either <c>vesafb</c> or
183 <c>vesafb-tng</c>. If you are using an AMD64 processor, you should select
184 <c>vesafb</c> rather than <c>vesafb-tng</c>:
185 </p>
186
187 <pre caption="Select framebuffer type">
188 (X) vesafb
189 ( ) vesafb-tng
190 </pre>
191
192 <p>
193 For more information, you can read up
194 <path>/usr/src/linux/Documentation/fb/vesafb.txt</path> if you are using
195 <c>vesafb</c> or look for your framebuffer documentation under
196 <path>/usr/src/linux/Documentation/fb/</path>.
197 </p>
198
199 </body>
200 </section>
201 <section>
202 <title>Continuing with Kernel Configuration</title>
203 <body>
204
205 <p>
206 The <c>nvidia-drivers</c> and <c>nvidia-legacy-drivers</c> ebuilds
207 automatically discover your kernel version based on the
208 <path>/usr/src/linux</path> symlink. Please ensure that you have this symlink
209 pointing to the correct sources and that your kernel is correctly configured.
210 Please refer to the &quot;Configuring the Kernel&quot; section of the <uri
211 link="/doc/en/handbook/">Installation Handbook</uri> for details on configuring
212 your kernel.
213 </p>
214
215 <p>
216 If you are using gentoo-sources-2.6.11-r6, your <path>/usr/src</path> directory
217 might look something like this:
218 </p>
219
220 <pre caption="Check your /usr/src/linux symlink">
221 # <i>cd /usr/src</i>
222 # <i>ls -l</i>
223 <comment>(Check that linux points to the right directory)</comment>
224 lrwxrwxrwx 1 root root 22 Apr 23 18:33 linux -&gt; linux-2.6.11-gentoo-r6
225 drwxr-xr-x 4 root root 120 Apr 8 18:56 linux-2.4.26-gentoo-r4
226 drwxr-xr-x 18 root root 664 Dec 31 16:09 linux-2.6.10
227 drwxr-xr-x 18 root root 632 Mar 3 12:27 linux-2.6.11
228 drwxr-xr-x 19 root root 4096 Mar 16 22:00 linux-2.6.11-gentoo-r6
229 </pre>
230
231 <p>
232 In the above output, you'll notice that the <c>linux</c> symlink is pointing
233 to the <c>linux-2.6.11-gentoo-r6</c> kernel.
234 </p>
235
236 <p>
237 If the symlink is not pointing to the correct sources, you must update the link
238 like this:
239 </p>
240
241 <pre caption="Create/Update /usr/src/linux symlink">
242 # <i>cd /usr/src</i>
243 # <i>ln -snf linux-2.6.11-gentoo-r6 linux</i>
244 </pre>
245
246 </body>
247 </section>
248 <section>
249 <title>Optional: Check for Legacy Card Support</title>
250 <body>
251
252 <note>
253 Unfortunately, certain legacy video cards are not supported by the newer
254 versions of <c>nvidia-drivers</c>.
255 nVidia provides a <uri link="http://www.nvidia.com/object/IO_18897.html">list
256 of supported cards</uri>. Please check the list before installing the drivers.
257 </note>
258
259 <p>
260 The following is a list of <b>unsupported</b> legacy video cards:
261 </p>
262
263 <pre caption="Unsupported cards">
264 TNT
265 TNT2
266 TNT2 Pro
267 TNT2 Ultra
268 TNT2 Model 64 (M64)
269 TNT2 Model 64 (M64) Pro
270 Vanta
271 Vanta LT
272 GeForce 256
273 GeForce DDR
274 GeForce2 GTS
275 GeForce2 Pro
276 GeForce2 Ti
277 GeForce2 Ultra
278 GeForce2 MX Integrated graphics
279 Quadro
280 Quadro2 Pro
281 Quadro2 EX
282 </pre>
283
284 <p>
285 If your card is listed in the legacy list, then you will be required to install
286 the <c>nvidia-legacy-drivers</c> package to get 3D support.
287 </p>
288
289 </body>
290 </section>
291 <section>
292 <title>Installing the Appropriate Drivers</title>
293 <body>
294
295 <p>
296 Now it's time to install the drivers.
297 </p>
298
299 <pre caption="Installing the nVidia drivers">
300 <comment>(If you have a card not listed in the legacy list above)</comment>
301 # <i>emerge nvidia-drivers</i>
302 <comment>(If your card is listed in the legacy list)</comment>
303 # <i>emerge nvidia-legacy-drivers</i>
304 </pre>
305
306 <impo>
307 Every time you <uri link="/doc/en/kernel-upgrade.xml">compile a new
308 kernel</uri> or recompile the current one, you will need to run <c>emerge
309 nvidia-drivers</c> or <c>emerge nvidia-legacy-drivers</c> to reinstall the
310 nVidia modules.
311 </impo>
312
313 <p>
314 Once the installation has finished, run <c>modprobe nvidia</c> to load the
315 kernel module into memory. If this is an upgrade, you should remove the
316 previous module first.
317 </p>
318
319 <pre caption="Loading the kernel module">
320 # <i>lsmod | grep nvidia &amp;&amp; rmmod nvidia</i>
321 # <i>modprobe nvidia</i>
322 </pre>
323
324 <p>
325 To prevent you having to manually load the module on every bootup, you probably
326 want to have this done automatically each time you boot your system, so edit
327 <path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>,
328 depending on which kernel version you use) and add <c>nvidia</c> to it. Don't
329 forget to run <c>modules-update</c> afterwards.
330 </p>
331
332 <impo>
333 If you compiled <c>agpgart</c> as a module, you will need to add it to
334 <path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>
335 depending on your kernel version).
336 </impo>
337
338 <pre caption="Running modules-update">
339 # <i>modules-update</i>
340 </pre>
341
342 </body>
343 </section>
344 <section>
345 <title>Configuring the X Server</title>
346 <body>
347
348 <p>
349 Once the appropriate drivers are installed you need to configure your X Server
350 to use the <c>nvidia</c> driver instead of the default <c>nv</c> driver.
351 </p>
352
353 <p>
354 Open <path>/etc/X11/xorg.conf</path> with your favorite editor (such as
355 <c>nano</c> or <c>vim</c>) and go to the <c>Device</c> section. In that
356 section, change the <c>Driver</c> line:
357 </p>
358
359 <pre caption="Changing nv to nvidia in the X Server configuration">
360 Section "Device"
361 Identifier "nVidia Inc. GeForce2"
362 <i>Driver "nvidia"</i>
363 VideoRam 65536
364 EndSection
365 </pre>
366
367 <p>
368 Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
369 loaded while the <c>dri</c> module doesn't:
370 </p>
371
372 <pre caption="Updating the Module section">
373 Section "Module"
374 <comment>(...)</comment>
375 <i># Load "dri"
376 Load "glx"</i>
377 <comment>(...)</comment>
378 EndSection
379 </pre>
380
381 <p>
382 Next, in section <c>Screen</c>, make sure that either the <c>DefaultDepth</c>
383 directive is set to 16 or 24, or that you only have <c>Display</c> subsections
384 with <c>Depth</c> settings of 16 or 24. Without it, the nVidia GLX extensions
385 will not start.
386 </p>
387
388 <pre caption="Updating the Screen section">
389 Section "Screen"
390 <comment>(...)</comment>
391 <i>DefaultDepth 16</i>
392 Subsection "Display"
393 <comment>(...)</comment>
394 EndSection
395 </pre>
396
397 <p>
398 Run <c>eselect</c> so that the X Server uses the nVidia GLX libraries:
399 </p>
400
401 <pre caption="Running eselect">
402 # <i>eselect opengl set nvidia</i>
403 </pre>
404
405 </body>
406 </section>
407 <section>
408 <title>Adding your Users to the video Group</title>
409 <body>
410
411 <p>
412 You have to add your user to the <c>video</c> group so he has access to the
413 nvidia device files:
414 </p>
415
416 <pre caption="Adding your user to the video group">
417 # <i>gpasswd -a youruser video</i>
418 </pre>
419
420 <p>
421 This might not be totally necessary if you aren't using <c>udev</c> but it
422 doesn't hurt either and makes your system future-proof.
423 </p>
424
425 </body>
426 </section>
427 <section>
428 <title>Testing your Card</title>
429 <body>
430
431 <p>
432 To test your nVidia card, fire up X and run the <c>glxinfo | grep direct</c>
433 command. It should say that direct rendering is activated:
434 </p>
435
436 <pre caption="Checking the direct rendering status">
437 $ <i>glxinfo | grep direct</i>
438 direct rendering: Yes
439 </pre>
440
441 <p>
442 To monitor your FPS, run <c>glxgears</c>.
443 </p>
444
445 </body>
446 </section>
447 <section>
448 <title>Enabling nvidia Support</title>
449 <body>
450
451 <p>
452 Some tools, such as <c>mplayer</c> and <c>xine-lib</c>, use a local USE flag
453 called "nvidia" which enables XvMCNVIDIA support, useful when watching high
454 resolution movies. Add in "nvidia" in your USE variable in
455 <path>/etc/make.conf</path> or add it as USE flag to <c>media-video/mplayer</c>
456 and/or <c>media-libs/xine-lib</c> in <path>/etc/portage/package.use</path>.
457 </p>
458
459 <p>
460 Then, run <c>emerge -uD --newuse world</c> to rebuild the applications that
461 benefit from the USE flag change.
462 </p>
463
464 </body>
465 </section>
466 <section>
467 <title>Using NVidia Settings Tool</title>
468 <body>
469
470 <p>
471 Since nVidia released version 1.0.6106 it also provides you with a settings
472 tool. This tool allows you to change graphical settings without restarting the
473 X server and is available through Portage as
474 <c>media-video/nvidia-settings</c>.
475 </p>
476
477 </body>
478 </section>
479 </chapter>
480
481 <chapter>
482 <title>Troubleshooting</title>
483 <section>
484 <title>Getting 2D to work on machines with 4Gb or more memory</title>
485 <body>
486
487 <p>
488 If you are having troubles with the nVidia 2D acceleration it is likely that
489 you are unable to set up a write-combining range with MTRR. To verify, check
490 the contents of <path>/proc/mtrr</path>:
491 </p>
492
493 <pre caption="Checking if you have write-combining enabled">
494 # <i>cat /proc/mtrr</i>
495 </pre>
496
497 <p>
498 Every line should contain "write-back" or "write-combining". If you see a line
499 with "uncachable" in it you will need to change a BIOS setting to fix this.
500 </p>
501
502 <p>
503 Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
504 Settings"). Change the setting from "continuous" to "discrete" and boot back
505 into Linux. You will now find out that there is no "uncachable" entry anymore
506 and 2D acceleration now works without any glitches.
507 </p>
508
509 </body>
510 </section>
511 <section>
512 <title>
513 When I attempt to load the kernel module I receive a "no such device"
514 </title>
515 <body>
516
517 <p>
518 This usually occurs when you don't have a matching video card. Make sure that
519 you have an nVidia-powered graphical card (you can double-check this using
520 <c>lspci</c>).
521 </p>
522
523 <p>
524 If you are confident that you have an nVidia card, check your BIOS and see if
525 the directive <e>Assign IRQ to VGA</e> is set.
526 </p>
527
528 </body>
529 </section>
530 </chapter>
531
532 <chapter>
533 <title>Expert Configuration</title>
534 <section>
535 <title>Documentation</title>
536 <body>
537
538 <p>
539 The nVidia driver package also comes with comprehensive documentation. This is
540 installed into <c>/usr/share/doc</c> and can be viewed with the following
541 command:
542 </p>
543
544 <pre caption="Viewing the NVIDIA documentation">
545 <comment>(for nvidia-drivers)</comment>
546 $ <i>less /usr/share/doc/nvidia-drivers-*/README.gz</i>
547 <comment>(for nvidia-legacy-drivers)</comment>
548 $ <i>less /usr/share/doc/nvidia-legacy-drivers-*/README.gz</i>
549 </pre>
550
551 </body>
552 </section>
553 <section>
554 <title>Kernel module parameters</title>
555 <body>
556
557 <p>
558 The <c>nvidia</c> kernel module accepts a number of parameters (options) which
559 you can use to tweak the behaviour of the driver. Most of these are mentioned in
560 the documentation. To add or change the values of these parameters, edit the
561 file <c>/etc/modules.d/nvidia</c>. Remember to run <c>modules-update</c> after
562 modifying this file, and bear in mind that you will need to reload the
563 <c>nvidia</c> module before the new settings take effect.
564 </p>
565
566 <pre caption="Adjusting nvidia options">
567 <comment>(Edit /etc/modules.d/nvidia in your favourite editor)</comment>
568 # <i>nano -w /etc/modules.d/nvidia</i>
569 <comment>(Update module information)</comment>
570 # <i>modules-update</i>
571 <comment>(Unload the nvidia module...)</comment>
572 # <i>modprobe -r nvidia</i>
573 <comment>(...and load it once again)</comment>
574 # <i>modprobe nvidia</i>
575 </pre>
576
577 </body>
578 </section>
579 <section>
580 <title>Advanced X configuration</title>
581 <body>
582
583 <p>
584 The GLX layer also has a plethora of options which can be configured. These
585 control the configuration of TV out, dual displays, monitor frequency detection,
586 etc. Again, all of the available options are detailed in the documentation.
587 </p>
588
589 <p>
590 If you wish to use any of these options, you need to list them in the relevant
591 Device section of your X config file (usually <c>/etc/X11/xorg.conf</c>). For
592 example, suppose I wanted to disable the splash logo:
593 </p>
594
595 <pre caption="Advanced nvidia configuration in the X configuration">
596 Section "Device"
597 Identifier "nVidia Inc. GeForce2"
598 Driver "nvidia"
599 <i>Option "NoLogo" "true"</i>
600 VideoRam 65536
601 EndSection
602 </pre>
603
604 </body>
605 </section>
606 </chapter>
607
608 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20