nvidia 515.65.01 drivers fail to build on 6.0.0-1 kernel

Hi,

I thought I’d give tumbleweed a try as a possible replacement for fedora and I ran into an issue that I thought I’d flag.

I tried to following https://en.opensuse.org/SDB:NVIDIA_drivers instructions, but at the end got a non-functioning desktop.

The problem appears to have been a change to drm framebuffer which requires it get an explicit include for 6.0.0-1 kernels: https://forums.developer.nvidia.com/t/install-of-driver-515-65-01-failing-on-some-kernels/223430/10

Annoyingly the rpm build looks at first glace to have worked and it’s only after suspecting that something must have gone wrong and looking through the build logs that turned up an error.


/usr/src/kernel-modules/nvidia-515.65.01-default/nvidia-drm/nvidia-drm-helper.c:47:5: error: implicit declaration of function ‘drm_framebuffer_put’ -Werror=implicit-function-declaration]
   47 |     drm_framebuffer_put(fb);
      |     ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-6.0.0-1/scripts/Makefile.build:250: /usr/src/kernel-modules/nvidia-515.65.01-default/nvidia-drm/nvidia-drm-helper.o] Error 1
make[2]: *** [/usr/src/linux-6.0.0-1/Makefile:1866: /usr/src/kernel-modules/nvidia-515.65.01-default] Error 2
make[2]: Leaving directory '/usr/src/linux-6.0.0-1-obj/x86_64/default'
make[1]: *** [Makefile:222: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.0.0-1'
make: *** [Makefile:82: modules] Error 2
/
install: cannot stat '/usr/src/kernel-modules/nvidia-515.65.01-default/nvidia*.ko': No such file or directory

See following threads.
https://forums.opensuse.org/showthread.php/576445-No-Display-with-linux-6-0-0-1?highlight=nvidia
https://forums.opensuse.org/showthread.php/555096-No-xserver-after-installing-update-to-(VERSION_ID)-20210604-with-zypper-dup?highlight=nvidia
https://forums.opensuse.org/showthread.php/576403-No-GUI-after-upgrade-(on-Kernel-6)?highlight=nvidia

and bugreport:
https://bugzilla.opensuse.org/show_bug.cgi?id=1204143