Trouble Installing NVidia Drivers

So I’ve made progress by disabling Nouveau](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjuhtzEn_7wAhUTEFkFHR4DDSsQFjAAegQIBhAD&url=https%3A%2F%2Fnouveau.freedesktop.org%2F&usg=AOvVaw1vuZKiGoX8YdWwUWay5doa) drivers in order to install my nvidia drivers, however now i’m having trouble getting past this next issue:

Neither the ‘/usr/src/linux/include/linux/version.h’ nor the
‘/usr/src/linux/include/generated/uapi/linux/version.h’ kernel header file
exists. The most likely reason for this is that the kernel source files in
‘/usr/src/linux’ have not been configured.

I’m running openSUSE Tumbleweed on a laptop with a dedicated graphics card Nvidia Geforce GTX 1650 Max-Q

I’ve tried installing kernel-devel packages and i’ve searched all over the web, this is day 3 of working on this, i could use some help. Thanks guys.

Please read this sticky https://forums.opensuse.org/showthread.php/554787-Snapshot-20210527-Usr-merge-and-compile-kernel-modules and follow advice from malcolmlewis and arvidjaar

See:
https://forums.opensuse.org/showthread.php/554826-nvidia-module-won-t-build-after-update

I got farther, it now attempts to create the nvidia kernel, but now i get this in my logs:

cc1: some warnings being treated as errors
compilation terminated.
In file included from /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/nvidia/nvlink_linux.c:30:
/tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/common/inc/nv-linux.h: At top level:
/tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/common/inc/nv-linux.h:118:10: fatal error: asm/kmap_types.h: No such file or directory
  118 | #include <asm/kmap_types.h>         /* page table entry lookup          */
      |          ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[3]: *** [/usr/src/linux-5.12.4-2/scripts/Makefile.build:272: /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/nvidia/nv_uvm_interface.o] Error 1
make[3]: *** [/usr/src/linux-5.12.4-2/scripts/Makefile.build:272: /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/nvidia/nvlink_linux.o] Error 1
In file included from /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/nvidia/linux_nvswitch.c:28:
/tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/common/inc/nv-linux.h: At top level:
/tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/common/inc/nv-linux.h:118:10: fatal error: asm/kmap_types.h: No such file or directory
  118 | #include <asm/kmap_types.h>         /* page table entry lookup          */
      |          ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[3]: *** [/usr/src/linux-5.12.4-2/scripts/Makefile.build:272: /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel/nvidia/linux_nvswitch.o] Error 1
make[3]: Target '__build' not remade because of errors.
make[2]: *** [/usr/src/linux-5.12.4-2/Makefile:1865: /tmp/selfgz3447/NVIDIA-Linux-x86_64-430.09/kernel] Error 2
make[2]: Target 'modules' not remade because of errors.
make[2]: Leaving directory '/usr/src/linux-5.12.4-2-obj/x86_64/default'
make[1]: *** [Makefile:215: __sub-make] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-5.12.4-2'
make: *** [Makefile:79: modules] Error 2
ERROR: The nvidia kernel module was not created.
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.


Not sure why you are using driver 430.09, I think that with Tumbleweed and kernel 5.12.4 you should use 460.80 instead.