NVIDIA – Nasty Hack Time Again – for GTX GPUs with Kernel 6.19…..
This is a summary of the changes I made to the NVIDIA proprietary ‘kernel’ code to get driver 580.119.02 working with Kernel 6.19-rc3..
This is a hack, and is not made by a professional, so use at your own risk, and do not use in a business-critical environment!
As mentioned in the previous article, I have tested this with Fedora 43 KDE/Plasma running VMware Workstation 25.0.0 with a Win10 Guest, and all seems to work as it should… These changes do not include complete kernel version tests, so the resulting driver is only for the 6.19.x kernel, but does support the older GTX GPUs… Some of the initial changes are similar to those for the ‘kernel-open’ code..
I found a suitable patch for the GPL issue – dating back to kernel 6.15, at:
https://github.com/CachyOS/CachyOS-PKGBUILDS/commit/b85953540b1b6ee604060870d45a0da8ab3e0487
and incorporated that with the following code changes..
~/kernel/common/inc/nv-mm.h
around line 204:
This already includes the ‘correct’ code, but the obscure test around it now fails, exposing the ‘incorrect’ code, so remove it, leaving the correct code only..
Remove
#if !NV_CAN_CALL_VMA_START_WRITE
nv_vma_start_write(vma);
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
and
#else
vma->vm_flags |= flags;
#endif
leaving just
vm_flags_set(vma, flags);
– and do the same to the next (similar) code, leaving just
vm_flags_clear(vma, flags);
~/kernel/nvidia/nv-dma.c
around line 718:
change:
return (ops->map_resource != NULL);
to:
return NV_TRUE;
~/kernel/nvidia/nv-mmap.c
around line 20,add:
#include <linux/version.h>
and after the #include,s, add:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
#endif
~/kernel/nvidia-drm/nvidia-drm-gem.c
around line 45, add:
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
#endif
~/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
around line 42, after the #endif, add:
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
#endif
~/kernel/nvidia-uvm/uvm.c
around line 22, add:
#include <linux/version.h>
around line 43, add:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
#define nv_vm_flags_set(v, f) vm_flags_reset((v), (v)->vm_flags | (f))
#define nv_vm_flags_clear(v, f) vm_flags_reset((v), (v)->vm_flags & ~(f))
#endif
The result:
………
CC [M] nvidia.mod.o
CC [M] .module-common.o
LD [M] nvidia.ko
CC [M] nvidia-uvm.mod.o
LD [M] nvidia-uvm.ko
CC [M] nvidia-modeset.mod.o
LD [M] nvidia-modeset.ko
CC [M] nvidia-drm.mod.o
LD [M] nvidia-drm.ko
CC [M] nvidia-peermem.mod.o
LD [M] nvidia-peermem.ko
make[2]: Leaving directory ‘/home/rgadsdon/NVIDIA-Linux-x86_64-580.119.02-custom/kernel’
make[1]: Leaving directory ‘/usr/src/linux-6.19-rc3’
and:
# uname -a
Linux rgxeonl 6.19.0-rc3 #1 SMP PREEMPT_DYNAMIC Sun Dec 28 16:41:08 PST 2025 x86_64 GNU/Linux
# nvidia-smi
Sun Dec 28 17:28:34 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.119.02 Driver Version: 580.119.02 CUDA Version: 13.0 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1050 Ti Off | 00000000:03:00.0 On | N/A |
| 46% 32C P0 N/A / 75W | 15MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
As before, this is an unsophisticated hack, so hopefully someone who really knows what they are doing can produce a ‘proper’ patch!
Robert Gadsdon. December 28th 2025.

Comments
NVIDIA – Nasty Hack Time Again – for GTX GPUs with Kernel 6.19….. — No Comments