I have thoroughly tested the attached driver PATCH which RESOLVES the issue of NVIDIA Linux Driver 340.98 (x86_64) not working with Linux Kernel 4.9 (Forum Reference: https://devtalk.nvidia.com/default/topic/973807/linux/nvidia-linux-x86_64-340-98-driver-not-building-with-kernel-4-9-0-rc2-/).
The patch works like a charm!
First, credit and many “thanks” goes out to those who originally created the patch (I only fine-tuned it for use here):
Link to original PATCH info: https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.98-0ubuntu2
To Michael Marley for adding support for Linux Kernel 4.9 & for finding out about the new required DRIVER_LEGACY flag
To Alberto Milone for uploading it to launchpad.net
To Ubuntu / Canonical Group
PATCH on Pastebin: http://pastebin.com/raw/0XE0e8Wx
For those who need it, my brief set of Instructions for Applying the Patch to Nvidia Driver 340.98 using Linux Kernel 4.9 in CLI/Terminal:
- Download the following NVIDIA binary/driver file from NVIDIA website for Linux: NVIDIA-Linux-x86_64-340.98.run
- Go into CLI/Terminal
- Provide execution permissions: chmod 755 NVIDIA-Linux-x86_64-340.98.run
- Extract: ./chmod 755 NVIDIA-Linux-x86_64-340.98.run --extract-only
- Copy Patch File “nv_patch_340.98_final” into “NVIDIA-Linux-x86_64-340.98” directory
- Go into (cd into) “NVIDIA-Linux-x86_64-340.98” directory where patch file is now located
- Apply Patch: patch -p0 < nv_patch_340.98_final
- Proceed with NVIDIA Driver Installation, Enjoy!
NOTE: NVIDIA DEVS may want to pin this post and incorporate the fully functioning patch into the driver.
nv_patch_340.98_final.zip (856 Bytes)