/[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.29 - (hide annotations) (download) (as text)
Fri May 26 20:38:25 2006 UTC (8 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.28: +20 -3 lines
File MIME type: application/xml
Updated  modules to build/load for nvidia guide, bug 131684

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

  ViewVC Help
Powered by ViewVC 1.1.20