| 1 |
swift |
1.1 |
<?xml version='1.0' encoding="UTF-8"?>
|
| 2 |
neysx |
1.9 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/nvidia-guide.xml,v 1.8 2004/10/19 14:50:22 swift 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 |
|
|
|
| 12 |
|
|
<abstract>
|
| 13 |
|
|
Many Gentooists have an nVidia chipset on their system. nVidia provides specific
|
| 14 |
|
|
Linux drivers to boost the performance of your card. This guide informs you how
|
| 15 |
|
|
to install and configure these drivers.
|
| 16 |
|
|
</abstract>
|
| 17 |
|
|
|
| 18 |
|
|
<license/>
|
| 19 |
|
|
|
| 20 |
swift |
1.8 |
<version>1.6</version>
|
| 21 |
|
|
<date>October 19, 2004</date>
|
| 22 |
swift |
1.1 |
|
| 23 |
|
|
<chapter>
|
| 24 |
|
|
<title>Configuring your Card</title>
|
| 25 |
|
|
<section>
|
| 26 |
|
|
<title>Installing the Appropriate Drivers</title>
|
| 27 |
|
|
<body>
|
| 28 |
|
|
|
| 29 |
|
|
<p>
|
| 30 |
|
|
The nVidia drivers include kernel modules that must integrate in your current
|
| 31 |
|
|
kernel. To accomplish this, your kernel must support the loading of kernel
|
| 32 |
|
|
modules. If you used <c>genkernel</c> to configure the kernel for you then
|
| 33 |
|
|
you're all set. If not, double check your kernel configuration so that this
|
| 34 |
|
|
support is enabled:
|
| 35 |
|
|
</p>
|
| 36 |
|
|
|
| 37 |
|
|
<pre caption="Enabling the Loading of Kernel Modules">
|
| 38 |
|
|
Loadable module support --->
|
| 39 |
|
|
[*] Enable loadable module support
|
| 40 |
|
|
</pre>
|
| 41 |
|
|
|
| 42 |
|
|
<p>
|
| 43 |
swift |
1.5 |
You also need to enable <e>Memory Type Range Register</e> in your kernel:
|
| 44 |
|
|
</p>
|
| 45 |
|
|
|
| 46 |
|
|
<pre caption="Enabling MTRR">
|
| 47 |
|
|
Processor and Features --->
|
| 48 |
|
|
[*] MTRR (Memory Type Range Register) support
|
| 49 |
|
|
</pre>
|
| 50 |
|
|
|
| 51 |
|
|
<p>
|
| 52 |
swift |
1.1 |
nVidia's modules and libraries are combined in two packages: <c>nvidia-glx</c>
|
| 53 |
|
|
and <c>nvidia-kernel</c>. The former are the X11 GLX libraries while the latter
|
| 54 |
swift |
1.3 |
are the kernel modules. Since <c>nvidia-glx</c> depends on <c>nvidia-kernel</c>,
|
| 55 |
|
|
installing <c>nvidia-glx</c> is sufficient:
|
| 56 |
swift |
1.1 |
</p>
|
| 57 |
|
|
|
| 58 |
|
|
<pre caption="Installing the nVidia modules">
|
| 59 |
swift |
1.3 |
# <i>emerge nvidia-glx</i>
|
| 60 |
swift |
1.1 |
</pre>
|
| 61 |
|
|
|
| 62 |
|
|
<p>
|
| 63 |
|
|
Once the installation has finished, run <c>modprobe nvidia</c> to load the
|
| 64 |
|
|
kernel module into memory.
|
| 65 |
|
|
</p>
|
| 66 |
|
|
|
| 67 |
|
|
<pre caption="Loading the kernel module">
|
| 68 |
|
|
# <i>modprobe nvidia</i>
|
| 69 |
|
|
</pre>
|
| 70 |
|
|
|
| 71 |
|
|
<p>
|
| 72 |
|
|
You probably want to have this done each time you boot your system, so edit
|
| 73 |
|
|
<path>/etc/modules.autoload.d/kernel-2.6</path> (or <path>kernel-2.4</path>) and
|
| 74 |
|
|
add <c>nvidia</c> to it. Don't forget to run <c>modules-update</c> afterwards!
|
| 75 |
|
|
</p>
|
| 76 |
|
|
|
| 77 |
|
|
<pre caption="Running modules-update">
|
| 78 |
|
|
# <i>modules-update</i>
|
| 79 |
|
|
</pre>
|
| 80 |
|
|
|
| 81 |
|
|
</body>
|
| 82 |
|
|
</section>
|
| 83 |
|
|
<section>
|
| 84 |
|
|
<title>Configuring the X Server</title>
|
| 85 |
|
|
<body>
|
| 86 |
|
|
|
| 87 |
|
|
<p>
|
| 88 |
|
|
Once the appropriate drivers are installed you need to configure your X Server
|
| 89 |
|
|
(XFree86 or Xorg) to use the <c>nvidia</c> driver instead of the default
|
| 90 |
|
|
<c>nv</c> driver.
|
| 91 |
|
|
</p>
|
| 92 |
|
|
|
| 93 |
|
|
<p>
|
| 94 |
|
|
Open <path>/etc/X11/XF86Config</path> (or <path>/etc/X11/xorg.conf</path>) with
|
| 95 |
|
|
your favorite editor (such as <c>nano</c> or <c>vim</c>) and go to the
|
| 96 |
|
|
<c>Device</c> section. In that section, change the <c>Driver</c> line:
|
| 97 |
|
|
</p>
|
| 98 |
|
|
|
| 99 |
|
|
<pre caption="Changing nv to nvidia in the X Server configuration">
|
| 100 |
|
|
Section "Device"
|
| 101 |
|
|
Identifier "nVidia Inc. GeForce2"
|
| 102 |
|
|
<i>Driver "nvidia"</i>
|
| 103 |
|
|
VideoRam 65536
|
| 104 |
|
|
EndSection
|
| 105 |
|
|
</pre>
|
| 106 |
|
|
|
| 107 |
|
|
<p>
|
| 108 |
swift |
1.4 |
Then go to the <c>Module</c> section and make sure the <c>glx</c> module gets
|
| 109 |
|
|
loaded while the <c>dri</c> module doesn't:
|
| 110 |
|
|
</p>
|
| 111 |
|
|
|
| 112 |
|
|
<pre caption="Updating the Module section">
|
| 113 |
|
|
Section "Module"
|
| 114 |
|
|
<comment>(...)</comment>
|
| 115 |
|
|
<i># Load "dri"
|
| 116 |
|
|
Load "glx"</i>
|
| 117 |
|
|
<comment>(...)</comment>
|
| 118 |
|
|
EndSection
|
| 119 |
|
|
</pre>
|
| 120 |
|
|
|
| 121 |
|
|
<p>
|
| 122 |
swift |
1.1 |
Run <c>opengl-update</c> so that the X Server uses the nVidia GLX libraries:
|
| 123 |
|
|
</p>
|
| 124 |
|
|
|
| 125 |
|
|
<pre caption="Running opengl-update">
|
| 126 |
|
|
# <i>opengl-update nvidia</i>
|
| 127 |
|
|
</pre>
|
| 128 |
|
|
|
| 129 |
|
|
</body>
|
| 130 |
|
|
</section>
|
| 131 |
|
|
<section>
|
| 132 |
|
|
<title>Testing your Card</title>
|
| 133 |
|
|
<body>
|
| 134 |
|
|
|
| 135 |
|
|
<p>
|
| 136 |
|
|
To test your nVidia card, fire up X and run the <c>glxinfo | grep direct</c>
|
| 137 |
|
|
command. It should say that direct rendering is activated:
|
| 138 |
|
|
</p>
|
| 139 |
|
|
|
| 140 |
|
|
<pre caption="Checking the direct rendering status">
|
| 141 |
|
|
$ <i>glxinfo | grep direct</i>
|
| 142 |
|
|
direct rendering: Yes
|
| 143 |
|
|
</pre>
|
| 144 |
|
|
|
| 145 |
|
|
<p>
|
| 146 |
|
|
To monitor your FPS, run <c>glxgears</c>.
|
| 147 |
|
|
</p>
|
| 148 |
|
|
|
| 149 |
|
|
</body>
|
| 150 |
|
|
</section>
|
| 151 |
|
|
</chapter>
|
| 152 |
swift |
1.6 |
|
| 153 |
|
|
<chapter>
|
| 154 |
|
|
<title>Troubleshooting</title>
|
| 155 |
|
|
<section>
|
| 156 |
|
|
<title>Getting 2D to work on machines with 4Gb or more memory</title>
|
| 157 |
|
|
<body>
|
| 158 |
|
|
|
| 159 |
|
|
<p>
|
| 160 |
|
|
If you are having troubles with the nVidia 2D acceleration it is likely that you
|
| 161 |
|
|
are unable to set up a write-combining range with MTRR. To verify, check the
|
| 162 |
|
|
contents of <path>/proc/mtrr</path>:
|
| 163 |
|
|
</p>
|
| 164 |
|
|
|
| 165 |
|
|
<pre caption="Checking if you have write-combining enabled">
|
| 166 |
|
|
# <i>cat /proc/mtrr</i>
|
| 167 |
|
|
</pre>
|
| 168 |
|
|
|
| 169 |
|
|
<p>
|
| 170 |
|
|
Every line should contain "write-back" or "write-combining". If you see a line
|
| 171 |
|
|
with "uncachable" in it you will need to change a BIOS setting to fix this.
|
| 172 |
|
|
</p>
|
| 173 |
|
|
|
| 174 |
|
|
<p>
|
| 175 |
|
|
Reboot and enter the BIOS, then find the MTRR settings (probably under "CPU
|
| 176 |
|
|
Settings"). Change the setting from "continuous" to "discrete" and boot back
|
| 177 |
|
|
into Linux. You will now find out that there is no "uncachable" entry anymore
|
| 178 |
|
|
and 2D acceleration now works without any glitches.
|
| 179 |
|
|
</p>
|
| 180 |
|
|
|
| 181 |
|
|
</body>
|
| 182 |
|
|
</section>
|
| 183 |
swift |
1.7 |
<section>
|
| 184 |
|
|
<title>I receive warnings about unsupported 4K stack sizes</title>
|
| 185 |
|
|
<body>
|
| 186 |
|
|
|
| 187 |
|
|
<p>
|
| 188 |
neysx |
1.9 |
<c>nvidia-kernel</c> packages older than 1.0.6106 only support kernels using an
|
| 189 |
|
|
8K stack size. More recent kernels (2.6.6 and higher) have support for 4K stack
|
| 190 |
|
|
size's as well. Do not select 4K stack size in your kernel configuration if you
|
| 191 |
|
|
are using such an <c>nvidia-kernel</c> package. You can find this option in the
|
| 192 |
|
|
section <c>Kernel Hacking</c>.
|
| 193 |
swift |
1.7 |
</p>
|
| 194 |
|
|
|
| 195 |
|
|
</body>
|
| 196 |
|
|
</section>
|
| 197 |
swift |
1.6 |
</chapter>
|
| 198 |
|
|
|
| 199 |
swift |
1.1 |
</guide>
|