/[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.55 - (hide annotations) (download) (as text)
Sat Jul 27 21:06:37 2013 UTC (15 months, 4 weeks ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.54: +4 -4 lines
File MIME type: application/xml
xorg-config is now at https://wiki.gentoo.org/wiki/Xorg/Configuration

1 swift 1.1 <?xml version='1.0' encoding="UTF-8"?>
2 swift 1.55 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.54 2013/06/03 01:43:09 nightmorph Exp $ -->
3 swift 1.1 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4    
5 swift 1.53 <guide disclaimer="obsolete" redirect="https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers">
6 swift 1.1 <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 swift 1.55 <version>6</version>
32     <date>2013-07-27</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.49 Newer cards such as the GeForce 400, 300, 200, 100, 9, 8, 7, and 6 series should
73     use the latest 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.49 The oldest NV2x-based cards (such as TNT, TNT2, GeForce, and GeForce 2) are no
92     longer supported by <c>nvidia-drivers</c>. Instead, use an open-source driver:
93     <c>xf86-video-nouveau</c> (recommended) or <c>xf86-video-nv</c> (old,
94     deprecated).
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.50 First, you'll need to choose the right kernel source using <c>eselect</c>. If
223     you are using <c>gentoo-sources-2.6.34-r1</c>, your kernel listing might look
224 nightmorph 1.41 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 nightmorph 1.50 [1] linux-2.6.34-gentoo-r1 *
231     [2] linux-2.6.33-gentoo-r2
232     [3] linux-2.6.32.9
233 nightmorph 1.41 <comment>(Verify that the right kernel is marked with an asterisk</comment>
234 neysx 1.13 </pre>
235    
236     <p>
237 nightmorph 1.50 In the above output, you'll notice that the <c>linux-2.6.34-gentoo-r1</c> kernel
238 nightmorph 1.41 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.50 Now it's time to install the drivers. You can do this by first following the
260 swift 1.55 <uri link="https://wiki.gentoo.org/wiki/Xorg/Configuration">X Server Configuration HOWTO</uri> and
261 swift 1.52 setting <c>VIDEO_CARDS="nvidia"</c> in <path>/etc/portage/make.conf</path>. When you
262 nightmorph 1.50 install the X server, it will then install the right version of
263     <c>nvidia-drivers</c> for you.
264 swift 1.1 </p>
265    
266 nightmorph 1.41 <note>
267 nightmorph 1.50 The drivers can be installed with the <c>gtk</c> USE flag set in
268 swift 1.52 <path>/etc/portage/make.conf</path>. This will install
269 nightmorph 1.44 <c>media-video/nvidia-settings</c>, a handy graphical tool for monitoring and
270     configuring several aspects of your nVidia card.
271 nightmorph 1.41 </note>
272    
273 neysx 1.13 <impo>
274 nightmorph 1.41 Every time you <uri link="/doc/en/kernel-upgrade.xml">compile a new kernel</uri>
275 nightmorph 1.50 or recompile the current one, you will need to reinstall the nVidia kernel
276 nightmorph 1.54 modules. Once you've finished compiling or recompiling a kernel, just run
277     <c>emerge @module-rebuild</c> to rebuild the drivers for your new kernel.
278 neysx 1.13 </impo>
279    
280 swift 1.1 <p>
281     Once the installation has finished, run <c>modprobe nvidia</c> to load the
282 nightmorph 1.31 kernel module into memory. If this is an upgrade, you should remove the
283     previous module first.
284 swift 1.1 </p>
285    
286     <pre caption="Loading the kernel module">
287 nightmorph 1.31 # <i>lsmod | grep nvidia &amp;&amp; rmmod nvidia</i>
288 swift 1.1 # <i>modprobe nvidia</i>
289     </pre>
290    
291     <p>
292 neysx 1.14 To prevent you having to manually load the module on every bootup, you probably
293     want to have this done automatically each time you boot your system, so edit
294 swift 1.51 <path>/etc/conf.d/modules</path> and add <c>nvidia</c> to it.
295 swift 1.1 </p>
296    
297 nightmorph 1.29 <impo>
298     If you compiled <c>agpgart</c> as a module, you will need to add it to
299 swift 1.51 <path>/etc/conf.d/modules</path> as well.
300 nightmorph 1.29 </impo>
301    
302 swift 1.1 </body>
303     </section>
304     <section>
305     <title>Configuring the X Server</title>
306     <body>
307    
308     <p>
309     Once the appropriate drivers are installed you need to configure your X Server
310 nightmorph 1.31 to use the <c>nvidia</c> driver instead of the default <c>nv</c> driver.
311 swift 1.1 </p>
312    
313     <p>
314 nightmorph 1.33 Open <path>/etc/X11/xorg.conf</path> with your favorite editor (such as
315     <c>nano</c> or <c>vim</c>) and go to the <c>Device</c> section. In that
316 neysx 1.14 section, change the <c>Driver</c> line:
317 swift 1.1 </p>
318    
319     <pre caption="Changing nv to nvidia in the X Server configuration">
320     Section "Device"
321     Identifier "nVidia Inc. GeForce2"
322     <i>Driver "nvidia"</i>
323     VideoRam 65536
324     EndSection
325     </pre>
326    
327     <p>
328 swift 1.4 Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
329     loaded while the <c>dri</c> module doesn't:
330     </p>
331    
332     <pre caption="Updating the Module section">
333     Section "Module"
334     <comment>(...)</comment>
335     <i># Load "dri"
336     Load "glx"</i>
337     <comment>(...)</comment>
338     EndSection
339     </pre>
340    
341     <p>
342 swift 1.12 Next, in section <c>Screen</c>, make sure that either the <c>DefaultDepth</c>
343 neysx 1.21 directive is set to 16 or 24, or that you only have <c>Display</c> subsections
344 nightmorph 1.33 with <c>Depth</c> settings of 16 or 24. Without it, the nVidia GLX extensions
345 swift 1.12 will not start.
346     </p>
347    
348     <pre caption="Updating the Screen section">
349     Section "Screen"
350     <comment>(...)</comment>
351     <i>DefaultDepth 16</i>
352     Subsection "Display"
353     <comment>(...)</comment>
354     EndSection
355     </pre>
356    
357     <p>
358 nightmorph 1.28 Run <c>eselect</c> so that the X Server uses the nVidia GLX libraries:
359 swift 1.1 </p>
360    
361 nightmorph 1.28 <pre caption="Running eselect">
362     # <i>eselect opengl set nvidia</i>
363 swift 1.1 </pre>
364    
365     </body>
366     </section>
367     <section>
368 swift 1.10 <title>Adding your Users to the video Group</title>
369     <body>
370    
371     <p>
372     You have to add your user to the <c>video</c> group so he has access to the
373 nightmorph 1.41 nVidia device files:
374 swift 1.10 </p>
375    
376     <pre caption="Adding your user to the video group">
377     # <i>gpasswd -a youruser video</i>
378     </pre>
379    
380     <p>
381 fox2mike 1.16 This might not be totally necessary if you aren't using <c>udev</c> but it
382 nightmorph 1.33 doesn't hurt either and makes your system future-proof.
383 swift 1.10 </p>
384    
385     </body>
386     </section>
387     <section>
388 swift 1.1 <title>Testing your Card</title>
389     <body>
390    
391     <p>
392 nightmorph 1.39 To test your nVidia card, fire up X and run <c>glxinfo</c>, which is part of the
393     <c>mesa-progs</c> package. It should say that direct rendering is activated:
394 swift 1.1 </p>
395    
396     <pre caption="Checking the direct rendering status">
397     $ <i>glxinfo | grep direct</i>
398     direct rendering: Yes
399     </pre>
400    
401     <p>
402 neysx 1.21 To monitor your FPS, run <c>glxgears</c>.
403 swift 1.1 </p>
404    
405     </body>
406     </section>
407 swift 1.11 <section>
408     <title>Enabling nvidia Support</title>
409     <body>
410    
411     <p>
412     Some tools, such as <c>mplayer</c> and <c>xine-lib</c>, use a local USE flag
413 nightmorph 1.41 called <c>xvmc</c> which enables XvMCNVIDIA support, useful when watching high
414     resolution movies. Add in <c>xvmc</c> in your USE variable in
415 swift 1.52 <path>/etc/portage/make.conf</path> or add it as USE flag to <c>media-video/mplayer</c>
416 swift 1.11 and/or <c>media-libs/xine-lib</c> in <path>/etc/portage/package.use</path>.
417     </p>
418    
419     <p>
420 nightmorph 1.41 There are also some applications that use the <c>nvidia</c> USE flag, so you
421 swift 1.52 may want to add it to <path>/etc/portage/make.conf</path>.
422 nightmorph 1.41 </p>
423    
424     <p>
425 swift 1.11 Then, run <c>emerge -uD --newuse world</c> to rebuild the applications that
426     benefit from the USE flag change.
427     </p>
428    
429     </body>
430     </section>
431 swift 1.19 <section>
432     <title>Using NVidia Settings Tool</title>
433     <body>
434    
435     <p>
436 nightmorph 1.41 nVidia also provides you with a settings tool. This tool allows you to monitor
437     and change graphical settings without restarting the X server and is available
438     through Portage as <c>media-video/nvidia-settings</c>. As mentioned earlier, it
439 nightmorph 1.44 will be pulled in automatically if you install the drivers with the <c>gtk</c>
440 swift 1.52 USE flag set in <path>/etc/portage/make.conf</path> or in
441 nightmorph 1.44 <path>/etc/portage/package.use</path>.
442 swift 1.19 </p>
443    
444     </body>
445     </section>
446 swift 1.1 </chapter>
447 swift 1.6
448     <chapter>
449     <title>Troubleshooting</title>
450     <section>
451     <title>Getting 2D to work on machines with 4Gb or more memory</title>
452     <body>
453    
454     <p>
455 nightmorph 1.31 If you are having troubles with the nVidia 2D acceleration it is likely that
456     you are unable to set up a write-combining range with MTRR. To verify, check
457     the contents of <path>/proc/mtrr</path>:
458 swift 1.6 </p>
459    
460     <pre caption="Checking if you have write-combining enabled">
461     # <i>cat /proc/mtrr</i>
462     </pre>
463    
464     <p>
465     Every line should contain "write-back" or "write-combining". If you see a line
466     with "uncachable" in it you will need to change a BIOS setting to fix this.
467     </p>
468    
469     <p>
470     Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
471     Settings"). Change the setting from "continuous" to "discrete" and boot back
472     into Linux. You will now find out that there is no "uncachable" entry anymore
473     and 2D acceleration now works without any glitches.
474     </p>
475    
476     </body>
477     </section>
478 swift 1.7 <section>
479 swift 1.20 <title>
480     When I attempt to load the kernel module I receive a "no such device"
481     </title>
482     <body>
483    
484     <p>
485     This usually occurs when you don't have a matching video card. Make sure that
486     you have an nVidia-powered graphical card (you can double-check this using
487     <c>lspci</c>).
488     </p>
489    
490     <p>
491     If you are confident that you have an nVidia card, check your BIOS and see if
492     the directive <e>Assign IRQ to VGA</e> is set.
493     </p>
494    
495     </body>
496     </section>
497 swift 1.6 </chapter>
498    
499 neysx 1.14 <chapter>
500     <title>Expert Configuration</title>
501     <section>
502     <title>Documentation</title>
503     <body>
504    
505     <p>
506     The nVidia driver package also comes with comprehensive documentation. This is
507     installed into <c>/usr/share/doc</c> and can be viewed with the following
508     command:
509     </p>
510    
511     <pre caption="Viewing the NVIDIA documentation">
512 nightmorph 1.31 $ <i>less /usr/share/doc/nvidia-drivers-*/README.gz</i>
513 neysx 1.14 </pre>
514    
515     </body>
516     </section>
517     <section>
518     <title>Kernel module parameters</title>
519     <body>
520    
521     <p>
522     The <c>nvidia</c> kernel module accepts a number of parameters (options) which
523     you can use to tweak the behaviour of the driver. Most of these are mentioned in
524     the documentation. To add or change the values of these parameters, edit the
525 nightmorph 1.48 file <c>/etc/modprobe.d/nvidia.conf</c>. Remember to run <c>update-modules</c> after
526 neysx 1.14 modifying this file, and bear in mind that you will need to reload the
527     <c>nvidia</c> module before the new settings take effect.
528     </p>
529    
530 jkt 1.17 <pre caption="Adjusting nvidia options">
531 nightmorph 1.48 <comment>(Edit /etc/modprobe.d/nvidia.conf in your favourite editor)</comment>
532     # <i>nano -w /etc/modprobe.d/nvidia.conf</i>
533 jkt 1.17 <comment>(Update module information)</comment>
534 nightmorph 1.40 # <i>update-modules</i>
535 jkt 1.17 <comment>(Unload the nvidia module...)</comment>
536     # <i>modprobe -r nvidia</i>
537     <comment>(...and load it once again)</comment>
538     # <i>modprobe nvidia</i>
539     </pre>
540    
541 neysx 1.14 </body>
542     </section>
543     <section>
544     <title>Advanced X configuration</title>
545     <body>
546    
547     <p>
548     The GLX layer also has a plethora of options which can be configured. These
549     control the configuration of TV out, dual displays, monitor frequency detection,
550     etc. Again, all of the available options are detailed in the documentation.
551     </p>
552    
553     <p>
554     If you wish to use any of these options, you need to list them in the relevant
555     Device section of your X config file (usually <c>/etc/X11/xorg.conf</c>). For
556     example, suppose I wanted to disable the splash logo:
557     </p>
558    
559     <pre caption="Advanced nvidia configuration in the X configuration">
560     Section "Device"
561     Identifier "nVidia Inc. GeForce2"
562     Driver "nvidia"
563     <i>Option "NoLogo" "true"</i>
564     VideoRam 65536
565     EndSection
566     </pre>
567    
568     </body>
569     </section>
570     </chapter>
571 swift 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20