Skip to content

Commit f99dc41

Browse files
committed
doflicky: Add support for nvidia-open kernel modules
Signed-off-by: Thomas Staudinger <[email protected]>
1 parent 64a3aa3 commit f99dc41

File tree

3 files changed

+122
-7
lines changed

3 files changed

+122
-7
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Thomas Staudinger <[email protected]>
3+
Date: Fri, 23 May 2025 14:20:42 +0200
4+
Subject: [PATCH] nvidia: Add support for open kernel modules
5+
6+
Signed-off-by: Thomas Staudinger <[email protected]>
7+
---
8+
crapshoot | 2 ++
9+
doflicky/bundleset.py | 2 ++
10+
doflicky/detection.py | 2 +-
11+
doflicky/driver/nvidia.py | 26 ++++++++++++++++++++++++--
12+
4 files changed, 29 insertions(+), 3 deletions(-)
13+
14+
diff --git a/crapshoot b/crapshoot
15+
index 6ceacd5..e07a40d 100755
16+
--- a/crapshoot
17+
+++ b/crapshoot
18+
@@ -12,6 +12,7 @@
19+
20+
from doflicky import OSContext
21+
from doflicky.driver.nvidia import DriverBundleNvidia
22+
+from doflicky.driver.nvidia import DriverBundleNvidiaOpen
23+
from doflicky.driver.broadcom import DriverBundleBroadcom
24+
import pisi
25+
from pisi.db.installdb import InstallDB
26+
@@ -29,6 +30,7 @@ class BundleSet:
27+
""" Initialise the potential driver bundle set """
28+
self.drivers = [
29+
DriverBundleNvidia(),
30+
+ DriverBundleNvidiaOpen(),
31+
DriverBundleBroadcom(),
32+
]
33+
self.allDrivers = list()
34+
diff --git a/doflicky/bundleset.py b/doflicky/bundleset.py
35+
index e5ba39f..50c8261 100644
36+
--- a/doflicky/bundleset.py
37+
+++ b/doflicky/bundleset.py
38+
@@ -12,6 +12,7 @@
39+
40+
from doflicky import OSContext
41+
from doflicky.driver.nvidia import DriverBundleNvidia
42+
+from doflicky.driver.nvidia import DriverBundleNvidiaOpen
43+
from doflicky.driver.broadcom import DriverBundleBroadcom
44+
from pisi.db.installdb import InstallDB
45+
46+
@@ -29,6 +30,7 @@ class BundleSet:
47+
""" Initialise the potential driver bundle set """
48+
self.drivers = [
49+
DriverBundleNvidia(),
50+
+ DriverBundleNvidiaOpen(),
51+
DriverBundleBroadcom(),
52+
]
53+
self.allDrivers = list()
54+
diff --git a/doflicky/detection.py b/doflicky/detection.py
55+
index 543b27f..12be53c 100644
56+
--- a/doflicky/detection.py
57+
+++ b/doflicky/detection.py
58+
@@ -66,7 +66,7 @@ class DriverBundlePCI(DriverBundle):
59+
return False
60+
61+
62+
-nvidia_driver_priority = ['nvidia-glx-driver']
63+
+nvidia_driver_priority = ['nvidia-open', 'nvidia-glx-driver']
64+
65+
66+
def detect_hardware_packages():
67+
diff --git a/doflicky/driver/nvidia.py b/doflicky/driver/nvidia.py
68+
index f5793e6..c061d6d 100644
69+
--- a/doflicky/driver/nvidia.py
70+
+++ b/doflicky/driver/nvidia.py
71+
@@ -33,9 +33,31 @@ class DriverBundleNvidiaBase(DriverBundlePCI):
72+
""" For GPU drivers we'll suggest 32-bit when we find related pkgs """
73+
return ["wine-32bit", "steam", "mesalib-32bit"]
74+
75+
+class DriverBundleNvidiaOpen(DriverBundleNvidiaBase):
76+
+ """ Main NVIDIA driver, open kernel modules (nvidia-open) """
77+
+
78+
+ def __init__(self):
79+
+ DriverBundleNvidiaBase.__init__(self, "nvidia-open.modaliases")
80+
+
81+
+ def get_name(self):
82+
+ return "NVIDIA Graphics Driver (main series, open kernel modules)"
83+
+
84+
+ def get_priority(self):
85+
+ return 3
86+
+
87+
+ def get_packages(self, context, emul32=False):
88+
+ basePackages = ["nvidia-glx-driver-common"]
89+
+ if emul32:
90+
+ basePackages.append("nvidia-glx-driver-32bit")
91+
+ if context.get_active_kernel_series() == "current":
92+
+ basePackages.append("nvidia-open-current")
93+
+ else:
94+
+ basePackages.append("nvidia-open")
95+
+ return basePackages
96+
+
97+
98+
class DriverBundleNvidia(DriverBundleNvidiaBase):
99+
- """ Main NVIDIA driver (nvidia-glx-driver) """
100+
+ """ Main NVIDIA driver, proprietary kernel modules (nvidia-glx-driver) """
101+
102+
def __init__(self):
103+
DriverBundleNvidiaBase.__init__(self, "nvidia-glx-driver.modaliases")
104+
@@ -44,7 +66,7 @@ class DriverBundleNvidia(DriverBundleNvidiaBase):
105+
return "NVIDIA Graphics Driver (main series)"
106+
107+
def get_priority(self):
108+
- return 3
109+
+ return 2
110+
111+
def get_packages(self, context, emul32=False):
112+
basePackages = ["nvidia-glx-driver-common"]

packages/d/doflicky/package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name : doflicky
22
version : '6'
3-
release : 25
3+
release : 26
44
source :
55
- git|https://github.com/getsolus/doflicky.git : e533f9c62b05209641f6a5a4fe7f7eb4e32840df
66
homepage : https://github.com/getsolus/doflicky
@@ -16,7 +16,10 @@ builddeps :
1616
- python-distutils-extra
1717
rundeps :
1818
- nvidia-glx-driver-modaliases
19+
- nvidia-open-modaliases
1920
- python2-gobject
21+
setup : |
22+
%patch -p1 -i $pkgfiles/0001-nvidia-Add-support-for-open-kernel-modules.patch
2023
build : |
2124
%python_setup
2225
install : |

packages/d/doflicky/pspec_x86_64.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Name>doflicky</Name>
44
<Homepage>https://github.com/getsolus/doflicky</Homepage>
55
<Packager>
6-
<Name>Joey Riches</Name>
7-
<Email>josephriches@gmail.com</Email>
6+
<Name>Thomas Staudinger</Name>
7+
<Email>Staudi.Kaos@gmail.com</Email>
88
</Packager>
99
<License>CC-BY-SA-4.0</License>
1010
<License>GPL-2.0-or-later</License>
@@ -53,12 +53,12 @@
5353
</Files>
5454
</Package>
5555
<History>
56-
<Update release="25">
57-
<Date>2025-04-23</Date>
56+
<Update release="26">
57+
<Date>2025-05-26</Date>
5858
<Version>6</Version>
5959
<Comment>Packaging update</Comment>
60-
<Name>Joey Riches</Name>
61-
<Email>josephriches@gmail.com</Email>
60+
<Name>Thomas Staudinger</Name>
61+
<Email>Staudi.Kaos@gmail.com</Email>
6262
</Update>
6363
</History>
6464
</PISI>

0 commit comments

Comments
 (0)