The Haus

Installing the NVIDIA XFree86 4.0 Drivers, Revisited

October 12, 2000 -- by A.T. Hun

Back in May, I got XFree86 4.0 and the new NVIDIA XFree drivers installed using the Red Hat Rawhide RPMs. Recently, I reinstalled Red Hat 6.2 because my "experimenting" on it had rendered it somewhat unstable. Much to my chagrin, the new Rawhide RPMs assume they are being installed on a Red Hat 7.0 system, so there are broken dependencies galore. Frustrated, I decided to give an XFree86 4 installation one last shot by using the binaries from XFree86's website. Thankfully, it worked. Even better, it was MUCH easier than using the RPMs!

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. The following steps were done on a clean install of Red Hat 6.2.

The Files You Will Need

The NVIDIA 0.9-5 kernel module and GLX driver: These files are available from NVIDIA's website. In my case, I downloaded NVIDIA_kernel-0.9-5.rh62.i386.rpm and NVIDIA_GLX-0.9-5.i386.rpm. NVIDIA seems to take great pleasure in changing their links frequently, so if these two links don't work, just go to NVIDIA's site and click on "Support" to get to their drivers.

The XFree86 4.0.1 binaries: These files are available from XFree86's website. To determine which version of the binaries you will need, go to download Xinstall.sh (in binary mode!) from XFree86's FTP site and then run sh Xinstall.sh -check. It will tell you which version of the binaries to download. In my case with Red Hat 6.2, it was Linux-ix86-glibc21. For simplicity's sake, download the entire directory. If XFree86's FTP server is busy or slow, try one of their mirror sites. The Sunsite UK mirror worked very nicely for me.

Before You Begin

Read the NVIDIA 0.9-5 Driver FAQ and the XFree86 4.0.1 installation guide (this file is a part of the XFree86 binaries download, read the file called Install) thoroughly before you start. Most questions will be answered and common problems addressed in these two documents. Print them out. Read them. They will help tremendously. Trust me.

BACKUP YOUR /usr/X11R6 AND /etc/X11 DIRECTORIES! If something goes wrong, you will be able to copy the old version back and be back in business. To back them up, log in as root and do the following:

cd /usr
cp -rf X11R6 X11R6.336
cd /etc
cp -rf X11 X11.336

If something goes wrong in the installation, you can just delete /etc/X11 and /usr/X11R6, rename /etc/X11.336 to /etc/X11 and /usr/X11R6.336 to /usr/X11R6, and everything will be back to normal. Everything went fine in my installation, but this is definitely a case where an ounce of prevention is worth a pound of cure.

Installing XFree86 4.0.1

Login as root. Run sh Xinstall.sh and follow the prompts. You can answer most of the questions "yes" with the following exceptions. Since I had XFree86 3.3.6 already installed and configured, there was no need to overwrite my configuration files. So whenever the question comes up "Do you want to overwrite whatever package name's config files?" answer "no". At the end of the installation you will be asked if you want to create a link for the rstart utility. Answer "no".

Congratulations, you now have XFree86 4.0.1 installed! Then just run xf86config (you will need to know detailed information on your monitor's refresh rates, your video card, etc.) to create a new XF86Config file. To make sure everything worked, type startx. If everything went according to plan, you should see X running just like it was before you began the installation, except that it's now XFree86 4.0.1! At this point, a reboot would be in order so that the new xdm or xfs can be started if you are running those. (Yes, you could manually restart them, but a ctrl-alt-del is easier in my book.)

Installing the NVIDIA XFree86 4.0.1 Drivers

These directions assume you are using the RPMs. If you are installing the drivers from tarballs, follow the instructions in NVIDIA's 0.9-5 Driver FAQ.

Login as root. Install the kernel driver by typing rpm -Uvh NVIDIA_kernel-0.9-5.rh62.i386.rpm. Change the filename to the name of the kernel RPM you downloaded if you aren't using a single-processor Red Hat 6.2 system. Then install the GLX driver by typing rpm -i --nodeps NVIDIA_GLX 0.9-5.i386.rpm. Change the filename to the name of the GLX RPM you downloaded if you aren't using Red Hat 6.2. The --nodeps switch is necessary because we didn't use RPMs to update XFree86.

Fire up your favorite text editor (vi is my personal choice--it shows my masochistic side). Change the line that reads

Driver      "nv"

and replace it with

Driver      "nvidia"

Make sure that in Section "Module" there is a line that says

Load      "glx"

If there isn't, add it. If there is a # in front of it, remove the #.

That's It!

Now you should have a fully-functioning version of XFree86 4.0.1 with NVIDIA's drivers. Fire up your favorite game like Quake III Arena or Unreal Tournament and blast away! The only problem I have right not is that xfs (the X Font Server) is not working right. I'm sure it's just a minor configuration problem. As soon as I find a solution to that, I'll post it here.