@drankinatty does this driver work applying only the gcc-14 patch ? Is that case, maybe we can avoid using -fpermissive to make the maintainance easier in the future. I agree that it can be tedious to rely on enabling and disabling this flag for debugging future kernel updates. I would add -fpermissive as a last resort, only if there is no other alternative.
Search Criteria
Package Details: opencl-nvidia-390xx 390.157-14
Package Actions
Git Clone URL: | https://aur.archlinux.org/nvidia-390xx-utils.git (read-only, click to copy) |
---|---|
Package Base: | nvidia-390xx-utils |
Description: | OpenCL implemention for NVIDIA |
Upstream URL: | https://www.nvidia.com/ |
Licenses: | custom |
Conflicts: | opencl-nvidia |
Provides: | opencl-driver, opencl-nvidia |
Submitter: | svenstaro |
Maintainer: | jonathon (vnctdj) |
Last Packager: | vnctdj |
Votes: | 60 |
Popularity: | 0.96 |
First Submitted: | 2020-03-11 17:29 (UTC) |
Last Updated: | 2025-01-24 07:30 (UTC) |
Dependencies (2)
- zlib (zlib-ng-compat-gitAUR, zlib-gitAUR, zlib-ng-compat)
- opencl-headers (opencl-headers-gitAUR) (optional) – headers necessary for OpenCL development
Required by (67)
- aftershotpro2 (requires opencl-nvidia) (optional)
- aftershotpro3 (requires opencl-nvidia) (optional)
- arrayfire-git (requires opencl-driver) (optional)
- bfgminer-git (requires opencl-driver) (optional)
- computecpp (requires opencl-driver)
- cpu-x-opencl (requires opencl-driver) (optional)
- cuda-10.0 (requires opencl-nvidia)
- cuda-10.2 (requires opencl-nvidia)
- cuda-11.1 (requires opencl-nvidia)
- cuda-11.7 (requires opencl-nvidia)
- cuda-8.0 (requires opencl-nvidia)
- cuda-9.0 (requires opencl-nvidia)
- cuda-9.2 (requires opencl-nvidia)
- cuda11.1 (requires opencl-nvidia)
- cuda11.4 (requires opencl-nvidia)
- cuda11.4-versioned (requires opencl-nvidia)
- cuda12.0 (requires opencl-nvidia)
- cuda12.0-versioned (requires opencl-nvidia)
- cytoscape (requires opencl-driver) (optional)
- davinci-resolve (requires opencl-driver)
- davinci-resolve-beta (requires opencl-driver)
- davinci-resolve-studio (requires opencl-driver)
- davinci-resolve-studio-beta (requires opencl-driver)
- dewobble (requires opencl-driver)
- foldingathome (requires opencl-driver) (optional)
- fusion-render-node (requires opencl-driver)
- fusion-studio (requires opencl-driver)
- gromacs (requires opencl-nvidia) (optional)
- gromacs-plumed (requires opencl-nvidia) (optional)
- gyroflow (requires opencl-driver) (optional)
- gyroflow-bin (requires opencl-driver) (optional)
- gyroflow-dev-appimage (requires opencl-driver) (optional)
- gyroflow-git (requires opencl-driver) (optional)
- kristforge-bin (requires opencl-driver) (optional)
- kristforge-git (requires opencl-driver) (optional)
- lc0 (requires opencl-driver) (optional)
- leela-zero (requires opencl-driver)
- leela-zero-git (requires opencl-driver)
- luxcorerender (requires opencl-driver) (optional)
- luxcorerender-bin (requires opencl-driver) (optional)
- luxcorerender-git (requires opencl-driver) (optional)
- luxmark (requires opencl-driver)
- maya (requires opencl-driver) (optional)
- mfakto (requires opencl-driver)
- mtsieve (requires opencl-driver)
- nuxhash-git (requires opencl-nvidia)
- nvidia-390xx-utils (optional)
- nvidia-510xx-utils (requires opencl-nvidia) (optional)
- nvidia-525xx-utils (requires opencl-nvidia) (optional)
- nvidia-535xx-utils (requires opencl-nvidia) (optional)
- nvidia-550xx-utils (requires opencl-nvidia) (optional)
- opencl-icd-loader (requires opencl-driver) (optional)
- portwine-meta-nvidia (requires opencl-nvidia)
- python-gpuctypes (requires opencl-driver) (optional)
- python-pyfai (requires opencl-driver)
- python-silx (requires opencl-driver) (optional)
- scallion (requires opencl-nvidia) (optional)
- sempiternum (requires opencl-nvidia) (optional)
- sempiternum-git (requires opencl-nvidia) (optional)
- siftgpu (requires opencl-nvidia) (optional)
- silentarmy-nvmod-git (requires opencl-nvidia)
- slopecraft (requires opencl-nvidia) (optional)
- ugene-git (requires opencl-driver)
- viennacl (requires opencl-nvidia) (optional)
- virtualgl-git (requires opencl-driver)
- vramfs-git (requires opencl-driver)
- zivid (requires opencl-driver)
Sources (17)
- gcc-14.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.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 9 10 11 12 .. 28 Next › Last »
canolucas commented on 2024-05-18 14:43 (UTC) (edited on 2024-05-18 14:44 (UTC) by canolucas)
drankinatty commented on 2024-05-18 00:39 (UTC)
Building with both patches worked flawlessly. The 6.9.1 hit today, the dkms module rebuild went without issue and the Nvidia driver is happy (of course Virtualbox broke -- but you can't win them all...)
I incorporated both the original gcc-14 patch (largely unneeded now that -fpermissive was added by the kernel-6.9.patch), and the kernel-6.9.patch, as shown below and it worked fine.
Thanks to @canolucas for the kernel-6.9.patch.
drankinatty commented on 2024-05-17 15:25 (UTC)
The good news, as with you, with both patches (the gcc-14.patch) and the kernel-6.9.patch, the driver build is fine for both the current 6.8.9 and 6.6.30 LTS kernels. All we need now is the 6.9 kernel to see if that holds true on reboot after update.
Long term -fpermissive is a Bandaid that we will have to deal with at some time. We will need to remove it, let the build fail, get a good log and then develop a proper patch that brings the 390.xx code up to build in the current environment. I had to do that once for KDE with the kernel-4.6 changes way back when in the 2011? timeframe. Just tedious...
canolucas commented on 2024-05-17 04:35 (UTC) (edited on 2024-05-17 04:42 (UTC) by canolucas)
@drankinatty you are right, the patch posted by @rodrigorc is missing the changes in conftest.sh however this package built fine anyways.
From what I see in the docs:
-fpermissive
Downgrades some diagnostics about nonconformant code from errors to warnings.
https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/C_002b_002b-Dialect-Options.html#index-fpermissive-140
-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types
Suppresses different types of warnings
So I guess all these flags are meant to work together to: First, convert the errors to warnings and secondly supress those warnings.
drankinatty commented on 2024-05-17 01:57 (UTC) (edited on 2024-05-17 02:17 (UTC) by drankinatty)
@canolucas Thank You! We will give it a go. I'd just posted about the code formatting -- but you fixed it while I was typing :)
Does this patch replace (incorporate) the gcc-14 patch as well? (I mean it is, but it is in a different form than the original -- so do we just toss the earlier patch used for gcc-14?)
I guess the answer is No since they appear to affect different parts of conftest.sh. I have the following as the original gcc-14 patch:
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -153,7 +153,8 @@ test_headers() {
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
canolucas commented on 2024-05-17 01:45 (UTC) (edited on 2024-05-17 01:50 (UTC) by canolucas)
@vnctdj the patch posted by rodrigorc looks fine to me. Please tell us what you think and if it can be added to the PKGBUILD so we can test it against v6.9 of the kernel ?
Looks like the gcc 14 patch is the only patch needed for this driver to work with the new kernel, but when the new PKGBUILD is ready I'm sure we will give it a good test run to discard any compatibility issues.
--- a/kernel/Kbuild
+++ b/kernel/Kbuild
@@ -63,7 +63,7 @@
EXTRA_CFLAGS += -I$(src)/common/inc
EXTRA_CFLAGS += -I$(src)
-EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
+EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error -fpermissive
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"390.157\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args
EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
@@ -101,7 +101,9 @@
NV_CONFTEST_CMD := /bin/sh $(NV_CONFTEST_SCRIPT) \
"$(CC)" "$(HOST_CC)" $(ARCH) $(NV_KERNEL_SOURCES) $(NV_KERNEL_OUTPUT)
-NV_CONFTEST_CFLAGS := $(shell $(NV_CONFTEST_CMD) build_cflags)
+NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
+
+NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
NV_CONFTEST_COMPILE_TEST_HEADERS := $(obj)/conftest/macros.h
NV_CONFTEST_COMPILE_TEST_HEADERS += $(obj)/conftest/functions.h
drankinatty commented on 2024-05-15 18:09 (UTC) (edited on 2024-05-16 20:28 (UTC) by drankinatty)
It is official, the linux-6.9.1 package hit the core-testing repo at noon today. The only patches I have found are initial support patches for 6.9 for Cachyos that are a couple of months old at that point, e.g. https://github.com/CachyOS/kernel-patches/blob/master/6.9/misc/nvidia/ I doubt those will be complete and will need to be cherry picked for 470 and 390 if applicable.
Good news is it looks like it is just the GCC-14 patch that is needed, so there may be no other breakage by the kernel update from 6.8 - 6.9. Here is the nvidia forum link: https://forums.developer.nvidia.com/t/nvidia-modules-470-239-06-build-failure-with-gcc-14-due-to-conftest-sh/292645
This was referenced from a Slackware thread about failure to build with the 6.9 kernel. https://www.linuxquestions.org/questions/slackware-14/new-kernel-6-9-0-and-nvidia-drivers-4175737070/
sfranchi commented on 2024-05-15 09:43 (UTC)
@Minty95 I use the linux-zen kernel, so I added the following line to pacman.conf
IgnorePkg = linux-zen linux-zen-headers
Remove the "-zen" part of the names if you use the standard kernel
Minty95 commented on 2024-05-15 07:53 (UTC) (edited on 2024-05-15 10:21 (UTC) by Minty95)
sfranchi : Kernel and headers packages added to my pacman ignore list what exactly did you add ? so that I can do this as well,Thank :)
Many thanks did that, works perfectly. I'll now will wait until the maintainer has time to update the kernel
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?