/[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.47 - (hide annotations) (download) (as text)
Mon Jan 26 08:20:48 2009 UTC (5 years, 7 months ago) by nightmorph
Branch: MAIN
Changes since 1.46: +17 -11 lines
File MIME type: application/xml
update nvidia guide for new driver support for geforce 5 cards, bug 242308

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

  ViewVC Help
Powered by ViewVC 1.1.20