Problems compiling NVIDIA driver after update of Tumbleweed from Kernel 4.5 to 4.6

Today, I decided to update my Tumbleweed installation on my old laptop. I have an old Nvidia GPU on it so I use the 340.96 version of the driver from here: Unix Drivers | NVIDIA

Unfortunately, it seems that that version of the nvidia driver is no longer compatible with kernel 4.6 so I was getting the following error:

error: too many arguments to function ‘get_user_pages’

After a few hours I managed to fix it by googling and patching the nvidia driver. Was thinking maybe someone else might stumble on the same problem so here is a link to the patch and how to apply it: GitHub - alexandru-m-g/PATCHING-THE-NVIDIA-DRIVER-340.96: PATCHING THE NVIDIA DRIVER 340.96 FOR KERNEL 4.6

Hope it helps

Hi
There are a couple of forum threads about this, as well as [opensuse-factory] Patch for NVIDIA driver on kernel 4.6 - openSUSE Factory - openSUSE Mailing Lists from a Kernel Developer (this patch allows working with other kernels…), maybe update your one?

Hi,
thanks for pointing me to the mailing list. I didn’t get the patch from there working, probably because of the formatting and missing whitespaces. I updated the Readme to point to it as well.