UPDATE: I've put all changes from below in this git repository - https://codeberg.org/Anakiev/nvidia-340xx-drm.git
The steps bellow are for some rare cases where the driver doesn't load with DRM disabled (or if for some reason you want to enable DRM).
I've successfully compiled the driver with DRM enabled:
- Download
drm_legacy.h
from here to a fixed location like/drm_legacy.h
- Delete
0016-kernel-6.8.patch
- Modify
+#include <drm/drm_legacy.h>
in0006-kernel-5.14.patch
to the fixed location+#include "/drm_legacy.h"
- Create a new
.patch
file
--- a/kernel/nv-drm.c 2025-05-16 23:20:39.336830599 +0300
+++ b/kernel/nv-drm.c 2025-05-16 23:22:14.651702661 +0300
@@ -450,6 +450,11 @@
.poll = drm_poll,
.read = drm_read,
.llseek = noop_llseek,
+
+#if defined(FOP_UNSIGNED_OFFSET)
+ // Fix a kernel warning after linux 6.12 (https://github.com/Binary-Eater/open-gpu-kernel-modules/commit/8ac26d3c66ea88b0f80504bdd1e907658b41609d.patch)
+ .fop_flags = FOP_UNSIGNED_OFFSET,
+#endif
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
@@ -532,7 +532,10 @@
.name = "nvidia-drm",
.desc = "NVIDIA DRM driver",
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
+ // Rel. commit. "drm: remove driver date from struct drm_driver and all drivers" (Jani Nikula, 4 Dec 2024)
.date = "20150116",
+#endif
.major = 0,
.minor = 0,
.patchlevel = 0,
- Fix the
PKGBUILD
Pinned Comments
JerryXiao commented on 2022-10-13 03:51 (UTC) (edited on 2022-10-14 02:44 (UTC) by JerryXiao)
For testing users, contributors: check out https://github.com/archlinux-jerry/nvidia-340xx
Warning: force push may happen to match the aur tree