Mittwoch, 2. September 2015

How to Patch and Compile the Nvidia Graphics Driver (352.41) for the Realtime Kernel

After installing the realtime kernel as described in this article, Nvidia graphics card owners will probably want to install the official graphics driver from Nvidia (if you're using Ardour you're going to need this driver to get smooth GUI performance). Unfortunately, the installer will just complain about the realtime kernel and quit. With some tweaks it is possible to install it nevertheless. This article describes the installation of the Nvidia driver version 352.41. For different versions you will need a different patch file or perform the patch manually.

Warning: I found that the driver sometimes locks itself up on my system, leading to a frozen image. If 100% stability is a requirement for you, you should not install it. During the installation you will need to stop your desktop session so consider printing this guide or open it up on a different device.

Go ahead if you're ready:
chmod +x NVIDIA-Linux-x86_64-352.41.run
  • Extract the driver source:
./NVIDIA-Linux-x86_64-352.41.run --extract-only
  • Apply the patch file:
less nvidia-352.41-rt.patch | patch NVIDIA-Linux-x86_64-352.41/kernel/nv-linux.h
  • Press Ctrl+Alt+F1 to open up a terminal session and login as root
  • Stop your desktop manager. If you're using XFCE (UbuntuStudio) this is LightDM. Beware that this kills all programs running in the GUI session, including the browser you might be reading this article in:
/etc/init.d/lightdm stop
  • Set this environment variable to disable the a check for the realtime kernel patch in the installer:
export IGNORE_PREEMPT_RT_PRESENCE=1
  • Change directory to the folder where the nvidia driver source was extracted to. 
  • Run the installer just like you normally would:
./nvidia-installer
  • Restart your desktop manager:
/etc/init.d/lightdm start

Your system should now use the freshly installed driver!

If you want to adapt this process for a different driver version, you will need to take a look what the patch actually does and make those changes to the nv-linux.h file manually. If you do so, it would be very nice of you to create a new patch file and post it here in the comments. Of course, there's no guarantee that this will work for newer driver versions.

References:

Keine Kommentare:

Kommentar veröffentlichen