Saturday, February 8, 2014

Kernel-ml, NVIDIA Drivers, and the 3.13.x kernel

ELRepo has a Main Line kernel section to allow using the latest kernel with CentOS-6.  I use this kernel on my laptops and workstations as it usually means better hardware detection and battery life, etc.

If you have the need to use the proprietary NVIDIA drivers with this kernel, as I do on one of my laptops, then you would need to install the latest NVIDIA drivers for each kernel.  No one (that I know of at least) maintains an RPM based module for the kernel-ml series, so downloading the latest version of the drivers from NVIDIA's site is how I handle this situation.

Sometimes with a new kernel tree is begun, in this case the 3.13.x kernel tree, the NVIDIA drivers as posted with not work.  This is the current situation with the 3.13.2 kernel (as installed via ELRepo on CentOS 6.5 ) when using the latest NVIDIA drivers (currently version 338.31).

On the web, I found a good blog entry on how to generally fix the issue, so I thought I would go over how to make it work on CentOS-6.

  • Enable the ELRepo repository (if required) using their instructions here.
  • Install the ELRepo kernel-ml via their instructions here.
  • Download the latest NVIDIA Drivers from the NVIDIA site.
  • Change the permissions on the downloaded binary file so it can be executed:
chmod 755 NVIDIA-Linux-x86_64-331.38.run
  • Extract the NVIDIA drivers with this command in a terminal:
./NVIDIA-Linux-x86_64-331.38.run -x

  • Download the combined (2nd) patch from the above blog and save it (right click, save link as) into the NVIDIA-Linux-x86_64-331.38 directory created when extracting the driver above.
  • Apply the patch with this command:
patch -p1 < 02_nvidia_3.13.patch

  • Reboot into the new kernel (will get console mode, login as root) ... then go to the  NVIDIA-Linux-x86_64-331.38 that contains the patched code.
  • Install the patched driver with this command:
./nvidia-installer
The install should now complete in the normal way, and you should be able to boot into the NVIDIA driver on the 3.13.x kernel-ml series from ELRepo on CentOS-6.5

No comments:

Post a Comment