/[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.23 - (show annotations) (download) (as text)
Wed Jan 25 21:41:44 2006 UTC (8 years, 11 months ago) by jkt
Branch: MAIN
Changes since 1.22: +3 -3 lines
File MIME type: application/xml
`/sbin/NVmakedevices.sh` creates "device nodes" or "device files" but definitely not "device drivers" :)

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.22 2006/01/21 12:54:58 swift Exp $ -->
3 <!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 <author title="Editor">
12 <mail link="curtis119@gentoo.org">M Curtis Napier</mail>
13 </author>
14 <author title="Editor">
15 <mail link="jackdark@gmail.com">Joshua Saddler</mail>
16 </author>
17
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 <!-- The content of this document is licensed under the CC-BY-SA license -->
25 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
26 <license/>
27
28 <version>1.19</version>
29 <date>2006-01-21</date>
30
31 <chapter>
32 <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 <title>Configuring your Card</title>
61 <section>
62 <title>Kernel Configuration</title>
63 <body>
64
65 <p>
66 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 </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 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 <p>
88 nVidia's modules and libraries are combined in two packages: <c>nvidia-glx</c>
89 and <c>nvidia-kernel</c>. The former are the X11 GLX libraries while the latter
90 are the kernel modules.
91 </p>
92
93 <p>
94 The nvidia-kernel ebuild auto discovers your kernel version based on the
95 <path>/usr/src/linux</path> symlink. Please ensure that you have this symlink
96 pointing to the correct sources and that your kernel is correctly configured.
97 Please refer to the Configuring the Kernel section of the <uri
98 link="/doc/en/handbook/">Installation Handbook</uri> for details on configuring
99 your kernel.
100 </p>
101
102 <p>
103 If you are using gentoo-sources-2.6.11-r6, your <path>/usr/src</path> directory
104 might look something like this:
105 </p>
106
107 <pre caption="Check your /usr/src/linux symlink">
108 # <i>cd /usr/src</i>
109 # <i>ls -l</i>
110 <comment>(Check that linux points to the right directory)</comment>
111 lrwxrwxrwx 1 root root 22 Apr 23 18:33 linux -&gt; linux-2.6.11-gentoo-r6
112 drwxr-xr-x 4 root root 120 Apr 8 18:56 linux-2.4.26-gentoo-r4
113 drwxr-xr-x 18 root root 664 Dec 31 16:09 linux-2.6.10
114 drwxr-xr-x 18 root root 632 Mar 3 12:27 linux-2.6.11
115 drwxr-xr-x 19 root root 4096 Mar 16 22:00 linux-2.6.11-gentoo-r6
116 </pre>
117
118 <p>
119 In the above output, you'll notice that the <c>linux</c> symlink is pointing
120 to the <c>linux-2.6.11-gentoo-r6</c> kernel.
121 </p>
122
123 <p>
124 If the symlink is not pointing to the correct sources, you must update the link
125 like this:
126 </p>
127
128 <pre caption="Create/Update /usr/src/linux symlink">
129 # <i>cd /usr/src</i>
130 # <i>ln -snf linux-2.6.11-gentoo-r6 linux</i>
131 </pre>
132
133 </body>
134 </section>
135 <section>
136 <title>Optional: Check for Legacy Card Support</title>
137 <body>
138
139 <note>
140 Unfortunately, certain legacy video cards are not supported by the newer
141 versions of <c>nvidia-glx</c> and <c>nvidia-kernel</c>. nVidia provides a <uri
142 link="http://www.nvidia.com/object/IO_18897.html">list of supported cards</uri>.
143 Please check the list before installing the drivers.
144 </note>
145
146 <p>
147 The following is a list of <b>unsupported</b> legacy video cards:
148 </p>
149
150 <pre caption="Unsupported cards">
151 TNT2
152 TNT2 Pro
153 TNT2 Ultra
154 TNT2 Model 64 (M64)
155 TNT2 Model 64 (M64) Pro
156 Vanta
157 Vanta LT
158 GeForce 256
159 GeForce DDR
160 GeForce2 GTS
161 GeForce2 Pro
162 GeForce2 Ti
163 GeForce2 Ultra
164 GeForce2 MX Integrated graphics
165 Quadro
166 Quadro2 Pro
167 Quadro2 EX
168 </pre>
169
170 <p>
171 If you own one of these cards, you will have to mask the newer versions of the
172 nVidia drivers, and install an older version:
173 </p>
174
175 <pre caption="Masking newer drivers">
176 # <i>echo "&gt;media-video/nvidia-kernel-1.0.6629-r4" &gt;&gt; /etc/portage/package.mask</i>
177 # <i>echo "&gt;media-video/nvidia-glx-1.0.6629-r7" &gt;&gt; /etc/portage/package.mask</i>
178 </pre>
179
180 </body>
181 </section>
182 <section>
183 <title>Installing the Appropriate Drivers</title>
184 <body>
185
186 <p>
187 Now it's time to install <c>nvidia-kernel</c> and <c>nvidia-glx</c>. Since
188 <c>nvidia-glx</c> depends on <c>nvidia-kernel</c>, installing <c>nvidia-glx</c>
189 is sufficient.
190 </p>
191
192 <pre caption="Installing the nVidia modules">
193 # <i>emerge nvidia-glx</i>
194 </pre>
195
196 <impo>
197 Every time you <uri link="/doc/en/kernel-upgrade.xml">compile a new
198 kernel</uri> or recompile the current one, you have to run <c>emerge
199 nvidia-kernel</c> to reinstall the nVidia modules. <c>nvidia-glx</c> is
200 unaffected by a kernel change and doesn't even need to be rebuilt when you
201 recompile/upgrade X.
202 </impo>
203
204 <p>
205 Once the installation has finished, run <c>modprobe nvidia</c> to load the
206 kernel module into memory.
207 </p>
208
209 <pre caption="Loading the kernel module">
210 # <i>modprobe nvidia</i>
211 </pre>
212
213 <p>
214 To prevent you having to manually load the module on every bootup, you probably
215 want to have this done automatically each time you boot your system, so edit
216 <path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>,
217 depending on which kernel version you use) and add <c>nvidia</c> to it. Don't
218 forget to run <c>modules-update</c> afterwards.
219 </p>
220
221 <pre caption="Running modules-update">
222 # <i>modules-update</i>
223 </pre>
224
225 </body>
226 </section>
227 <section>
228 <title>Configuring the X Server</title>
229 <body>
230
231 <p>
232 Once the appropriate drivers are installed you need to configure your X Server
233 (XFree86 or Xorg) to use the <c>nvidia</c> driver instead of the default
234 <c>nv</c> driver.
235 </p>
236
237 <p>
238 Open <path>/etc/X11/xorg.conf</path> (or <path>/etc/X11/XF86Config</path> if you
239 still use the older configuration file location) with your favorite editor
240 (such as <c>nano</c> or <c>vim</c>) and go to the <c>Device</c> section. In that
241 section, change the <c>Driver</c> line:
242 </p>
243
244 <pre caption="Changing nv to nvidia in the X Server configuration">
245 Section "Device"
246 Identifier "nVidia Inc. GeForce2"
247 <i>Driver "nvidia"</i>
248 VideoRam 65536
249 EndSection
250 </pre>
251
252 <p>
253 Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
254 loaded while the <c>dri</c> module doesn't:
255 </p>
256
257 <pre caption="Updating the Module section">
258 Section "Module"
259 <comment>(...)</comment>
260 <i># Load "dri"
261 Load "glx"</i>
262 <comment>(...)</comment>
263 EndSection
264 </pre>
265
266 <p>
267 Next, in section <c>Screen</c>, make sure that either the <c>DefaultDepth</c>
268 directive is set to 16 or 24, or that you only have <c>Display</c> subsections
269 with <c>Depth</c> settings of 16 or 24. Without it, the nvidia-glx extensions
270 will not start.
271 </p>
272
273 <pre caption="Updating the Screen section">
274 Section "Screen"
275 <comment>(...)</comment>
276 <i>DefaultDepth 16</i>
277 Subsection "Display"
278 <comment>(...)</comment>
279 EndSection
280 </pre>
281
282 <p>
283 Run <c>opengl-update</c> so that the X Server uses the nVidia GLX libraries:
284 </p>
285
286 <pre caption="Running opengl-update">
287 # <i>opengl-update nvidia</i>
288 </pre>
289
290 </body>
291 </section>
292 <section>
293 <title>Adding your Users to the video Group</title>
294 <body>
295
296 <p>
297 You have to add your user to the <c>video</c> group so he has access to the
298 nvidia device files:
299 </p>
300
301 <pre caption="Adding your user to the video group">
302 # <i>gpasswd -a youruser video</i>
303 </pre>
304
305 <p>
306 This might not be totally necessary if you aren't using <c>udev</c> but it
307 doesn't hurt either and makes your system future-proof :)
308 </p>
309
310 </body>
311 </section>
312 <section>
313 <title>Testing your Card</title>
314 <body>
315
316 <p>
317 To test your nVidia card, fire up X and run the <c>glxinfo | grep direct</c>
318 command. It should say that direct rendering is activated:
319 </p>
320
321 <pre caption="Checking the direct rendering status">
322 $ <i>glxinfo | grep direct</i>
323 direct rendering: Yes
324 </pre>
325
326 <p>
327 To monitor your FPS, run <c>glxgears</c>.
328 </p>
329
330 </body>
331 </section>
332 <section>
333 <title>Enabling nvidia Support</title>
334 <body>
335
336 <p>
337 Some tools, such as <c>mplayer</c> and <c>xine-lib</c>, use a local USE flag
338 called "nvidia" which enables XvMCNVIDIA support, useful when watching high
339 resolution movies. Add in "nvidia" in your USE variable in
340 <path>/etc/make.conf</path> or add it as USE flag to <c>media-video/mplayer</c>
341 and/or <c>media-libs/xine-lib</c> in <path>/etc/portage/package.use</path>.
342 </p>
343
344 <p>
345 Then, run <c>emerge -uD --newuse world</c> to rebuild the applications that
346 benefit from the USE flag change.
347 </p>
348
349 </body>
350 </section>
351 <section>
352 <title>Using NVidia Settings Tool</title>
353 <body>
354
355 <p>
356 Since NVidia released version 1.0.6106 it also provides you with a settings
357 tool. This tool allows you to change graphical settings without restarting the X
358 server and is available through Portage as <c>media-video/nvidia-settings</c>.
359 </p>
360
361 </body>
362 </section>
363 </chapter>
364
365 <chapter>
366 <title>Troubleshooting</title>
367 <section>
368 <title>Getting 2D to work on machines with 4Gb or more memory</title>
369 <body>
370
371 <p>
372 If you are having troubles with the nVidia 2D acceleration it is likely that you
373 are unable to set up a write-combining range with MTRR. To verify, check the
374 contents of <path>/proc/mtrr</path>:
375 </p>
376
377 <pre caption="Checking if you have write-combining enabled">
378 # <i>cat /proc/mtrr</i>
379 </pre>
380
381 <p>
382 Every line should contain "write-back" or "write-combining". If you see a line
383 with "uncachable" in it you will need to change a BIOS setting to fix this.
384 </p>
385
386 <p>
387 Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
388 Settings"). Change the setting from "continuous" to "discrete" and boot back
389 into Linux. You will now find out that there is no "uncachable" entry anymore
390 and 2D acceleration now works without any glitches.
391 </p>
392
393 </body>
394 </section>
395 <section>
396 <title>I receive warnings about unsupported 4K stack sizes</title>
397 <body>
398
399 <p>
400 <c>nvidia-kernel</c> packages older than 1.0.6106 only support kernels using an
401 8K stack size. More recent kernels (2.6.6 and higher) have support for 4K stack
402 size's as well. Do not select 4K stack size in your kernel configuration if you
403 are using such an <c>nvidia-kernel</c> package. You can find this option in the
404 section <c>Kernel Hacking</c>.
405 </p>
406
407 </body>
408 </section>
409 <section>
410 <title>
411 When I attempt to load the kernel module I receive a "no such device"
412 </title>
413 <body>
414
415 <p>
416 This usually occurs when you don't have a matching video card. Make sure that
417 you have an nVidia-powered graphical card (you can double-check this using
418 <c>lspci</c>).
419 </p>
420
421 <p>
422 If you are confident that you have an nVidia card, check your BIOS and see if
423 the directive <e>Assign IRQ to VGA</e> is set.
424 </p>
425
426 </body>
427 </section>
428 <section>
429 <title>
430 I get "no screens found" and the logs state "Failed to initialize the NVIDIA
431 kernel module!"
432 </title>
433 <body>
434
435 <p>
436 You're most likely missing the <path>/dev/nvidia*</path> device files. Create
437 them using <c>NVmakedevices.sh</c>:
438 </p>
439
440 <pre caption="Creating the nvidia device nodes">
441 # <i>/sbin/NVmakedevices.sh</i>
442 </pre>
443
444 </body>
445 </section>
446 </chapter>
447
448 <chapter>
449 <title>Expert Configuration</title>
450 <section>
451 <title>Documentation</title>
452 <body>
453
454 <p>
455 The nVidia driver package also comes with comprehensive documentation. This is
456 installed into <c>/usr/share/doc</c> and can be viewed with the following
457 command:
458 </p>
459
460 <pre caption="Viewing the NVIDIA documentation">
461 # <i>less /usr/share/doc/nvidia-glx-*/README.txt.gz</i>
462 </pre>
463
464 </body>
465 </section>
466 <section>
467 <title>Kernel module parameters</title>
468 <body>
469
470 <p>
471 The <c>nvidia</c> kernel module accepts a number of parameters (options) which
472 you can use to tweak the behaviour of the driver. Most of these are mentioned in
473 the documentation. To add or change the values of these parameters, edit the
474 file <c>/etc/modules.d/nvidia</c>. Remember to run <c>modules-update</c> after
475 modifying this file, and bear in mind that you will need to reload the
476 <c>nvidia</c> module before the new settings take effect.
477 </p>
478
479 <pre caption="Adjusting nvidia options">
480 <comment>(Edit /etc/modules.d/nvidia in your favourite editor)</comment>
481 # <i>nano -w /etc/modules.d/nvidia</i>
482 <comment>(Update module information)</comment>
483 # <i>modules-update</i>
484 <comment>(Unload the nvidia module...)</comment>
485 # <i>modprobe -r nvidia</i>
486 <comment>(...and load it once again)</comment>
487 # <i>modprobe nvidia</i>
488 </pre>
489
490 </body>
491 </section>
492 <section>
493 <title>Advanced X configuration</title>
494 <body>
495
496 <p>
497 The GLX layer also has a plethora of options which can be configured. These
498 control the configuration of TV out, dual displays, monitor frequency detection,
499 etc. Again, all of the available options are detailed in the documentation.
500 </p>
501
502 <p>
503 If you wish to use any of these options, you need to list them in the relevant
504 Device section of your X config file (usually <c>/etc/X11/xorg.conf</c>). For
505 example, suppose I wanted to disable the splash logo:
506 </p>
507
508 <pre caption="Advanced nvidia configuration in the X configuration">
509 Section "Device"
510 Identifier "nVidia Inc. GeForce2"
511 Driver "nvidia"
512 <i>Option "NoLogo" "true"</i>
513 VideoRam 65536
514 EndSection
515 </pre>
516
517 </body>
518 </section>
519 </chapter>
520
521 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20