Installing nVidia drivers in Fedora Core 2

Geoffrey Leach geoff at direcway.com
Tue May 25 20:24:54 UTC 2004


The stock nVidia drivers require a specially-configured 2.6.6 kernel. 
The kernel that's part of the stock Fedora Core 2 release is 2.6.5. 
The nVidia drivers won't work with this kernel.  Don't waste your time trying.
That way lies madness!

If you want to get your nVidia card back, here's what you do.

First build a 2.6.6 kernel.  See my posting "Building a 2.6.6 kernel". 
In particular, note that there kernel configuration options CONFIG_4KSTACKS
and CONFIG_REGPARM must be unselected.  In fact, that's the whole point of
the exercise.

Once you've got your 2.6.6 kernel up and running, you're ready for some real
fun.

Go to http://www.nvidia.com/object/linux.html and select the link for your
environment.  (If you have an nForce card, you're on your own.  My experience is
limited to the Graphics Drivers.) The first thing that you need to do is to 
ead the README.  This is an excellent document and has lots of useful
information in it.  Having done that, download the driver file. 
This is a self-extracting shell archive, that is intended to do everything
for you.  Note that it has a bunch of options, per the README.

Full disclosure: in Fedora I trust, all others I don't.  Call me paranoid,
but I don't like running code that I don't know as root.  Hence, I don't
have any experience with the, "Just do it" approach here, although I've no
reason to suspect it.

Doing it the hard way.

You've downloaded the driver file into /usr/local/src/nvidia. The file is 
NVIDIA-Linux-x86-1.0-5336-pkg1.run, or something similar.  Extract the contents:

	% sh NVIDIA-Linux-x86-1.0-5336-pkg1.run --extract-only
	% cd NVIDIA-Linux-x86-1.0-5336-pkg1/
	% make
	It is NOT recommended that you use this Makefile to install
	the NVIDIA driver.  Instead, please use the nvidia-installer
	utility.  However, should nvidia-installer not operate for you,
	you may use this Makefile as a last resort.  To install using
	this Makefile, please run 'make install'.

OK, you've been warned. :-)

One thing that 'make install' will do for you is to remove a bunch of installed
libraries, which will make difficult to back out these changes. 
I suggest doing a backup.

	% mkdir original_libs
	% cp /usr/lib/libGL.* original_libs
        % cp /usr/lib/libGLcore.* original_libs
        % cp /usr/lib/libGLwrapper.* original_libs
        % cp /usr/lib/tls/libGL.* original_libs
        % cp /usr/lib/tls/libGLcore.* original_libs
        % cp /usr/lib/tls/libGLwrapper.* original_libs
        % cp /usr/X11R6/lib/libGL.* original_libs
        % cp /usr/X11R6/lib/libGLcore.* original_libs
        % cp /usr/X11R6/lib/libXvMCNVIDIA.* original_libs
        % cp /usr/X11R6/lib/libGLwrapper.* original_libs
        % cp /usr/X11R6/lib/tls/libGL.* original_libs
        % cp /usr/X11R6/lib/tls/libGLcore.* original_libs
        % cp /usr/X11R6/lib/tls/libXvMCNVIDIA.* original_libs
        % cp /usr/X11R6/lib/tls/libGLwrapper.* original_libs
        % cp /usr/X11R6/lib/modules/extensions/libGLcore.* original_libs
        % cp /usr/X11R6/lib/modules/extensions/libglx.* original_libs
        % cp /usr/X11R6/lib/modules/extensions/libGLwrapper.* original_libs

Now you need to become root.  The install process is going to put things where
only root can go.

	# make install 2>&1 | tee install.log

In addition to removing and re-installing the above files, this also builds the
subdirectory usr/src/nv, which is the kernel interface to the graphics drivers.
In my environment, this file is installed as
	
	/lib/modules/2.6.6ex/kernel/drivers/video/nvidia.ko. 

The makefile also runs ldconfig.  I'm not on firm ground here, but it appears
that it adds 'alias char-major-195* nvidia' to /etc/modprobe.conf, and tries to
load the kernel module nvidia.ko you just built.  If you are running X, this
will only work the first time you try it.  Once you're running with the new
drivers, the module will be in use and can't be updated.  This means that you
have to be outside of X, which means that you can't use the X-based Fedora
login (or gdm).

In preparation for running your new drivers, as root, edit /etc/inittab
and edit the line
	
	id:5:initdefault:

changing the '5' to a '3'.  This means on you next boot you'll use the
text-based login.

Finally, go to /etc/X11 and move XF86Config to xorg.conf, if the latter file
does not exist.  (This is a minor error in the Fedora Core 2 upgrade; I've no
idea if it applies to the install.) Make a backup copy of xorg.conf. 
Now, edit xorg.conf, find the line 

	Driver "nv"

and change it to

	Driver "nvidia" 

You should also remove the following lines:
      
        Load  "dri"
        Load  "GLcore"

if they exist.

OK, you're good to go.  You should be running your nVidia driver on the next
startup of X.  Of course, you're going to get a text-based login, so you will
have to say

	% startx

You can change /etc/inittab to its original state once things are working. 
If startx fails, then you must restore your xorg.conf at the very least. 
You may also have to restore the libraries -- fortunately I haven't had that
experience.

All-in-all, I think that nVidia has done an excellent job of providing and
documentating their Linux product.  The only quibble I have is that they don't
save to original files.





More information about the fedora-list mailing list