340.96 X86 does not compile w/ Kernel 4.6.0.1 Suse Tumbleweed

Dear Sirs!

Now with 4.6.0.1 compilation (as I always have do do it w/ new kernel) the attached issue came up. It seems Suse (?) changed parameters in kernel sources… Its the http://www.nvidia.com/Download/driverResults.aspx/95164/en-us which I need for my 9300 GS.

nvidia-installer.log starts with a hint to do make oldconfig in kernel sources:

========================================
Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 340.96.
-> There appears to already be a driver installed on your system (version: 340.96). As part of installing this driver (version: 340.96), the existing driver will be uninstalled. Are you sure you want to continue? (Answer: Continue installation)
-> Running distribution scripts
executing: ‘/usr/lib/nvidia/pre-install’…
grep: /etc/sysconfig/kernel: No such file or directory
-> done.
-> The distribution-provided pre-install script completed successfully. If this is the first time you have run the installer, this script may have helped disable Nouveau, but a reboot may be required first. Would you like to continue, or would you prefer to abort installation to reboot the system? (Answer: Continue installation)
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: ‘/lib/modules/4.6.0-1-pae/source’
-> Kernel output path: ‘/lib/modules/4.6.0-1-pae/build’
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Cleaning kernel module build directory.
executing: ‘cd ./kernel; /usr/bin/make clean’…
-> Building NVIDIA kernel module:
executing: ‘cd ./kernel; /usr/bin/make module SYSSRC=/lib/modules/4.6.0-1-pae/source SYSOUT=/lib/modules/4.6.0-1-pae/build NV_BUILD_MODULE_INSTANCES=’…
NVIDIA: calling KBUILD…
make[1]: Entering directory ‘/usr/src/linux-4.6.0-1’
/usr/bin/make -C /lib/modules/4.6.0-1-pae/build KBUILD_SRC=/usr/src/linux-4.6.0-1
-f /usr/src/linux-4.6.0-1/Makefile modules
make[2]: Entering directory ‘/usr/src/linux-4.6.0-1-obj/i386/pae’
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo >&2;
echo >&2 " ERROR: Kernel configuration is invalid.";
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";
echo >&2 " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo >&2 ;
/bin/false)

========================================================================================

which I did.

The error portion then is

========================================================================================
In file included from /tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/nv-linux.h:68:0,
from /tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.c:15:
/usr/src/linux-4.6.0-1/include/linux/mm.h:1266:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘NvBool {aka unsigned char}’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.c:48:11: error: too many arguments to function ‘get_user_pages’
ret = get_user_pages(current, mm, (unsigned long)address,
^
In file included from /tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/nv-linux.h:68:0,
from /tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.c:15:
/usr/src/linux-4.6.0-1/include/linux/mm.h:1266:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.c:61:13: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
page_cache_release(user_pages[i]);
^
cc1: some warnings being treated as errors
/usr/src/linux-4.6.0-1/scripts/Makefile.build:292: recipe for target ‘/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.o’ failed
make[3]: *** [/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel/os-mlock.o] Error 1
/usr/src/linux-4.6.0-1/Makefile:1454: recipe for target ‘module/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel’ failed
make[2]: *** [module/tmp/selfgz2021/NVIDIA-Linux-x86-340.96/kernel] Error 2
make[2]: Leaving directory ‘/usr/src/linux-4.6.0-1-obj/i386/pae’
Makefile:146: recipe for target ‘sub-make’ failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory ‘/usr/src/linux-4.6.0-1’
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:184: recipe for target ‘nvidia.ko’ failed
make: *** [nvidia.ko] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

The README mentioned above did actually not point me to solving the error.
I am well aware I should have sticked to 13.2 and not install tumbleweed…

Possibly unrelated issue came up with 4.4.0.1 when dvb-t broke (tda10048, 05:01.0 Multimedia controller: Philips Semiconductors SAA7131/SAA7133/SAA7135 Video Broadcast Decoder (rev d1)). The system froze when starting kaffeine in DVB-T. dvbstream and dvbtune same situation. Another Conexant DVB-S card works w/o issues still.05:02.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)

Please help

Thanks a lot!

nvidia-installer.log (261 KB)

I saw patches attached to https://devtalk.nvidia.com/default/topic/938230/linux/304-131-for-kernel-4-6/. Will look at these tomorrow - maybe the patch to nv-mlock can help to solve my os-mlock.c issue…

Did it work? I’m noob to opensuse and forgot to check if Nvidia patched :(

Please try it [1] (Arch Linux)

[1] https://git.archlinux.org/svntogit/packages.git/plain/trunk/linux-4.6.patch?h=packages/nvidia-340xx

Dear blablo!

worked like a charm. You work for NVIDIA ? They must be lucky to employ you!

Thanks a lot!

Worked with 4.6.2, thanks!

The patch is dead link. Can anyone repost it?

https://git.archlinux.org/svntogit/packages.git/plain/trunk/linux-4.6.patch?h=packages/nvidia-340xx&id=bb665d69eca74f01003cb41112448260a1597dc4