Nvidia 470.141.03 - Kernel 6

Currently Nvidia 470.141.03 does not build against Linux Kernel 6.0.
Can you please update for the latest kernel support?

for a patch see 470xx drivers and linux 6.0 kernel

I tryed this patch on my Gentoo amd64 with kernel 6.0.5 and… it hangs loading the nvidia-drm module by generating a segmentation fault (invalid OPCODE).

I will try it with kernel 6.0.6 today, but I’m not so sure it will be different. Anyone who tryed to apply the Debian patchset (that someone in the Arch forum told it was able to generate a working driver with 6.x kernel)?

Iade

I finally got a working patchset that works with kernel 6.0.6. I downloaded the following patches from the debian repository (https://sources.debian.org/src/nvidia-graphics-drivers-tesla-470/470.141.03-3/debian/module/debian/patches/):

  • 0020-backport-get_task_ioprio-changes-from-510.85.02.patch
  • 0021-backport-acpi-changes-from-510.85.02.patch
  • 0022-backport-acpi-changes-from-515.65.01.patch
  • 0023-backport-drm_frambuffer.h-changes-from-515.76.patch

I created a custom ebuild for my Gentoo, just applying patches after the ones yet applyed by the original ebuild and… the magic happened :)

Iade

I tried it on my gentoo with kernel 6.0.6 and nvidia-driver 470.141.03, but without success. I added all 4 patches:

pc-marek /etc/portage/patches/x11-drivers/nvidia-drivers-470.141.03 # ll
total 44
drwxr-xr-x 2 root root  4096 Nov  7 11:19 .
drwxr-xr-x 6 root root  4096 Nov  7 10:52 ..
-rw-r--r-- 1 root root  2658 Oct 24 18:00 0020-backport-get_task_ioprio-changes-from-510.85.02.patch
-rw-r--r-- 1 root root 20167 Oct 24 18:00 0021-backport-acpi-changes-from-510.85.02.patch
-rw-r--r-- 1 root root  4874 Oct 24 18:00 0022-backport-acpi-changes-from-515.65.01.patch
-rw-r--r-- 1 root root  1228 Oct 24 18:00 0023-backport-drm_frambuffer.h-changes-from-515.76.patch

And compilation of nvidia-driver crashed with error:

 * Applying user patches from /etc/portage/patches ...
 * Applying 0020-backport-get_task_ioprio-changes-from-510.85.02.patch ...
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
.
.
.
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
 [ !! ]
 * ERROR: x11-drivers/nvidia-drivers-470.141.03::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-drivers/nvidia-drivers-470.141.03/0020-backport-get_task_ioprio-changes-from-510.85.02.patch

Fixed. I haved to in all patches modified path and added there folder kernel, example:
from: diff --git a/nvidia/nv.c b/nvidia/nv.c
to: diff --git a/kernel/nvidia/nv.c b/kernel/nvidia/nv.c

Tested too on 6.0.7-gentoo-x86_64 with x11-drivers/nvidia-drivers-470.141.03 Work properly.