You are not logged in.

#1 2020-12-31 20:43:41

jonathon
Member
Registered: 2016-09-19
Posts: 67

nvidia-390xx AUR package discussion thread

nvidia-390xx

This thread is intended to support discussion of issues and solutions for the nvidia-390xx package in the AUR.

Current driver version

390.141
Release announcement: https://forums.developer.nvidia.com/t/l … pus/165427
README: https://download.nvidia.com/XFree86/Lin … index.html

Current driver state

linux (5.11): WORKING
linux-lts (5.10): WORKING

Last edited by jonathon (2021-02-24 14:22:22)

Offline

#2 2020-12-31 21:12:24

loqs
Member
Registered: 2014-03-06
Posts: 13,005

Re: nvidia-390xx AUR package discussion thread

Offline

#3 2020-12-31 21:23:20

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

Interesting...

The nvidia-uvm.ko kernel module, which provides Unified Virtual Memory (UVM) functionality to the CUDA driver,...

Probably not critical for 390xx... ?

Last edited by jonathon (2020-12-31 21:24:25)

Offline

#4 2020-12-31 21:44:42

loqs
Member
Registered: 2014-03-06
Posts: 13,005

Re: nvidia-390xx AUR package discussion thread

Assuming it has the same impact as https://archlinux.org/news/nvidia-45528 … -linux-59/ then no CUDA or OpenCL but framebuffer support for X11 and games will probably work.

Offline

#5 2020-12-31 21:47:10

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

Yeah. I also wonder about this part of the Debian patch notes:

415.18 fixed this by switching the module license to "Dual MIT/GPL"

which makes me wonder whether the same thing could be done for 390xx. I don't fancy patching in a relicense of the driver, though. Anyone know anyone at NVIDIA? big_smile

Offline

#6 2020-12-31 22:26:22

loqs
Member
Registered: 2014-03-06
Posts: 13,005

Re: nvidia-390xx AUR package discussion thread

Applies the workaround from Debian.  The DKMS build will still fail as dkms.conf it still references nvidia-uvm.ko but if that is removed it will not be built for older kernels.
dkms.conf does have BUILD_EXCLUSIVE_KERNEL but that seems to apply to every module managed by a dkms.conf.

diff --git a/PKGBUILD b/PKGBUILD
index b7859ef..d9ee8bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,12 +22,14 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.r
         'kernel-4.16.patch'
         'kernel-5.8.patch'
         'kernel-5.9.patch'
-        'https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/db83ed8ac2e0e0097d535a82e2fd4ee0f31873e3/kernel-5.10.patch')
+        'https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/db83ed8ac2e0e0097d535a82e2fd4ee0f31873e3/kernel-5.10.patch'
+        'kernel-5.10-disable-UVM.patch')
 b2sums=('bf56cef38d76accdf547b96cd444b0bd4288f604d44a1d274f3246c13310d6a59050b36f384280edb83938db81fa0544f7a2dc84ff6f440ff90b76ee62749fc1'
         '1d21307640a3844752c92e8344518daf6ad62d846689bebe6eed4dcadbf7b2e742862f5c17c0faee7256662cb75e62e124d59e5a5617e87324e1f0658f2b748d'
         '1e6ad252be5f603e022c854d391d4d768fb81d532a837203ab3b024dbb10f328c40a9579a19ab730de4e16f3841f15bfbcd1815ec913ac3d555811daf338ae6d'
         '7358919041a3d5df1cac50f6519b282abe7a344f07b59d52ab95a022ce0af12e743a1c194fd838b5733f3900e68c7f0756a528ac32255775f2ba830a2f052dec'
-        '8d7c054ff08ed6212aa81f3db6597c1e016609bdddfb19161274e5e75b0ae8b5c5501740ca6a75367d152b16f8350319bd2577561aa796cfe49840c4bd2c2d5d')
+        '8d7c054ff08ed6212aa81f3db6597c1e016609bdddfb19161274e5e75b0ae8b5c5501740ca6a75367d152b16f8350319bd2577561aa796cfe49840c4bd2c2d5d'
+        '00a6efa6a06b997f3f372e3e4c0341a7840d5e9f6f25c1145bb46dc8c8a03c8b9d46b3c9152a26511b612df86df9c86b2b8bef238c3619834a6ca0db260abdba')
 
 prepare() {
     sh "${_pkg}.run" --extract-only
@@ -46,6 +48,8 @@ prepare() {
     # 5.10 Patch, from xtrymind and BlackIkeEagle
     patch -Np1 -i ../kernel-5.10.patch
 
+    patch -Np1 -i ../kernel-5.10-disable-UVM.patch
+
     cp -a kernel kernel-dkms
     cd kernel-dkms
     sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
@@ -75,7 +79,7 @@ package_nvidia-390xx() {
 
     _extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
     install -Dt "${pkgdir}${_extradir}" -m644 \
-      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
+      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm}.ko
 
     find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
 
diff --git a/kernel-5.10-disable-UVM.patch b/kernel-5.10-disable-UVM.patch
new file mode 100644
index 0000000..48ad381
--- /dev/null
+++ b/kernel-5.10-disable-UVM.patch
@@ -0,0 +1,18 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: HACK! disable building the nvidia-uvm module
+ FTBFS in Linux 5.8 with
+   FATAL: modpost: GPL-incompatible module nvidia-uvm.ko uses GPL-only symbol 'radix_tree_preloads'
+ 415.18 fixed this by switching the module license to "Dual MIT/GPL"
+Bug-Debian: https://bugs.debian.org/969085
+Forwarded: not-needed
+
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -60,6 +60,7 @@ else
+   endif
+ 
+   NV_KERNEL_MODULES ?= $(wildcard nvidia nvidia-uvm nvidia-modeset nvidia-drm nvidia-vgpu-vfio)
++  NV_EXCLUDE_KERNEL_MODULES += nvidia-uvm
+   NV_KERNEL_MODULES := $(filter-out $(NV_EXCLUDE_KERNEL_MODULES), \
+                                     $(NV_KERNEL_MODULES))
+   NV_VERBOSE ?=

Edit:
Create a second dkms bundle each with their own dkms.conf use BUILD_EXCLUSIVE so one builds for 5.10.* without uvm and the other 4.* and 5.1-9.* with uvm.

diff --git a/PKGBUILD b/PKGBUILD
index b7859ef..ff3b481 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,12 +22,14 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.r
         'kernel-4.16.patch'
         'kernel-5.8.patch'
         'kernel-5.9.patch'
-        'https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/db83ed8ac2e0e0097d535a82e2fd4ee0f31873e3/kernel-5.10.patch')
+        'https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/db83ed8ac2e0e0097d535a82e2fd4ee0f31873e3/kernel-5.10.patch'
+        'kernel-5.10-disable-UVM.patch')
 b2sums=('bf56cef38d76accdf547b96cd444b0bd4288f604d44a1d274f3246c13310d6a59050b36f384280edb83938db81fa0544f7a2dc84ff6f440ff90b76ee62749fc1'
         '1d21307640a3844752c92e8344518daf6ad62d846689bebe6eed4dcadbf7b2e742862f5c17c0faee7256662cb75e62e124d59e5a5617e87324e1f0658f2b748d'
         '1e6ad252be5f603e022c854d391d4d768fb81d532a837203ab3b024dbb10f328c40a9579a19ab730de4e16f3841f15bfbcd1815ec913ac3d555811daf338ae6d'
         '7358919041a3d5df1cac50f6519b282abe7a344f07b59d52ab95a022ce0af12e743a1c194fd838b5733f3900e68c7f0756a528ac32255775f2ba830a2f052dec'
-        '8d7c054ff08ed6212aa81f3db6597c1e016609bdddfb19161274e5e75b0ae8b5c5501740ca6a75367d152b16f8350319bd2577561aa796cfe49840c4bd2c2d5d')
+        '8d7c054ff08ed6212aa81f3db6597c1e016609bdddfb19161274e5e75b0ae8b5c5501740ca6a75367d152b16f8350319bd2577561aa796cfe49840c4bd2c2d5d'
+        '00a6efa6a06b997f3f372e3e4c0341a7840d5e9f6f25c1145bb46dc8c8a03c8b9d46b3c9152a26511b612df86df9c86b2b8bef238c3619834a6ca0db260abdba')
 
 prepare() {
     sh "${_pkg}.run" --extract-only
@@ -47,6 +49,9 @@ prepare() {
     patch -Np1 -i ../kernel-5.10.patch
 
     cp -a kernel kernel-dkms
+    patch -Np1 -i ../kernel-5.10-disable-UVM.patch
+    cp -a kernel kernel-dkms-noUVM
+
     cd kernel-dkms
     sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
     sed -i 's/__JOBS/`nproc`/' dkms.conf
@@ -58,7 +63,23 @@ DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
 BUILT_MODULE_NAME[2]="nvidia-modeset"\
 DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
 BUILT_MODULE_NAME[3]="nvidia-drm"\
-DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
+DEST_MODULE_LOCATION[3]="/kernel/drivers/video"\
+BUILD_EXCLUSIVE_KERNEL="^(4\\..*|5\\.[0-9]\\.."' dkms.conf
+
+    # Gift for linux-rt guys
+    sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf
+
+  cd ../kernel-dkms-noUVM
+    sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
+    sed -i 's/__JOBS/`nproc`/' dkms.conf
+    sed -i 's/__DKMS_MODULES//' dkms.conf
+    sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
+DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[1]="nvidia-modeset"\
+DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[2]="nvidia-drm"\
+DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
+BUILD_EXCLUSIVE_KERNEL="^5\\.10\\..*"' dkms.conf
 
     # Gift for linux-rt guys
     sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf
@@ -75,7 +96,7 @@ package_nvidia-390xx() {
 
     _extradir="/usr/lib/modules/$(</usr/src/linux/version)/extramodules"
     install -Dt "${pkgdir}${_extradir}" -m644 \
-      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
+      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm}.ko
 
     find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
 
@@ -95,6 +116,7 @@ package_nvidia-390xx-dkms() {
 
     install -dm 755 "${pkgdir}"/usr/src
     cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
+    cp -dr --no-preserve='ownership' kernel-dkms-noUVM "${pkgdir}/usr/src/nvidia-noUVM-${pkgver}"
 
     echo "blacklist nouveau" |
         install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
diff --git a/kernel-5.10-disable-UVM.patch b/kernel-5.10-disable-UVM.patch
new file mode 100644
index 0000000..48ad381
--- /dev/null
+++ b/kernel-5.10-disable-UVM.patch
@@ -0,0 +1,18 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: HACK! disable building the nvidia-uvm module
+ FTBFS in Linux 5.8 with
+   FATAL: modpost: GPL-incompatible module nvidia-uvm.ko uses GPL-only symbol 'radix_tree_preloads'
+ 415.18 fixed this by switching the module license to "Dual MIT/GPL"
+Bug-Debian: https://bugs.debian.org/969085
+Forwarded: not-needed
+
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -60,6 +60,7 @@ else
+   endif
+ 
+   NV_KERNEL_MODULES ?= $(wildcard nvidia nvidia-uvm nvidia-modeset nvidia-drm nvidia-vgpu-vfio)
++  NV_EXCLUDE_KERNEL_MODULES += nvidia-uvm
+   NV_KERNEL_MODULES := $(filter-out $(NV_EXCLUDE_KERNEL_MODULES), \
+                                     $(NV_KERNEL_MODULES))
+   NV_VERBOSE ?=

Last edited by loqs (2020-12-31 23:43:21)

Offline

#7 2021-01-01 13:34:04

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

Nice. I got as far as the first part, but your second part is very nice.

Pushed to the AUR, let's see how long before it breaks again...

Offline

#8 2021-01-01 15:04:09

Filip62
Member
From: Slovakia
Registered: 2020-10-24
Posts: 21

Re: nvidia-390xx AUR package discussion thread

I just want to say that the work is very much appreciated. Thank You.

Offline

#9 2021-01-01 16:13:43

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

I have a cunning plan.

Copyright notice is per-file, so let's just use the dual-licensed uvm_common.c file from 415.18 as-is.

Offline

#10 2021-01-03 10:31:48

Maeda
Member
Registered: 2015-02-17
Posts: 34

Re: nvidia-390xx AUR package discussion thread

I just used the nvidia-390xx-dkms AUR package which build successfully, but indeed not more OpenCL/CUDA support.
I own a 390 maximum driver hardware, can I provide some help to you to fix this?

edit: I installed and use linux-lts to get it working back. I use this one until Nvidia fixes this smile

Last edited by Maeda (2021-01-03 12:11:04)


--Default Windows Manager
Xmonad <+> Xmobar <+> Trayer

My GitHub

Offline

#11 2021-01-04 20:25:21

haraldkl
Member
Registered: 2013-11-06
Posts: 13

Re: nvidia-390xx AUR package discussion thread

I am trying to build the package (with pkgver=390.138 and pkgrel=10), but it always fails due to missing Documentation directory in the kernel sources.

I am running on the default kernel 5.10.4-arch2-1, and as far as I understood it, there should be a Documentation subdirectory in "/usr/lib/modules/5.10.4-arch2-1/build", which is missing. There is a Kconfig file in this build directory itself, though. Anybody else having such a problem? What would be the best way to remedy this problem and get the package to build again?

Offline

#12 2021-01-04 22:04:36

seth
Member
Registered: 2012-09-03
Posts: 18,969

Re: nvidia-390xx AUR package discussion thread

There's a Kconfig in pretty much every modules subpath and I doubt a missing Documentation directory is the problem.
Please create a new thread (since this is kinda off topic here) and post the actual error, but I guess you're just missing https://archlinux.org/packages/core/x86 … x-headers/

Offline

#13 2021-01-09 07:06:20

claudecat
Member
Registered: 2012-02-01
Posts: 18

Re: nvidia-390xx AUR package discussion thread

The 390.141 driver was released by Nvidia on 12/30, albeit without much fanfare. On my machine (old pre-UEFI Intel i7,  GT 435 card) it requires no patching for either Slackware-current or PCLinuxOS (kernels 5.10.5 and 5.9.16 respectively), and no use of --no-unified-memory. These are the only two I've had to use the "hard way" (manual install of the Nvidia .run file) on. PCLOS hilariously doesn't even have the 390 series in its repos - just 340 and the non-legacy one.

Other distros I've noticed already using the 390.141 driver (via their repositories of course) include Ubuntu (focal), OpenSUSE (Tumbleweed at least), and Mageia's Cauldron. Hoping this update will simplify things for jonathan at least for a while. Might we see this soon here in AUR-land?

Last edited by claudecat (2021-01-09 07:07:59)


Why not enjoy a delightful Royal Crown cola?

Offline

#14 2021-01-09 13:50:27

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

Yes - I'm looking through the changes and trying to work out whether https://bbs.archlinux.org/viewtopic.php?id=235072 is still relevant/needed...

I can't see how it would be any different now, so I'm leaving that patch in place until someone can provide confirmation it's not needed on 390xx hardware.

Offline

#15 2021-01-09 22:49:02

claudecat
Member
Registered: 2012-02-01
Posts: 18

Re: nvidia-390xx AUR package discussion thread

Thanks jonathan. Sounds as if you have things well in hand. Your efforts are much appreciated!


Why not enjoy a delightful Royal Crown cola?

Offline

#16 2021-02-16 13:40:42

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

OK, 5.11 is around the corner. Ike Devolder has ported a patch for 460xx to 390xx:

https://gitlab.com/herecura/packages/nv … 5.11.patch

Any testing/feedback available from 390xx owners?

Offline

#17 2021-02-18 02:57:12

claudecat
Member
Registered: 2012-02-01
Posts: 18

Re: nvidia-390xx AUR package discussion thread

jonathon wrote:

OK, 5.11 is around the corner. Ike Devolder has ported a patch for 460xx to 390xx:

https://gitlab.com/herecura/packages/nv … 5.11.patch

Any testing/feedback available from 390xx owners?

I used this patch successfully yesterday on my Gentoo (unstable branch) install and it worked just fine. My card is a GT 430. Everything seems to be working.


Why not enjoy a delightful Royal Crown cola?

Offline

#18 2021-02-18 21:26:47

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

Excellent. That's three reports of success, so I'll push the change to the AUR.

Offline

#19 2021-02-23 10:25:25

RadioAD5GB
Member
Registered: 2021-02-23
Posts: 1

Re: nvidia-390xx AUR package discussion thread

Don't know if this is useful to you at this juncture or not.  I'm a little late to the party I guess but after having repeated problems with the dkms package I stumbled upon this. It builds and runs successfully on my machine running Linux-5.11.0-1-ck with a NVIDIA Corporation GF106 [GeForce GTS 450] (rev a1) adapter.  Nice work!

Offline

#20 2021-02-25 13:20:15

jonathon
Member
Registered: 2016-09-19
Posts: 67

Re: nvidia-390xx AUR package discussion thread

RadioAD5GB wrote:

Don't know if this is useful to you at this juncture or not.

It's always good to get confirmation things are working. wink

Offline

Board footer

Powered by FluxBB