/[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.13 - (show annotations) (download) (as text)
Sat Jun 4 11:01:24 2005 UTC (9 years, 1 month ago) by neysx
Branch: MAIN
Changes since 1.12: +55 -6 lines
File MIME type: application/xml
#94957 Be more explicit about the need to re-emerge nvida-kernel

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.12 2005/04/09 10:16:24 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@yahoo.com">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 <license/>
22
23 <version>1.10</version>
24 <date>2005-06-04</date>
25
26 <chapter>
27 <title>Configuring your Card</title>
28 <section>
29 <title>Installing the Appropriate Drivers</title>
30 <body>
31
32 <p>
33 The nVidia drivers include kernel modules that must integrate in your current
34 kernel. To accomplish this, your kernel must support the loading of kernel
35 modules. If you used <c>genkernel</c> to configure the kernel for you then
36 you're all set. If not, double check your kernel configuration so that this
37 support is enabled:
38 </p>
39
40 <pre caption="Enabling the Loading of Kernel Modules">
41 Loadable module support ---&gt;
42 [*] Enable loadable module support
43 </pre>
44
45 <p>
46 You also need to enable <e>Memory Type Range Register</e> in your kernel:
47 </p>
48
49 <pre caption="Enabling MTRR">
50 Processor and Features ---&gt;
51 [*] MTRR (Memory Type Range Register) support
52 </pre>
53
54 <p>
55 nVidia's modules and libraries are combined in two packages: <c>nvidia-glx</c>
56 and <c>nvidia-kernel</c>. The former are the X11 GLX libraries while the latter
57 are the kernel modules.
58 </p>
59
60 <p>
61 The nvidia-kernel ebuild auto discovers your kernel version based on the
62 <path>/usr/src/linux</path> symlink. Please ensure that you have this symlink
63 pointing to the correct sources and that your kernel is correctly configured.
64 Please refer to the Configuring the Kernel section of the <uri
65 link="/doc/en/handbook/">Installation Handbook</uri> for details on configuring
66 your kernel.
67 </p>
68
69 <p>
70 If you are using gentoo-sources-2.6.11-r6, your symlink should look like this:
71 </p>
72
73 <pre caption="Check your /usr/src/linux symlink">
74 # <i>cd /usr/src</i>
75 # <i>ls -l</i>
76 <comment>(Check that linux point to the right directory)</comment>
77 lrwxrwxrwx 1 root root 22 Apr 23 18:33 linux -&gt; linux-2.6.11-gentoo-r6
78 drwxr-xr-x 4 root root 120 Apr 8 18:56 linux-2.4.26-gentoo-r4
79 drwxr-xr-x 18 root root 664 Dec 31 16:09 linux-2.6.10
80 drwxr-xr-x 18 root root 632 Mar 3 12:27 linux-2.6.11
81 drwxr-xr-x 19 root root 4096 Mar 16 22:00 linux-2.6.11-gentoo-r6
82 </pre>
83
84 <p>
85 If the symlink is not pointing to the correct sources, you may create the link
86 like this:
87 </p>
88
89 <pre caption="Create /usr/src/linux symlink">
90 # <i>cd /usr/src</i>
91 # <i>ln -snf linux-2.6.11-gentoo-r6 linux</i>
92 </pre>
93
94 <p>
95 Now it's time to install <c>nvidia-kernel</c> and <c>nvidia-glx</c>. Since
96 <c>nvidia-glx</c> depends on <c>nvidia-kernel</c>, installing <c>nvidia-glx</c>
97 is sufficient:
98 </p>
99
100 <pre caption="Installing the nVidia modules">
101 # <i>emerge nvidia-glx</i>
102 </pre>
103
104 <impo>
105 Every time you <uri link="/doc/en/kernel-upgrade.xml">compile a new
106 kernel</uri> or recompile the current one, you have to run <c>emerge
107 nvidia-kernel</c> to reinstall the nVidia modules. nvidia-glx is unaffected by
108 a kernel change.
109 </impo>
110
111 <p>
112 Once the installation has finished, run <c>modprobe nvidia</c> to load the
113 kernel module into memory.
114 </p>
115
116 <pre caption="Loading the kernel module">
117 # <i>modprobe nvidia</i>
118 </pre>
119
120 <p>
121 You probably want to have this done each time you boot your system, so edit
122 <path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>) and
123 add <c>nvidia</c> to it. Don't forget to run <c>modules-update</c> afterwards.
124 </p>
125
126 <pre caption="Running modules-update">
127 # <i>modules-update</i>
128 </pre>
129
130 </body>
131 </section>
132 <section>
133 <title>Configuring the X Server</title>
134 <body>
135
136 <p>
137 Once the appropriate drivers are installed you need to configure your X Server
138 (XFree86 or Xorg) to use the <c>nvidia</c> driver instead of the default
139 <c>nv</c> driver.
140 </p>
141
142 <p>
143 Open <path>/etc/X11/XF86Config</path> (or <path>/etc/X11/xorg.conf</path>) with
144 your favorite editor (such as <c>nano</c> or <c>vim</c>) and go to the
145 <c>Device</c> section. In that section, change the <c>Driver</c> line:
146 </p>
147
148 <pre caption="Changing nv to nvidia in the X Server configuration">
149 Section "Device"
150 Identifier "nVidia Inc. GeForce2"
151 <i>Driver "nvidia"</i>
152 VideoRam 65536
153 EndSection
154 </pre>
155
156 <p>
157 Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
158 loaded while the <c>dri</c> module doesn't:
159 </p>
160
161 <pre caption="Updating the Module section">
162 Section "Module"
163 <comment>(...)</comment>
164 <i># Load "dri"
165 Load "glx"</i>
166 <comment>(...)</comment>
167 EndSection
168 </pre>
169
170 <p>
171 Next, in section <c>Screen</c>, make sure that either the <c>DefaultDepth</c>
172 directive is set to 16 or 24, or that you only have <c>Display</c> subsections
173 with <c>Depth</c> settings of 16 or 24. Without it, the nvidia-glx extensions
174 will not start.
175 </p>
176
177 <pre caption="Updating the Screen section">
178 Section "Screen"
179 <comment>(...)</comment>
180 <i>DefaultDepth 16</i>
181 Subsection "Display"
182 <comment>(...)</comment>
183 EndSection
184 </pre>
185
186 <p>
187 Run <c>opengl-update</c> so that the X Server uses the nVidia GLX libraries:
188 </p>
189
190 <pre caption="Running opengl-update">
191 # <i>opengl-update nvidia</i>
192 </pre>
193
194 </body>
195 </section>
196 <section>
197 <title>Adding your Users to the video Group</title>
198 <body>
199
200 <p>
201 You have to add your user to the <c>video</c> group so he has access to the
202 nvidia device files:
203 </p>
204
205 <pre caption="Adding your user to the video group">
206 # <i>gpasswd -a youruser video</i>
207 </pre>
208
209 <p>
210 This might not be totally necessary if you aren't used <c>udev</c> but it
211 doesn't hurt either and makes your system future-proof :)
212 </p>
213
214 </body>
215 </section>
216 <section>
217 <title>Testing your Card</title>
218 <body>
219
220 <p>
221 To test your nVidia card, fire up X and run the <c>glxinfo | grep direct</c>
222 command. It should say that direct rendering is activated:
223 </p>
224
225 <pre caption="Checking the direct rendering status">
226 $ <i>glxinfo | grep direct</i>
227 direct rendering: Yes
228 </pre>
229
230 <p>
231 To monitor your FPS, run <c>glxgears</c>.
232 </p>
233
234 </body>
235 </section>
236 <section>
237 <title>Enabling nvidia Support</title>
238 <body>
239
240 <p>
241 Some tools, such as <c>mplayer</c> and <c>xine-lib</c>, use a local USE flag
242 called "nvidia" which enables XvMCNVIDIA support, useful when watching high
243 resolution movies. Add in "nvidia" in your USE variable in
244 <path>/etc/make.conf</path> or add it as USE flag to <c>media-video/mplayer</c>
245 and/or <c>media-libs/xine-lib</c> in <path>/etc/portage/package.use</path>.
246 </p>
247
248 <p>
249 Then, run <c>emerge -uD --newuse world</c> to rebuild the applications that
250 benefit from the USE flag change.
251 </p>
252
253 </body>
254 </section>
255 </chapter>
256
257 <chapter>
258 <title>Troubleshooting</title>
259 <section>
260 <title>Getting 2D to work on machines with 4Gb or more memory</title>
261 <body>
262
263 <p>
264 If you are having troubles with the nVidia 2D acceleration it is likely that you
265 are unable to set up a write-combining range with MTRR. To verify, check the
266 contents of <path>/proc/mtrr</path>:
267 </p>
268
269 <pre caption="Checking if you have write-combining enabled">
270 # <i>cat /proc/mtrr</i>
271 </pre>
272
273 <p>
274 Every line should contain "write-back" or "write-combining". If you see a line
275 with "uncachable" in it you will need to change a BIOS setting to fix this.
276 </p>
277
278 <p>
279 Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
280 Settings"). Change the setting from "continuous" to "discrete" and boot back
281 into Linux. You will now find out that there is no "uncachable" entry anymore
282 and 2D acceleration now works without any glitches.
283 </p>
284
285 </body>
286 </section>
287 <section>
288 <title>I receive warnings about unsupported 4K stack sizes</title>
289 <body>
290
291 <p>
292 <c>nvidia-kernel</c> packages older than 1.0.6106 only support kernels using an
293 8K stack size. More recent kernels (2.6.6 and higher) have support for 4K stack
294 size's as well. Do not select 4K stack size in your kernel configuration if you
295 are using such an <c>nvidia-kernel</c> package. You can find this option in the
296 section <c>Kernel Hacking</c>.
297 </p>
298
299 </body>
300 </section>
301 </chapter>
302
303 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20