XFree86 4.0.1, NVIDIA, and Mandrake 7.2
November 8, 2000 -- by A.T. Hun
Last week, J.t.Qbe was kind enough to send me a copy of the Mandrake 7.2 installation disks. I figured this would be a great chance to update my Linux distribution. There's a lot of things to like about Mandrake 7.2. It includes XFree86 4.0.1 and KDE2. It detected and properly set up my PCMCIA wireless ethernet card. It even comes with USB support!
Unfortunately, not everything is so good. Even though it installs XFree86 4.0.1, when it configures X at the end of the installation process, it installs the server and SVGA drivers from XFree86 3.3.6! You end up with a hybrid system that won't work with the NVIDIA drivers.
Thankfully, after a quick check of the Usenet on Deja.com, I found a solution. Most of this document is based on Linux Frog's NVIDIA Tips. I changed a few things to make them more clear (in my mind, anyway).
You will need: Mandrake 7.2 (duh) and the NVIDIA Linux drivers. If there is a kernel RPM specifically for Mandrake 7.2 (there isn't one as of this writing), use that. Otherwise, download the kernel source RPM named NVIDIA_kernel-0.9-5.src.rpm. Also download the GLX RPM named NVIDIA_GLX-0.9-5.i386.rpm.
Step One: Fixing Mandrake's XFree86 4.0.1 Installation
If you are in X, shut it down. All this will need to be done from the command line. You will need to do the following steps as root. First of all, check to make sure Mandrake 7.2 did indeed mess up the installation. Type:
rpm -qa|grep XFree
Somewhere in the list of results you should see the following:
If you don't see those, then you don't have this problem and you can stop reading now. Otherwise, let's press on. Type the following commands to uninstall those two XFree86 3.3.6 packages:
rpm -e XFree86-SVGA-3.3.6-18mdk
rpm -e XFree86-server-common-3.3.6-18mdk
Next, pop your Mandrake 7.2 disk into your CD-ROM drive so we can install the XFree86 4.0.1 server. Type:
rpm -ivh /mnt/cdrom/Mandrake/RPMS/XFree86-server-4.0.1-28mdk.i586.rpm
Installing the NVIDIA 0.9-5 Drivers
Take the NVIDIA kernel RPM you created from the source RPM and install it by typing:
rpm -ivh NVIDIA_kernel-0.9-5.src.rpm
This creates a .spec file in /usr/src/RPM/SPECS named NVIDIA_kernel.spec. There may be some numbers at the end of the filename too. Just include them at the end of the next command. Issue the next two commands to make and install the kernel driver:
rpm -ba /usr/src/RPM/SPECS/NVIDIA_kernel.spec
rpm -ivh /usr/src/RPM/RPMS/i686/NVIDIA_kernel-0.9-5.i686.rpm
If the RPM is not in /usr/src/RPM/RPMS/i686 then check the other directories in /usr/src/RPM/RPMS. It will be in one of them. Just change the i686 in the last command to whatever directory you find it in. Then install the GLX module by typing:
rpm -ivh NVIDIA_GLX-0.9-5.i386.rpm
Configuring XFree86 4.0.1
Run the program xf86config and answer all the questions. You will need to know your monitor's refresh ranges and other information about your computer. It's not the most user-friendly utility in the world, but it works!
Fire up your favorite text editor (vi is my personal choice--it shows my masochistic side). Change the line that reads
and replace it with
Make sure that in Section "Module" there is a line that says
If there isn't, add it. If there is a # in front of it, remove the #.
Check to see if there is a file called XF86Config-4 in /etc/X11. If there is, delete it. Last, but not least, we need to fix the symbolic link so it points to the right version of X. Type the following commands to fix it:
ln -s /usr/X11R6/bin/XFree86 X
Now you should be able to type startx and be in XFree86 4.0.1 with the NVIDIA 0.9-5 drivers! Once again, a special thanks goes out to Linux Frog for doing all the hard work on this one.