/[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.14 - (hide annotations) (download) (as text)
Sat Jun 4 16:57:03 2005 UTC (9 years, 4 months ago) by neysx
Branch: MAIN
Changes since 1.13: +118 -18 lines
File MIME type: application/xml
#94957 Add intro & advanced stuff, tx dsd

1 swift 1.1 <?xml version='1.0' encoding="UTF-8"?>
2 neysx 1.14 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.13 2005/06/04 11:01:24 neysx 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     <mail link="curtis119@yahoo.com">M Curtis Napier</mail>
13     </author>
14 swift 1.1
15     <abstract>
16     Many Gentooists have an nVidia chipset on their system. nVidia provides specific
17     Linux drivers to boost the performance of your card. This guide informs you how
18     to install and configure these drivers.
19     </abstract>
20    
21     <license/>
22    
23 neysx 1.14 <version>1.11</version>
24 neysx 1.13 <date>2005-06-04</date>
25 swift 1.1
26     <chapter>
27 neysx 1.14 <title>Introduction</title>
28     <section>
29     <body>
30    
31     <p>
32     nVidia release their own Linux drivers which provide good performance and full
33     3D acceleration. The driver releases are split up into two parts:
34     <c>nvidia-kernel</c> and <c>nvidia-glx</c>.
35     </p>
36    
37     <p>
38     <c>nvidia-kernel</c> is a kernel driver which handles the low-level
39     communication with your video hardware. This is simply a kernel module, named
40     <c>nvidia</c>, which installs against your kernel sources and needs to be loaded
41     whenever you want to use the nvidia drivers.
42     </p>
43    
44     <p>
45     As well as the kernel driver, you need to install the X11 GLX layer
46     (<c>nvidia-glx</c>). This is used by X to render graphics, which internally
47     uses the <c>nvidia-kernel</c> kernel driver to interface with the hardware.
48     </p>
49    
50     </body>
51     </section>
52     </chapter>
53    
54     <chapter>
55 swift 1.1 <title>Configuring your Card</title>
56     <section>
57     <title>Installing the Appropriate Drivers</title>
58     <body>
59    
60     <p>
61 neysx 1.14 As mentioned above, the nVidia kernel driver installs and runs against your
62     current kernel. It builds as a module, so it makes sense that your kernel must
63     support the loading of kernel modules. If you used <c>genkernel</c> to configure
64     the kernel for you then you're all set. If not, double check your kernel
65     configuration so that this support is enabled:
66 swift 1.1 </p>
67    
68     <pre caption="Enabling the Loading of Kernel Modules">
69     Loadable module support ---&gt;
70     [*] Enable loadable module support
71     </pre>
72    
73     <p>
74 swift 1.5 You also need to enable <e>Memory Type Range Register</e> in your kernel:
75     </p>
76    
77     <pre caption="Enabling MTRR">
78     Processor and Features ---&gt;
79     [*] MTRR (Memory Type Range Register) support
80     </pre>
81    
82     <p>
83 swift 1.1 nVidia's modules and libraries are combined in two packages: <c>nvidia-glx</c>
84     and <c>nvidia-kernel</c>. The former are the X11 GLX libraries while the latter
85 neysx 1.13 are the kernel modules.
86     </p>
87    
88     <p>
89     The nvidia-kernel ebuild auto discovers your kernel version based on the
90     <path>/usr/src/linux</path> symlink. Please ensure that you have this symlink
91     pointing to the correct sources and that your kernel is correctly configured.
92     Please refer to the Configuring the Kernel section of the <uri
93     link="/doc/en/handbook/">Installation Handbook</uri> for details on configuring
94     your kernel.
95     </p>
96    
97     <p>
98 neysx 1.14 If you are using gentoo-sources-2.6.11-r6, your /usr/src directory might look
99     something like this:
100 neysx 1.13 </p>
101    
102     <pre caption="Check your /usr/src/linux symlink">
103     # <i>cd /usr/src</i>
104     # <i>ls -l</i>
105 neysx 1.14 <comment>(Check that linux points to the right directory)</comment>
106 neysx 1.13 lrwxrwxrwx 1 root root 22 Apr 23 18:33 linux -&gt; linux-2.6.11-gentoo-r6
107     drwxr-xr-x 4 root root 120 Apr 8 18:56 linux-2.4.26-gentoo-r4
108     drwxr-xr-x 18 root root 664 Dec 31 16:09 linux-2.6.10
109     drwxr-xr-x 18 root root 632 Mar 3 12:27 linux-2.6.11
110     drwxr-xr-x 19 root root 4096 Mar 16 22:00 linux-2.6.11-gentoo-r6
111     </pre>
112    
113     <p>
114 neysx 1.14 In the above output, you'll notice that the <c>linux</c> symlink is pointing
115     to the <c>linux-2.6.11-gentoo-r6</c> kernel.
116     </p>
117    
118     <p>
119     If the symlink is not pointing to the correct sources, you must update the link
120 neysx 1.13 like this:
121     </p>
122    
123 neysx 1.14 <pre caption="Create/Update /usr/src/linux symlink">
124 neysx 1.13 # <i>cd /usr/src</i>
125     # <i>ln -snf linux-2.6.11-gentoo-r6 linux</i>
126     </pre>
127    
128     <p>
129     Now it's time to install <c>nvidia-kernel</c> and <c>nvidia-glx</c>. Since
130     <c>nvidia-glx</c> depends on <c>nvidia-kernel</c>, installing <c>nvidia-glx</c>
131     is sufficient:
132 swift 1.1 </p>
133    
134     <pre caption="Installing the nVidia modules">
135 swift 1.3 # <i>emerge nvidia-glx</i>
136 swift 1.1 </pre>
137    
138 neysx 1.13 <impo>
139     Every time you <uri link="/doc/en/kernel-upgrade.xml">compile a new
140     kernel</uri> or recompile the current one, you have to run <c>emerge
141     nvidia-kernel</c> to reinstall the nVidia modules. nvidia-glx is unaffected by
142 neysx 1.14 a kernel change and doesn't even need to be rebuilt when you recompile/upgrade
143     X.
144 neysx 1.13 </impo>
145    
146 swift 1.1 <p>
147     Once the installation has finished, run <c>modprobe nvidia</c> to load the
148     kernel module into memory.
149     </p>
150    
151     <pre caption="Loading the kernel module">
152     # <i>modprobe nvidia</i>
153     </pre>
154    
155     <p>
156 neysx 1.14 To prevent you having to manually load the module on every bootup, you probably
157     want to have this done automatically each time you boot your system, so edit
158     <path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>,
159     depending on which kernel version you use) and add <c>nvidia</c> to it. Don't
160     forget to run <c>modules-update</c> afterwards.
161 swift 1.1 </p>
162    
163     <pre caption="Running modules-update">
164     # <i>modules-update</i>
165     </pre>
166    
167     </body>
168     </section>
169     <section>
170     <title>Configuring the X Server</title>
171     <body>
172    
173     <p>
174     Once the appropriate drivers are installed you need to configure your X Server
175     (XFree86 or Xorg) to use the <c>nvidia</c> driver instead of the default
176     <c>nv</c> driver.
177     </p>
178    
179     <p>
180 neysx 1.14 Open <path>/etc/X11/xorg.conf</path> (or <path>/etc/X11/XF86Config</path> if you
181     still use the older configuration file location) with your favorite editor
182     (such as <c>nano</c> or <c>vim</c>) and go to the <c>Device</c> section. In that
183     section, change the <c>Driver</c> line:
184 swift 1.1 </p>
185    
186     <pre caption="Changing nv to nvidia in the X Server configuration">
187     Section "Device"
188     Identifier "nVidia Inc. GeForce2"
189     <i>Driver "nvidia"</i>
190     VideoRam 65536
191     EndSection
192     </pre>
193    
194     <p>
195 swift 1.4 Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
196     loaded while the <c>dri</c> module doesn't:
197     </p>
198    
199     <pre caption="Updating the Module section">
200     Section "Module"
201     <comment>(...)</comment>
202     <i># Load "dri"
203     Load "glx"</i>
204     <comment>(...)</comment>
205     EndSection
206     </pre>
207    
208     <p>
209 swift 1.12 Next, in section <c>Screen</c>, make sure that either the <c>DefaultDepth</c>
210     directive is set to 16 or 24, or that you only have <c>Display</c> subsections
211     with <c>Depth</c> settings of 16 or 24. Without it, the nvidia-glx extensions
212     will not start.
213     </p>
214    
215     <pre caption="Updating the Screen section">
216     Section "Screen"
217     <comment>(...)</comment>
218     <i>DefaultDepth 16</i>
219     Subsection "Display"
220     <comment>(...)</comment>
221     EndSection
222     </pre>
223    
224     <p>
225 swift 1.1 Run <c>opengl-update</c> so that the X Server uses the nVidia GLX libraries:
226     </p>
227    
228     <pre caption="Running opengl-update">
229     # <i>opengl-update nvidia</i>
230     </pre>
231    
232     </body>
233     </section>
234     <section>
235 swift 1.10 <title>Adding your Users to the video Group</title>
236     <body>
237    
238     <p>
239     You have to add your user to the <c>video</c> group so he has access to the
240     nvidia device files:
241     </p>
242    
243     <pre caption="Adding your user to the video group">
244     # <i>gpasswd -a youruser video</i>
245     </pre>
246    
247     <p>
248     This might not be totally necessary if you aren't used <c>udev</c> but it
249     doesn't hurt either and makes your system future-proof :)
250     </p>
251    
252     </body>
253     </section>
254     <section>
255 swift 1.1 <title>Testing your Card</title>
256     <body>
257    
258     <p>
259     To test your nVidia card, fire up X and run the <c>glxinfo | grep direct</c>
260     command. It should say that direct rendering is activated:
261     </p>
262    
263     <pre caption="Checking the direct rendering status">
264     $ <i>glxinfo | grep direct</i>
265     direct rendering: Yes
266     </pre>
267    
268     <p>
269     To monitor your FPS, run <c>glxgears</c>.
270     </p>
271    
272     </body>
273     </section>
274 swift 1.11 <section>
275     <title>Enabling nvidia Support</title>
276     <body>
277    
278     <p>
279     Some tools, such as <c>mplayer</c> and <c>xine-lib</c>, use a local USE flag
280     called "nvidia" which enables XvMCNVIDIA support, useful when watching high
281     resolution movies. Add in "nvidia" in your USE variable in
282     <path>/etc/make.conf</path> or add it as USE flag to <c>media-video/mplayer</c>
283     and/or <c>media-libs/xine-lib</c> in <path>/etc/portage/package.use</path>.
284     </p>
285    
286     <p>
287     Then, run <c>emerge -uD --newuse world</c> to rebuild the applications that
288     benefit from the USE flag change.
289     </p>
290    
291     </body>
292     </section>
293 swift 1.1 </chapter>
294 swift 1.6
295     <chapter>
296     <title>Troubleshooting</title>
297     <section>
298     <title>Getting 2D to work on machines with 4Gb or more memory</title>
299     <body>
300    
301     <p>
302     If you are having troubles with the nVidia 2D acceleration it is likely that you
303     are unable to set up a write-combining range with MTRR. To verify, check the
304     contents of <path>/proc/mtrr</path>:
305     </p>
306    
307     <pre caption="Checking if you have write-combining enabled">
308     # <i>cat /proc/mtrr</i>
309     </pre>
310    
311     <p>
312     Every line should contain "write-back" or "write-combining". If you see a line
313     with "uncachable" in it you will need to change a BIOS setting to fix this.
314     </p>
315    
316     <p>
317     Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
318     Settings"). Change the setting from "continuous" to "discrete" and boot back
319     into Linux. You will now find out that there is no "uncachable" entry anymore
320     and 2D acceleration now works without any glitches.
321     </p>
322    
323     </body>
324     </section>
325 swift 1.7 <section>
326     <title>I receive warnings about unsupported 4K stack sizes</title>
327     <body>
328    
329     <p>
330 neysx 1.9 <c>nvidia-kernel</c> packages older than 1.0.6106 only support kernels using an
331     8K stack size. More recent kernels (2.6.6 and higher) have support for 4K stack
332     size's as well. Do not select 4K stack size in your kernel configuration if you
333     are using such an <c>nvidia-kernel</c> package. You can find this option in the
334     section <c>Kernel Hacking</c>.
335 swift 1.7 </p>
336    
337     </body>
338     </section>
339 swift 1.6 </chapter>
340    
341 neysx 1.14 <chapter>
342     <title>Expert Configuration</title>
343     <section>
344     <title>Documentation</title>
345     <body>
346    
347     <p>
348     The nVidia driver package also comes with comprehensive documentation. This is
349     installed into <c>/usr/share/doc</c> and can be viewed with the following
350     command:
351     </p>
352    
353     <pre caption="Viewing the NVIDIA documentation">
354     # <i>less /usr/share/doc/nvidia-glx-*/README.txt.gz</i>
355     </pre>
356    
357     </body>
358     </section>
359     <section>
360     <title>Kernel module parameters</title>
361     <body>
362    
363     <p>
364     The <c>nvidia</c> kernel module accepts a number of parameters (options) which
365     you can use to tweak the behaviour of the driver. Most of these are mentioned in
366     the documentation. To add or change the values of these parameters, edit the
367     file <c>/etc/modules.d/nvidia</c>. Remember to run <c>modules-update</c> after
368     modifying this file, and bear in mind that you will need to reload the
369     <c>nvidia</c> module before the new settings take effect.
370     </p>
371    
372     </body>
373     </section>
374     <section>
375     <title>Advanced X configuration</title>
376     <body>
377    
378     <p>
379     The GLX layer also has a plethora of options which can be configured. These
380     control the configuration of TV out, dual displays, monitor frequency detection,
381     etc. Again, all of the available options are detailed in the documentation.
382     </p>
383    
384     <p>
385     If you wish to use any of these options, you need to list them in the relevant
386     Device section of your X config file (usually <c>/etc/X11/xorg.conf</c>). For
387     example, suppose I wanted to disable the splash logo:
388     </p>
389    
390     <pre caption="Advanced nvidia configuration in the X configuration">
391     Section "Device"
392     Identifier "nVidia Inc. GeForce2"
393     Driver "nvidia"
394     <i>Option "NoLogo" "true"</i>
395     VideoRam 65536
396     EndSection
397     </pre>
398    
399     </body>
400     </section>
401     </chapter>
402    
403 swift 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20