/[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.41 - (hide annotations) (download) (as text)
Sun Jul 22 07:32:10 2007 UTC (6 years, 11 months ago) by nightmorph
Branch: MAIN
Changes since 1.40: +105 -123 lines
File MIME type: application/xml
update nvidia references as nvidia-legacy-drivers is deprecated and will be removed. nvidia-drivers now contains every available version. see Cardoe's message to gentoo-dev for more information.

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

  ViewVC Help
Powered by ViewVC 1.1.20