BUG: Driver Fails to Install on 5.12 RC Kernels

I’ve never had any issues installing on a release-candidate kernel before, and I usually start using the release candidates from the first or second rc, but since 5.12 had that weird data corruption issue, I waited until 5.12-rc3. Well, the driver (both the vulkan dev and latest feature branch) fail to install:

Error! Bad return status for module build on kernel: 5.12.0-rc3-139-tkg-cfs (x86_64)
Consult /var/lib/dkms/nvidia/460.56/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m nvidia -v 460.56 -k 5.12.0-rc3-139-tkg-cfs' returned 10

The make.log logfile shows:

  LD [M]  /var/lib/dkms/nvidia/455.50.10/build/nvidia-uvm.o
/var/lib/dkms/nvidia/455.50.10/build/nvidia-drm/nvidia-drm-gem-user-memory.c: In function ‘nv_drm_gem_user_memory_import_sg_table’:
/var/lib/dkms/nvidia/455.50.10/build/nvidia-drm/nvidia-drm-gem-user-memory.c:211:9: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]
  211 |     if (drm_prime_sg_to_page_addr_arrays(sgt, pages, NULL, pages_count) < 0) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         drm_prime_sg_to_dma_addr_array
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /var/lib/dkms/nvidia/455.50.10/build/nvidia-drm/nvidia-drm-gem-user-memory.o] Error 1
make[1]: *** [Makefile:1851: /var/lib/dkms/nvidia/455.50.10/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.12.0-rc3-139-tkg-cfs/build'
make: *** [Makefile:81: modules] Error 2

There’s another message earlier in the log that looks like it might be an error but I think it’s just spam, but here it is:

  CC [M]  /var/lib/dkms/nvidia/455.50.10/build/nvidia/os-mlock.o
/var/lib/dkms/nvidia/455.50.10/build/nvidia/nv-mmap.c: In function ‘nv_encode_caching’:
/var/lib/dkms/nvidia/455.50.10/build/nvidia/nv-mmap.c:334:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  334 |             if (NV_ALLOW_CACHING(memory_type))
      |                ^
/var/lib/dkms/nvidia/455.50.10/build/nvidia/nv-mmap.c:336:9: note: here
  336 |         default:
      |         ^~~~~~~

Anyway, as I’ve said, I’ve tried every driver that supports this GPU (RTX 3090), and obviously as soon as 5.12 comes out as stable, 5.11 will go end of life, so this needs to be fixed as fast as possible.

It’s supposed to be fixed now in 460.67.

Changelog of 460.67 says 5.11 though, not 5.12.

If that is a typo, they made same typo twice.

It wasn’t a typo, because the errors they mention aren’t the same errors that 5.12 was giving.

However, it doesn’t make much sense, because 5.11 has worked on previous driver releases perfectly, ever since 5.11-rc1, I’ve used every version of 5.11 since rc1, and they all worked. Meanwhile 5.12 didn’t, but with 460.67 now it does, in fact, install correctly (on 5.12).