just to add one more confirmation: after adding gcc-15.patch the build works perfectly here, many thanks for your work! -s
Search Criteria
Package Details: nvidia-390xx-utils 390.157-17
Package Actions
Git Clone URL: | https://aur.archlinux.org/nvidia-390xx-utils.git (read-only, click to copy) |
---|---|
Package Base: | nvidia-390xx-utils |
Description: | NVIDIA drivers utilities |
Upstream URL: | https://www.nvidia.com/ |
Licenses: | custom |
Conflicts: | nvidia-390xx-libgl, nvidia-libgl, nvidia-utils |
Provides: | nvidia-390xx-libgl, nvidia-libgl, nvidia-utils, opengl-driver, vulkan-driver |
Submitter: | svenstaro |
Maintainer: | jonathon (vnctdj) |
Last Packager: | vnctdj |
Votes: | 61 |
Popularity: | 0.41 |
First Submitted: | 2020-03-11 17:29 (UTC) |
Last Updated: | 2025-06-12 22:18 (UTC) |
Dependencies (6)
- egl-wayland (egl-wayland-gitAUR)
- libglvnd (libglvnd-gitAUR)
- xorg-server (xorg-server-gitAUR, xorg-server-bug865-issue1578AUR, xorg-server-bug865AUR)
- nvidia-390xx-settingsAUR (optional) – configuration tool
- opencl-nvidia-390xxAUR (optional) – OpenCL support
- xorg-server-devel (xorg-server-devel-gitAUR) (optional) – nvidia-xconfig
Required by (327)
- adaptivecpp (requires nvidia-utils)
- adaptivecpp-git (requires nvidia-utils)
- agisoft-metashape (requires nvidia-utils) (optional)
- agisoft-metashape-pro (requires nvidia-utils) (optional)
- airshipper (requires vulkan-driver) (optional)
- alchemy-viewer-git (requires nvidia-libgl) (optional)
- alchemy-viewer-git (requires nvidia-utils) (optional)
- aquamarine-git (requires opengl-driver)
- ares-emu (requires vulkan-driver)
- ares-emu-git (requires vulkan-driver)
- armorpaint (requires opengl-driver)
- arrayfire-git (requires nvidia-utils) (optional)
- aurorafw-git (requires opengl-driver)
- auto-gpufreq-git (requires nvidia-utils)
- autokey-git (requires nvidia-utils) (optional)
- blackmagic-raw-sdk (requires nvidia-utils) (optional)
- btop-git (requires nvidia-utils) (optional)
- btop-gpu-git (requires nvidia-utils) (optional)
- ccdc-mercury (requires opengl-driver)
- ccminer (requires nvidia-utils)
- Show 307 more...
Sources (20)
- gcc-14.patch
- gcc-15.patch
- https://us.download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.run
- kernel-4.16+-memory-encryption.patch
- kernel-6.10.patch
- kernel-6.12.patch
- kernel-6.13.patch
- kernel-6.14.patch
- kernel-6.15.patch
- kernel-6.2.patch
- kernel-6.3.patch
- kernel-6.4.patch
- kernel-6.5.patch
- kernel-6.6.patch
- kernel-6.8.patch
- nvidia-390xx-utils.sysusers
- nvidia-390xx.rules
- nvidia-drm-outputclass.conf
- systemd-homed-override.conf
- systemd-suspend-override.conf
Latest Comments
« First ‹ Previous 1 2 3 4 5 6 7 8 .. 33 Next › Last »
susanne commented on 2025-05-10 14:46 (UTC)
canolucas commented on 2025-05-09 20:29 (UTC) (edited on 2025-05-09 20:35 (UTC) by canolucas)
gcc-15.patch
worked fine here as well. So, it seems we can add that patch to the package right ?
Considering:
* package is broken in its current state
* the patch is required for this package to be compatible with archlinux's current version of gcc
aldolat commented on 2025-05-09 17:10 (UTC)
I just used the patch gcc-15.patch
of bufferunderrun here and upgrading to kernel 6.14.5-arch1-1 and gcc-15 was successful.
aruncveli commented on 2025-05-06 20:32 (UTC)
I could be missing something obvious,
Of course I'd forgotten to the patch
entry to prepare()
. Thanks @bufferunderrun.
And sorry to everyone else for the spam. Incredible work with the patches, investigations and brainstorming.
bufferunderrun commented on 2025-05-06 20:00 (UTC) (edited on 2025-05-06 21:08 (UTC) by bufferunderrun)
I assume you added it with a relative path and it's not adding the patch. This should work:
patch -Np1 -i "${srcdir}/gcc-15.patch" -d "${srcdir}/${_pkg}"
No issues with linux 6.14.5
EDIT: I used makepkg -sifc
aruncveli commented on 2025-05-06 16:48 (UTC) (edited on 2025-05-06 16:53 (UTC) by aruncveli)
I could be missing something obvious, since I normally use paru and haven't done this manually recently.
-
Downloaded the content of
gcc-15.patch
from @bufferunderrun, with and without the addition from @drankinatty. -
Modified
PKGBUILD
-
updpkgsums
-
makepkg -sic
pacman "succeeded", but dkms install --no-depmod nvidia/390.157 -k 6.14.4-arch1-2 exited 10
. In the make.log
, there were a lot of issues with conftest.sh
. A snippet from ~600 lines is given below:
In file included from ././common/inc/conftest.h:5,
from ././common/inc/nv_stdarg.h:29,
from ././common/inc/os-interface.h:27,
from nvidia/nv-frontend.c:12:
././conftest/functions.h:15:2: error: #error kmem_cache_create() conftest failed!
15 | #error kmem_cache_create() conftest failed!
| ^~~~~
././conftest/functions.h:16:2: error: #error on_each_cpu() conftest failed!
16 | #error on_each_cpu() conftest failed!
| ^~~~~
././conftest/functions.h:17:2: error: #error smp_call_function() conftest failed!
17 | #error smp_call_function() conftest failed!
| ^~~~~
././conftest/functions.h:22:2: error: #error acpi_walk_namespace() conftest failed!
22 | #error acpi_walk_namespace() conftest failed!
| ^~~~~
././conftest/functions.h:24:2: error: #error dma_mapping_error() conftest failed!
24 | #error dma_mapping_error() conftest failed!
| ^~~~~
././conftest/functions.h:71:2: error: #error wait_on_bit_lock() conftest failed!
71 | #error wait_on_bit_lock() conftest failed!
| ^~~~~
././conftest/functions.h:76:2: error: #error radix_tree_replace_slot() conftest failed!
76 | #error radix_tree_replace_slot() conftest failed!
| ^~~~~
Does anyone know what could be wrong?
drankinatty commented on 2025-05-06 08:02 (UTC)
I have put a write-up on The bbs.archlinux.org discussion page outlining where I think the 6.15 kernel problem will be. If you can take a look and add any thoughts you have on the differences with the 390 driver common/inc/nv-mm.h
and how to backport the patch from the 470 driver to that file -- that is where I'm stuck.
bufferunderrun commented on 2025-05-05 14:06 (UTC)
I should add that kernel 6.15 will drop EXTRA_CFLAGS
backward compatibility, so one would need to switch to ccflags-y
when it's out. But judging from drankinatty's comments 6.15 will break quite a few other things, so people should prepare for a bumpy ride.
drankinatty commented on 2025-05-05 00:43 (UTC) (edited on 2025-05-05 04:21 (UTC) by drankinatty)
The 6.15 and gcc-15 was a mix-up. @bufferunderrun probably has the better location for adding the -std=gnu17
option. I stumbled on it at Nvidia building with gcc-15 fails. I also added the -Wno-int-conversion
option from the Fedora make.log error and combined both in conftest.sh
, e.g.
--- a/kernel/conftest.sh 2025-05-02 22:11:41.841797003 -0500
+++ b/kernel/conftest.sh 2025-05-04 19:32:38.569127659 -0500
@@ -151,10 +151,11 @@
}
build_cflags() {
- BASE_CFLAGS="-O2 -D__KERNEL__ \
+ BASE_CFLAGS="-O2 -D__KERNEL__ -std=gnu17 \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
-nostdinc -isystem $ISYSTEM \
--Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
+-Wno-implicit-function-declaration -Wno-strict-prototypes \
+-Wno-incompatible-pointer-types -Wno-int-conversion"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
This builds and the dkms modules build fine with gcc-15 and linux-6.14. I'll let the smarter folks decide where the option should go. I tend to like Kbuild as @bufferoverrun did, but we should also look at including -Wno-int-conversion
as looks like a future issue as well. But we likely don't need it in both BASE_CFLAGS
and EXTRA_CFLAGS
. So I guess the deciding factor comes down to whether you consider -std=gnu17
a BASE or EXTRA flag.
But looking at the linux-6.15 requirements kernel/common/inc/nv-mm.h
changes appear a bit more involved. It may end up not being as bad as I image. The core issue is the 470 driver uses a nv_vm_flags_xxx
naming convention while the 390 driver was never updated from get_user_pages_xxx
function names. The 470 linux-6.15 patch uses vm_flags_reset(vma, vma->vm_flags | flags);
as part of the nv_vm_flags_set()
function to avoid the now prohibited kernel file locks from the driver. vm_flags_reset()
is provided by ../linux/mm.h
so it is available to the 390 driver, but how/where it must be integrated is unclear given the driver differences and the 390 driver having no nv_vm_flags_set()
. We will cross that bridge when we get there.
bufferunderrun commented on 2025-05-04 17:25 (UTC)
No idea why kernel 6.15 is brought to this discussion when the issue is with GCC. GCC 15 switched over to C23 by default, so one needs to specify C17 ala https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/blob/main/0002-CFLAGS-Set-std-gnu17-for-all-compilation-flags.patch
gcc-15.patch:
diff --git a/kernel/Kbuild b/kernel/Kbuild
index 85aa267..baa6986 100644
--- a/kernel/Kbuild
+++ b/kernel/Kbuild
@@ -61,6 +61,7 @@ $(foreach _module, $(NV_KERNEL_MODULES), \
# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
#
+EXTRA_CFLAGS += -std=gnu17
EXTRA_CFLAGS += -I$(src)/common/inc
EXTRA_CFLAGS += -I$(src)
EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index 4da7588..1106ea5 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -151,7 +151,7 @@ test_headers() {
}
build_cflags() {
- BASE_CFLAGS="-O2 -D__KERNEL__ \
+ BASE_CFLAGS="-std=gnu17 -O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
-nostdinc -isystem $ISYSTEM \
-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
I'll let maintainers decide on the rest, gcc-14.patch and so on. I just applied it on top of everything.
Pinned Comments
vnctdj commented on 2025-01-24 07:37 (UTC)
Use this forum thread for discussion: https://bbs.archlinux.org/viewtopic.php?pid=1946926
jonathon commented on 2022-05-26 09:46 (UTC)
Please don't flag this package out-of-date unless a new version has been released by NVIDIA.
jonathon commented on 2021-12-26 22:44 (UTC) (edited on 2021-12-26 22:44 (UTC) by jonathon)
The DKMS package guidelines are explicit that
linux-headers
should not be a dependency of any DKMS package.As a concrete example of why including that as a hard dependency is a bad idea, what happens when
linux
is not an installed kernel?