Skip to content

Commit f7ce205

Browse files
mike7d7JkktBkkt
authored andcommitted
New package: nvidia-open-dkms-580.126.18.
Co-authored-by: Miguel <migue07mx@protonmail.com>
1 parent 2811b94 commit f7ce205

5 files changed

Lines changed: 142 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
PACKAGE_NAME="nvidia"
2+
PACKAGE_VERSION="__PKGVER"
3+
AUTOINSTALL="yes"
4+
5+
# By default, DKMS will add KERNELRELEASE to the make command line; however,
6+
# this will cause the kernel module build to infer that it was invoked via
7+
# Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting
8+
# the 'make' command name to suppress this behavior.
9+
MAKE[0]="'make' -j$(nproc) NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=${kernelver} modules"
10+
11+
# The list of kernel modules will be generated by nvidia-installer at runtime.
12+
BUILT_MODULE_NAME[0]="nvidia"
13+
BUILT_MODULE_LOCATION[0]="kernel-open"
14+
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
15+
BUILT_MODULE_NAME[1]="nvidia-uvm"
16+
BUILT_MODULE_LOCATION[1]="kernel-open"
17+
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
18+
BUILT_MODULE_NAME[2]="nvidia-modeset"
19+
BUILT_MODULE_LOCATION[2]="kernel-open"
20+
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
21+
BUILT_MODULE_NAME[3]="nvidia-drm"
22+
BUILT_MODULE_LOCATION[3]="kernel-open"
23+
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
24+
BUILT_MODULE_NAME[4]="nvidia-peermem"
25+
BUILT_MODULE_LOCATION[4]="kernel-open"
26+
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From 69769b8ebaaeca84a5188330f80c460dcc0fa747 Mon Sep 17 00:00:00 2001
2+
From: Eric Naim <dnaim@cachyos.org>
3+
Date: Fri, 24 Jan 2025 19:34:24 +0700
4+
Subject: [PATCH] Enable atomic kernel modesetting by default
5+
6+
This is required for proper functionality under Wayland. fbdev has been default enabled since 570 so that
7+
hunk can be removed from this patch.
8+
9+
Signed-off-by: Eric Naim <dnaim@cachyos.org>
10+
---
11+
nvidia-drm/nvidia-drm-linux.c | 2 +-
12+
nvidia-drm/nvidia-drm-os-interface.c | 2 +-
13+
2 files changed, 2 insertions(+), 2 deletions(-)
14+
15+
diff --git a/nvidia-drm/nvidia-drm-linux.c b/nvidia-drm/nvidia-drm-linux.c
16+
index 0007cbf..bd0b9eb 100644
17+
--- a/kernel-open/nvidia-drm/nvidia-drm-linux.c
18+
+++ b/kernel-open/nvidia-drm/nvidia-drm-linux.c
19+
@@ -31,7 +31,7 @@
20+
21+
MODULE_PARM_DESC(
22+
modeset,
23+
- "Enable atomic kernel modesetting (1 = enable, 0 = disable (default))");
24+
+ "Enable atomic kernel modesetting (1 = enable (default), 0 = disable)");
25+
module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400);
26+
27+
#if defined(NV_DRM_FBDEV_AVAILABLE)
28+
diff --git a/nvidia-drm/nvidia-drm-os-interface.c b/nvidia-drm/nvidia-drm-os-interface.c
29+
index 7617476..f22afd7 100644
30+
--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
31+
+++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
32+
@@ -41,7 +41,7 @@
33+
#include <drm/drmP.h>
34+
#endif
35+
36+
-bool nv_drm_modeset_module_param = false;
37+
+bool nv_drm_modeset_module_param = true;
38+
bool nv_drm_fbdev_module_param = true;
39+
40+
void *nv_drm_calloc(size_t nmemb, size_t size)
41+
--
42+
2.48.1
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 1484c9ee0a60468dfd88954011fae0e28c0f73de Mon Sep 17 00:00:00 2001
2+
From: Peter Jung <admin@ptr1337.dev>
3+
Date: Fri, 18 Oct 2024 22:40:58 +0200
4+
Subject: [PATCH 3/6] Add IBT support
5+
6+
Signed-off-by: Peter Jung <admin@ptr1337.dev>
7+
---
8+
src/nvidia-modeset/Makefile | 1 +
9+
1 file changed, 1 insertion(+)
10+
11+
diff --git a/src/nvidia-modeset/Makefile b/src/nvidia-modeset/Makefile
12+
index 2b96f3fa..ed934014 100644
13+
--- a/src/nvidia-modeset/Makefile
14+
+++ b/src/nvidia-modeset/Makefile
15+
@@ -151,6 +151,7 @@ ifeq ($(TARGET_ARCH),x86_64)
16+
CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -fno-jump-tables)
17+
CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mindirect-branch=thunk-extern)
18+
CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mindirect-branch-register)
19+
+ CONDITIONAL_CFLAGS += $(call TEST_CC_ARG, -mharden-sls=all)
20+
endif
21+
22+
CFLAGS += $(CONDITIONAL_CFLAGS)
23+
--
24+
2.47.0
25+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- a/kernel-open/nvidia/nv-clk.c
2+
+++ b/kernel-open/nvidia/nv-clk.c
3+
@@ -27,8 +27,10 @@
4+
#include "nv-linux.h"
5+
#include "nv-platform.h"
6+
7+
+#if IS_ENABLED(CONFIG_TEGRA_BPMP)
8+
#include <soc/tegra/bpmp-abi.h>
9+
#include <soc/tegra/bpmp.h>
10+
+#endif // IS_ENABLED(CONFIG_TEGRA_BPMP)
11+
12+
// Use the CCF APIs if enabled in Kernel config and RM build
13+
// has Dual license define enabled.

srcpkgs/nvidia-open-dkms/template

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Template file for 'nvidia-open-dkms'
2+
pkgname=nvidia-open-dkms
3+
version=580.126.18
4+
revision=2
5+
archs="x86_64"
6+
depends="dkms nvidia xz"
7+
short_desc="NVIDIA drivers for linux - open DKMS kernel module"
8+
maintainer="JkktBkkt <apkabikov@gmail.com>"
9+
license="GPL-2.0-only, MIT"
10+
homepage="https://github.com/NVIDIA/open-gpu-kernel-modules"
11+
distfiles="https://download.nvidia.com/XFree86/NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${version}.tar.xz"
12+
checksum=4f2b776d75707d6b4770bab4b0a7aba95355fe833bc4cee54100c29839b53e6e
13+
replaces="nvidia-dkms>=0"
14+
conflicts="nvidia390-dkms>=0 nvidia470-dkms>=0"
15+
dkms_modules="nvidia-open-dkms ${version}"
16+
triggers="dkms initramfs-regenerate"
17+
provides="nvidia-dkms-${version}_${revision}"
18+
19+
do_install() {
20+
vmkdir usr/src/nvidia-open-dkms-${version}
21+
vcopy "*" usr/src/nvidia-open-dkms-${version}
22+
cp ${FILESDIR}/dkms.conf ${DESTDIR}/usr/src/nvidia-open-dkms-${version}/dkms.conf
23+
vsed -e "s/__PKGVER/${version}/" -i ${DESTDIR}/usr/src/nvidia-open-dkms-${version}/dkms.conf
24+
25+
# Blacklist nouveau
26+
vmkdir usr/lib/modprobe.d
27+
cat <<- END > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
28+
blacklist nouveau
29+
blacklist nova_core
30+
blacklist nova_drm
31+
END
32+
chmod 644 ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
33+
34+
vdoc README.md
35+
vlicense COPYING
36+
}

0 commit comments

Comments
 (0)