Patching 5.9 kernel to use Nvidia driver

This message might be premature, but my impression from reading a couple of messages in the opensuse-factory mailing list is that I may have to patch the 5.9 kernel to use it with the nvidia driver:

Jiri Slaby:
Hans-Peter Jansen: (linking to ).

I installed nvidia ‘the hard way’ on a desktop and laptop. When a new kernel arrives, I reboot to terminal after zypper dup, run sh* to install the driver, mkinitrd and reboot. Quick and easy.

It wouldn’t be hard to add the extra step of applying a patch before running *sh … but I don’t know if I can patch a kernel that way to fix this problem, or even which of the installed kernel files would take the patch. Excluding kernel-firmware files, zypper se -si 'kernel’ says that I have installed:

i+ | kernel-default              | package | 5.8.14-1.2   | x86_64 | Main Repository (OSS)
i+ | kernel-default-devel        | package | 5.8.14-1.2   | x86_64 | Main Repository (OSS)
i+ | kernel-devel                | package | 5.8.14-1.2   | noarch | Main Repository (OSS)
i+ | kernel-macros               | package | 5.8.14-1.2   | noarch | Main Repository (OSS)
i  | kernel-source               | package | 5.8.14-1.2   | noarch | Main Repository (OSS)
i+ | kernel-syms                 | package | 5.8.14-1.2   | x86_64 | Main Repository (OSS)

Any thoughts will be appreciated. If I’d have to patch the source and compile, I’d likely look unhappily at a change to Leap.

I also see from that I could run the installer on an unpatched kernel with the -no-unified-memory option, but this would eliminate CUDA, and I don’t know how this would affect my system otherwise.

I would just wait it out until 5.9.1 arrives, by then I’m sure there will be plenty of options…

I install the hard way (nvidia, cuda and cudnn). If push comes to shove, just lock the relevant files and kernel. AFAIK uvm has been disabled anyway on the rpm builds?

As I read it, yes, you have to patch the kernel source and recompile. So better wait for 5.9.1 and see what happens if you are not in a hurry :wink:

Or install the hard way?

cat kernel-5.9-gpl.patch 

diff -Naur kernel/nvidia/nv-frontend.c kernel/nvidia/nv-frontend.c
--- kernel/nvidia/nv-frontend.c    2020-09-29 20:19:44.000000000 -0500
+++ kernel/nvidia/nv-frontend.c    2020-10-16 11:17:30.481499886 -0500
@@ -15,7 +15,7 @@
 #include "nv-frontend.h"
 #if defined(MODULE_LICENSE)
 #if defined(MODULE_INFO)
 MODULE_INFO(supported, "external");
diff -Naur kernel/nvidia-modeset/nvidia-modeset-linux.c kernel/nvidia-modeset/nvidia-modeset-linux.c
--- kernel/nvidia-modeset/nvidia-modeset-linux.c    2020-09-29 20:19:44.000000000 -0500
+++ kernel/nvidia-modeset/nvidia-modeset-linux.c    2020-10-16 11:17:01.857885869 -0500
@@ -1551,7 +1551,7 @@
 #if defined(MODULE_LICENSE)
 #if defined(MODULE_INFO)
   MODULE_INFO(supported, "external");

./ --apply-patch kernel-5.9-gpl.patch
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 455.28...
patching file kernel/nvidia/nv-frontend.c
patching file kernel/nvidia-modeset/nvidia-modeset-linux.c
Adding files to archive named ""...


CRC: 2414687691
MD5: babc9fcc3ddae5d61526ba7b133972d8

Self-extractible archive "" successfully created.

Thanks for the replies, Malcolm and OrsoBruno. I’m not in a hurry; I’ll wait.

FWIW: There’s a long thread about this issue on the manjaro forum: .

Edit: Malcolm, thanks for the hard way tip!

Just a proof on concept… :wink: I’m happy to wait and see…

Just a warning to casual readers: this might be a useful hack for a local install, but distributing the resulting code might not be legal.
I’m not a lawyer, so I cannot elaborate further.

It would seem that adding “Portions copyright by NVIDIA disassembly of NVIDIA code not allowed” to the boot up would solve that problem.
I know that NCR’s MP-RAS had multiple copyright notices in boot up as do HP’s HPUX and IBM’s AIX.

Like I said, proof of concept :wink: don’t know why they don’t just GPL it all… and offer an enterprise version (for support etc)…

Third parties rights may be involved…

Read an article recently (forgot where published)
ETA on nVidia resolving their patch and licenses based on their information from nVidia was sometime second half November.

Of course, there’s no way to know how accurate that might be, but the impression was that was some kind of info directly from nVidia developers tasked with the problem.


That is consistent with the following info from Nvidia:

From years of supporting computers - " from nVidia was sometime second half November. "

The sad part is they do not say what year they plan to deliver it to us.