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.