/[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.19 - (show annotations) (download) (as text)
Fri Oct 21 20:35:46 2005 UTC (8 years, 5 months ago) by swift
Branch: MAIN
Changes since 1.18: +15 -3 lines
File MIME type: application/xml
#108916 - Adding nvidia-settings tool information

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

  ViewVC Help
Powered by ViewVC 1.1.20