Saturday, May 6, 2017

Compiling Nvidia 340.102 driver for Linux 4.10.x kernel

Upgraded my Tumbleweed to kernel 4.10.x and Nvidia 340 driver won't build.  Until Nvidia fix it, here are steps to patch the 340.102 driver to make it works.

Download the 340.102 driver from Nvidia:

Unpack the driver:
./ -x

Apply patch for kernel 4.9.x:

Apply patch for kernel 4.10.x:

Proceed to install. Note that the unified memory module can't be built with this patch, so we are disabling it:
sudo ./nvidia-installer --no-unified-memory