Revisiting Nvidia Driver and CUDA Toolkit install in Fedoa 17/ CentOS 6

After having gone through a lengthy set of instructions for installing Nvidia binary driver and CUDA Toolkit on CentOS, I woke up one day to kernel updates and to my horror post restart, no login screen! Rebooting into to the older kernel worked fine, offering a much needed solace in the midst of thoughts of all the effort having gone down the drain.

It didnt take me much time to realize the culprit: kernel-source-path argument while executing the binary installer (step #7 in previous post). Did this imply I had to manually reinstall the driver everytime the kernel got updated!

Not wanting to waste time repeating mechanical work, I started googling, and thanks to a tuxgeek post, realized a much simpler, hassle free way of managing the Nvidia driver. The steps are as follows:

The install step above can be done in GUI by double clicking on the downloaded .rpm file(s). Now, all that is needed are the following yum commands in the terminal:

  • sudo yum update
  • (Fedora 17) sudo yum install kmod-nvidia xorg-x11-drv-nvidia-libs
  • (CentOS 6) sudo yum install kmod-nvidia nvidia-x11-drv

and one more step to blacklist the open source driver nouveau from loading:

  • su -c        # log in as root
  • echo “blacklist nouveau options nouveau modeset=0” > /etc/modprobe.d/blacklist-nouveau.conf
  • exit         # exit from root environment

Thats it!! 4 lines in terminal instead of the first 9 bulleted steps in the previous post! Kudos to the maintainers of these rpms 🙂 .. But the question remains, does this handle kernel updates. Well, post the availability of a newer kernel, boot into the previous kernel till the time an update for kmod-nvidia arrives. Once its updated, your newer kernel will boot without any fuss!

Unfortunately, the CUDA toolkit steps are still to be followed as given in the previous post. But compared to the driver install, they are practically nothing..

NOTE: CentOS users may have to follow the vga=ask step as given in previous post to see plymouth at boot. Fedora’s “charge” plymouth works out of the box!

UPDATE: As pointed out by Jim, the kmod-nvidia package can be substituted with akmod-nvidia to get uninterrupted Nvidia driver usage even on an updated kernel, thus reducing the wait time to boot to the new kernel to a simple restart, rather than a day or two till the kmod-nvidia package is released in RPMFusion / ELRepo.

3 thoughts on “Revisiting Nvidia Driver and CUDA Toolkit install in Fedoa 17/ CentOS 6

  1. There is a further improvement you can make. That is use the akmod-nvidia rather than the kmod. The akmod will automatically create the kmod if it doesn’t exist for the kernel you are booting. With the kmod you often need to wait for a day or so after a new kernel is released for the matching kmod to appear in RPMFusion.

  2. As far as i know, I dont think so! kmod-nvidia package is good enough in my opinion. Regularly use it on my Fedora powered system without any hitches.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s