Installing NVIDIA drivers manually on FC4

From FedoraNEWS.ORG

Written by Andre Costa on 2005-12-25

UPDATE [2006-01-22] More tips came in, and Upgrade Procedure section has been divided into subsections for different scenarios. Also, added tip by Jeremie Cassiman.

UPDATE [2006-01-09] Well, it turned out I was missing one key step to the upgrade process: the kernel-devel package. A couple of good folks (Vic Ricker and Bob Arendt so far) quickly sent me emails to open my eyes and show me things could be much easier than what I have been doing for a long time already. ... Well, at least I was honest when I said I was not claiming that was the best approach -- and, yes, I really did it the way I described.

For the sake of keeping a record for others that don't want to or can't use livna.org NVidia RPMs, I will describe below the "shorter version" of my mini-HOWTO. I just tried it myself and it works like a charm. It is embarrassingly smaller than the original version but, hey, mom always taught me to learn from my mistakes ;-)

If anyone wants to check the original (longer, cumbersome, but still correct) version of this article, just follow the link.

Table of contents

Required Packages

All you need is:

  • kernel RPM (http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/i386/kernel-2.6.14-1.1656_FC4.i686.rpm)
  • kernel-devel RPM (http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/i386/kernel-devel-2.6.14-1.1656_FC4.i686.rpm)
  • NVIDIA-Linux-x86-1.0-8178-pkg1.run (http://download.nvidia.com/XFree86/Linux-x86/1.0-8178/NVIDIA-Linux-x86-1.0-8178-pkg1.run)

image:idea.png IMPORTANT

  • grab kernel packages that fit your environment (links above point to i686 packages)
  • always grab latest versions, both for kernel and driver packages (links above point to the most current version at the moment this HOWTO was written)

Upgrade Procedure

If you're messing with NVIDIA driver, there are only two possible reasons for that: either you're upgrading to a new kernel or you're installing a new driver version. I will cover both possibilities. Either way, make sure you have both kernel and kernel-devel packages installed for the target kernel. All following procedures must be done as root.

Kernel Upgrade

NOTE: only one of the two approaches described below is needed. Pre-reboot Setup is simpler and more straightforward than Post-reboot Setup.

Pre-reboot Setup

Tip submitted by Jeremie Cassiman.

If you just upgraded kernel but haven't rebooted your system yet, you can compile a new version of the driver for the new (still not running) kernel with:

./NVIDIA-Linux-x86-1.0-8178-pkg1.run -k [new kernel name] -aqn

where you should replace [new kernel name] with the "name" of the new kernel, such as in

./NVIDIA-Linux-x86-1.0-8178-pkg1.run -k '2.6.14-1.1644_FC4' -aqn

image:idea.png You can check which kernel versions are installed with rpm -q kernel (or rpm -q kernel-smp if you're on a multi-processor machine), just drop the kernel- prefix.

This will generate and install a new version for the new kernel. When you reboot into the new kernel, NVIDIA driver will automatically come up.

Post-reboot Setup

Ok, so for any reason (automatic update, or you just forgot to follow procedures described above) you just booted into the newly installed kernel. X11 won't start, because there's no NVIDIA module for the new kernel yet; so, either you skip runlevel 5 or wait until X11 gives up trying to start.

  • runlevel 5 is the runlevel associated to graphical login. In order to skip it, you must tell your boot loader which runlevel you want to boot into. You do this by appending init # to your boot line, where # should be replaced by the intended runlevel.
    Possible options are 1 (single user), 2 (network only) or 3 (NFS). Check this article at Linux.com (http://enterprise.linux.com/enterprise/06/01/03/1728227.shtml?tid=129) for more info on runlevels
  • runlevel 1 could cause obscure installation problems (refer to installer's help for --no-runlevel-check parameter), so you're better off avoiding it

Now that you're out of runlevel 5, go to the directory where you copied NVIDIA driver and run:

./NVIDIA-Linux-x86-1.0-8178-pkg1.run -aqn

This will generate a new kernel module, and upgrade the existing one.

Aftert this you can go to runlevel 5 with:

init 5; logout

You can check the version you're running with:

cat /proc/driver/nvidia/version

In case you want to see what happened behind the curtains, driver installation log is located at /var/log/nvidia-installer.log

Driver Upgrade

If you just need to upgrade NVIDIA driver, you will follow the same steps described on the Post Reboot Setup section above, except that the reboot itself is not needed since running kernel is already the target kernel. This means you need to force your way out of runlevel 5, upgrade the driver and go back to runlevel 5. This can be done with:

init 2
# go to the dir where you copied NVIDIA driver package
./NVIDIA-Linux-x86-1.0-8178-pkg1.run -aqn
init 5 ; logout

That's it, you're all set. Enjoy your new kernel and/or driver in all its full glory ;-)

X11 Configuration

X11 configuration is beyond of the scope of this document. Please consult /usr/share/doc/NVIDIA_GLX-1.0/README.txt for additional information.

[UNTESTED] Alternatively, you can try a new feature introduced with driver v8178, which asks NVIDIA installer to configure X11 for you. Just add -X parameter to upgrade command-line as in:

./NVIDIA-Linux-x86-1.0-8178-pkg1-custom.run -aqnX

However, as I said earlier, you shouldn't need to tweak X11 settings on /etc/X11/xorg.conf if you're upgrading from a previously configured NVIDIA installation.

Final Words

Thks Vic, Bob and Jeremie for the tips. I still hope this mini-HOWTO is helpful to some. Again, let me know (mailto:blueser@gmail.com) if you believe I could improve this in any way, or if there is any incorrect information listed here.

Personal tools