The Haus

Installing the NVIDIA XFree86 4.0 Drivers

May 2, 2000 -- by A.T. Hun

As much as I like Linux, one thing that was always troublesome was trying to get decent 3D graphics speed on my TNT. With the old NVIDIA drivers, I couldn't even get good fps on Quake II--I didn't even bother to try Quake III Arena. So when NVIDIA announced their new drivers for XFree86 4.0. I jumped at the chance. Just a warning, this is not something for the faint hearted. If you need your Linux box to do productive work, I would suggest that you don't do this because of the high probability that something will get messed up.

PLEASE NOTE: This worked for me, but it may not work for you. Do not try this and then come complaining to me that you blew up your Linux install. Use this information at your own risk.

For the most part, I tried to follow the directions in NVIDIA's FAQ for these new drivers. I will note the exceptions as I go along. This installation was attempted on a fresh install of Red Hat 6.2. Other distributions may vary slightly.

First I downloaded the necessary XFree86 4.0 RPMS (version 4.0-0.6) from Red Hat's Rawhide FTP. They are also available from RPMFind. The most recent version as of today is 4.0-0.8. Then I downloaded the NVIDIA kernel RPM and the NVIDIA GLX RPM.

I followed the steps outlined in section 3.2 of NVIDIA's FAQ but had a major problem. None of the XFree 4.0 RPMs wanted to overwrite XFree 3.3. So I manually uninstalled all of 3.3 and installed XFree 4.0 in its place. I installed the following packages:

XFree86-100dpi-fonts-4.0-0.6.i386.rpm
XFree86-4.0-0.6.i386.rpm
XFree86-75dpi-fonts-4.0-0.6.i386.rpm
XFree86-devel-4.0-0.6.i386.rpm
XFree86-doc-4.0-0.6.i386.rpm
XFree86-FBDev-4.0-0.6.i386.rpm
XFree86-ISO8859-2-100dpi-fonts-4.0-0.6.i386.rpm
XFree86-ISO8859-2-75dpi-fonts-4.0-0.6.i386.rpm
XFree86-libs-4.0-0.6.i386.rpm
XFree86-tools-4.0-0.6.i386.rpm
XFree86-xdm-4.0-0.6.i386.rpm
XFree86-xf86cfg-4.0-0.6.i386.rpm
XFree86-xfs-4.0-0.6.i386.rpm
XFree86-Xnest-4.0-0.6.i386.rpm
XFree86-Xvfb-4.0-0.6.i386.rpm
XFree86-NVidia-4.0-0.8.i386.rpm

I had to use a newer version of the last file because that's all I could get my hands on at the time. The files in this RPM will be replaced by the kernel and GLX drivers anyway. It may not have been necessary to install xdm, Xnest, or Xvfb (I can't say for sure), but I installed them anyway.

I didn't have to do the symbolic link in steps 8 and 9 of the FAQ because I had the updated version of libncurses which comes with Red Hat 6.2. After setting everything up with xf86config, much to my amazement, everything worked! X came up so I knew I could press on.

I followed the instructions in section 4 of NVIDIA's FAQ to install the kernel driver when I ran into my first problem. I kept getting an error that the RPM couldn't find a file called NVDriver. I ignored it and installed the GLX driver following the steps in section 5 of the FAQ. I also made sure to get rid of the Mesa files (Mesa is an OpenGL-imitator for Linux) crawling around by renaming the libGLcore.a and libglx.a as the FAQ instructed. Eagerly I fired up X. No go. As I feared, the drivers were detecting that my video card had no memory in it (a lot of people have reported that problem). Drat.

Thankfully, I came upon this FAQ for the drivers on Linux Games. One reader said he had the same problem, but downloading the source version of the kernel RPM solved the problem. So I dutifully downloaded the source RPM for the kernel driver and followed the instructions in section 4.2.2 of the FAQ. This time, no error! Joy!

To test everything out I installed the Quake III Arena Linux demo. After changing all the settings to the same as they are on my Win32 box, I ran a timedemo of DEMO001. Only 18 fps. Not very impressive, something else must be wrong.

I found this hint in NVIDIA's FAQ which pointed out that XFree 4.0 itself includes a part of Mesa. So I typed:

mv /usr/X11R6/lib/libGL.so.1.2 /usr/X11R6/lib/libGL.so.1.2.mesa
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so.1.2

and fired up Q3A again.

When I ran the timedemo this time, the speed increase was dramatically noticeable. The final score turned out to be 41.5, just 3 fps off my Win32 score! Pretty impressive, since I couldn't even manage half that many fps in Quake II with the old drivers!

There was one "casualty" of all this. Now I can't get XFS (the X Font Server) to run, so I can't use TrueType fonts right now. I'll have to dig into that a little bit more. Other than that, all my other "usual" programs work fine.

If you aren't that adventurous, I would suggest waiting until Red Hat or another distribution actually packages XFree 4.0 before trying this. That would make things infinitely more simple. NVIDIA also promises that future revisions of the driver will not require you to rename the Mesa files. If you have an NVIDIA card and like 3D games, these drivers are a must-have. If you can wait until XFree 4.0 and these new drivers are a little more stable and easier to install, it might not be bad to wait for a bit.