From dfe472c263fe301ef82d7e3f5439e1499fd6a773ea6adc853b9482a51c9f136f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 29 Oct 2024 09:35:58 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main nvidia-open-driver-G06-signed revision 7b2ffc382c90d85ca831e5e64a8c82c5 --- aarch64-TW-buildfix.patch | 11 ++ kmp-trigger.sh | 6 + nvidia-open-driver-G06-signed.changes | 127 ++++++++++++++++++ nvidia-open-driver-G06-signed.spec | 29 +++- open-gpu-kernel-modules-550.100.tar.gz | 3 - open-gpu-kernel-modules-550.127.05.tar.gz | 3 + open-gpu-kernel-modules-555.42.06.tar.gz | 3 - open-gpu-kernel-modules-560.35.03.tar.gz | 3 + pci_ids-550.100 => pci_ids-550.127.05 | 0 pci_ids-555.42.06 | 31 ----- pci_ids-560.35.03 | 0 pci_ids-supported | 1 + ...ed-550.100 => pci_ids-supported-550.127.05 | 1 + ...d-555.42.06 => pci_ids-supported-560.35.03 | 0 preamble | 10 +- 15 files changed, 183 insertions(+), 45 deletions(-) create mode 100644 aarch64-TW-buildfix.patch create mode 100644 kmp-trigger.sh delete mode 100644 open-gpu-kernel-modules-550.100.tar.gz create mode 100644 open-gpu-kernel-modules-550.127.05.tar.gz delete mode 100644 open-gpu-kernel-modules-555.42.06.tar.gz create mode 100644 open-gpu-kernel-modules-560.35.03.tar.gz rename pci_ids-550.100 => pci_ids-550.127.05 (100%) delete mode 100644 pci_ids-555.42.06 create mode 100644 pci_ids-560.35.03 rename pci_ids-supported-550.100 => pci_ids-supported-550.127.05 (99%) rename pci_ids-supported-555.42.06 => pci_ids-supported-560.35.03 (100%) diff --git a/aarch64-TW-buildfix.patch b/aarch64-TW-buildfix.patch new file mode 100644 index 0000000..17e9961 --- /dev/null +++ b/aarch64-TW-buildfix.patch @@ -0,0 +1,11 @@ +--- a/kernel-open/nvidia/nv-vtophys.c.orig 2024-09-19 14:13:38.129627845 +0200 ++++ a/kernel-open/nvidia/nv-vtophys.c 2024-09-19 14:14:35.462847222 +0200 +@@ -29,7 +29,7 @@ + NvU64 NV_API_CALL nv_get_kern_phys_address(NvU64 address) + { + /* direct-mapped kernel address */ +- if (virt_addr_valid(address)) ++ if (virt_addr_valid((const void *) address)) + return __pa(address); + + nv_printf(NV_DBG_ERRORS, diff --git a/kmp-trigger.sh b/kmp-trigger.sh new file mode 100644 index 0000000..d1f3a07 --- /dev/null +++ b/kmp-trigger.sh @@ -0,0 +1,6 @@ +# trigger removal of driver modules with non-existing or wrong +# firmware when (new) firmware gets installed +test -e /sys/module/nvidia && \ + cat /sys/class/drm/card*/device/vendor | grep -vq 10de && \ + rmmod nvidia_drm nvidia_uvm nvidia_modeset video nvidia &> /dev/null + diff --git a/nvidia-open-driver-G06-signed.changes b/nvidia-open-driver-G06-signed.changes index 7cb4fd8..274bfca 100644 --- a/nvidia-open-driver-G06-signed.changes +++ b/nvidia-open-driver-G06-signed.changes @@ -1,3 +1,130 @@ +------------------------------------------------------------------- +Wed Oct 23 02:50:30 UTC 2024 - Stefan Dirsch + +- Update to 550.127.05 (boo#1232057) + * Fixed a bug which could cause applications using GBM to crash + when running with nvidia-drm.modeset=0. + +------------------------------------------------------------------- +Mon Oct 21 11:32:45 UTC 2024 - Stefan Dirsch + +- cuda-flavor + provide also nvidia-open-driver-G06-kmp-$flavor = %version to + workaround broken cuda-drivers + +------------------------------------------------------------------- +Fri Oct 18 19:35:16 UTC 2024 - Stefan Dirsch + +- For CUDA update version to 560.35.03 +- supersedes kernel-6.10.patch + +------------------------------------------------------------------- +Fri Oct 18 13:31:46 UTC 2024 - Stefan Dirsch + +- cuda-flavor + * provide nvidia-open-driver-G06-kmp = %version to workaround + broken cuda-drivers +- nv-prefer-signed-open-driver + * added comments for requirements + +------------------------------------------------------------------- +Fri Oct 18 12:28:39 UTC 2024 - Stefan Dirsch + +- latest change hardcoded to 555.42.06; we no longer need this + for 560 + +------------------------------------------------------------------- +Fri Oct 18 11:49:46 UTC 2024 - Stefan Dirsch + +- nv-prefer-signed-open-driver: + * added specicic versions of cuda-drivers/cuda-drivers-xxx as + preconditions for requiring specific version of + nvidia-compute-G06 + +------------------------------------------------------------------- +Fri Oct 18 10:30:28 UTC 2024 - Stefan Dirsch + +- nv-prefer-signed-open-driver: + * no longer require a specific version of + nvidia-open-driver-G06-signed-cuda-kmp, so it can select the + correct open driver KMP matching the cuda-runtime version +- cuda-flavor: + * added nvidia-compute-G06 = %version to preconditions for + requiring kernel-firmware-nvidia-gspx-G06, since + nvidia-compute-utils-G06 does not have a version-specific + requires on nvidia-compute-G06 + +------------------------------------------------------------------- +Wed Oct 16 17:59:46 UTC 2024 - Stefan Dirsch + +- cuda-flavor: + * require kernel-firmware-nvidia-gspx-G06 instead of + kernel-firmware-nvidia-gspx-G06-cuda (which provides also + kernel-firmware-nvidia-gspx-G06) + * trigger removal of driver modules also on + kernel-firmware-nvidia-gspx-G06 + +------------------------------------------------------------------- +Wed Oct 16 12:44:18 UTC 2024 - Stefan Dirsch + +- no longer hard-require kernel firmware package, but install it + automatically once nvidia-compute-utils-G06 gets installed +- trigger removal of driver modules with non-existing or wrong + firmware when (new) firmware gets installed + +------------------------------------------------------------------- +Sat Sep 21 12:02:59 UTC 2024 - Stefan Dirsch + +- Update to 550.120 (boo#1230779) + * Fixed a bug that could cause kernel crashes upon attempting + KMS operations through DRM when nvidia_drm was loaded with + modeset=0. +- aarch64-TW-buildfix.patch + * fixes build on aarch64 with latest TW kernel + +------------------------------------------------------------------- +Wed Sep 11 11:15:43 UTC 2024 - Stefan Dirsch + +- CUDA build: removed entries from pci_ids-555.42.06 since this is + doing more harm than benefit (bsc#1230368) + +------------------------------------------------------------------- +Mon Sep 9 17:55:56 UTC 2024 - Stefan Dirsch + +- For CUDA (preamble file): + * added: Provides: nvidia-open-driver-G06-signed-cuda-kmp-$flavor = %version + which is needed for 'zypper install = ' + * added: Provides/Conflicts: nvidia-open-driver-G06-signed-kmp-$flavor = %version + useful for containers + +------------------------------------------------------------------- +Wed Aug 28 11:02:09 UTC 2024 - Stefan Dirsch + +- reverted CUDA update version to 560.x.y due to changes in CUDA + repository with CUDA 12.6/560.x.y drivers +- kernel-6.10.patch: + * fixes build of 555.42.06 against Kernel 6.10 + +------------------------------------------------------------------- +Sun Aug 25 10:43:01 UTC 2024 - Stefan Dirsch + +- For CUDA update version to 560.35.03 + +------------------------------------------------------------------- +Mon Aug 12 10:53:10 UTC 2024 - Stefan Dirsch + +- Update to 550.107.02 (boo#1229716) + +------------------------------------------------------------------- +Sat Aug 10 12:16:49 UTC 2024 - Stefan Dirsch + +- For CUDA update version to 560.28.03 + +------------------------------------------------------------------- +Tue Jul 23 09:04:48 UTC 2024 - Stefan Dirsch + +- better summary and description for KMP + ------------------------------------------------------------------- Thu Jul 11 07:36:33 UTC 2024 - Egbert Eich diff --git a/nvidia-open-driver-G06-signed.spec b/nvidia-open-driver-G06-signed.spec index 0a53f3a..7866f4d 100644 --- a/nvidia-open-driver-G06-signed.spec +++ b/nvidia-open-driver-G06-signed.spec @@ -16,8 +16,8 @@ # -%define gfx_version 550.100 -%define cuda_version 555.42.06 +%define gfx_version 550.127.05 +%define cuda_version 560.35.03 %global flavor @BUILD_FLAVOR@%{?nil} %if "%{flavor}" == "cuda" @@ -47,7 +47,7 @@ Version: %{gfx_version} %endif Release: 0 -Summary: NVIDIA open kernel module driver for GeForce RTX 2000 series and newer +Summary: NVIDIA open kernel module driver for GeForce 16 series (GTX 16xx) and newer License: GPL-2.0-only AND MIT Group: System/Kernel URL: https://github.com/NVIDIA/open-gpu-kernel-modules/ @@ -80,7 +80,15 @@ Source10: pci_ids-supported Source11: pesign-copy-sources Source12: pesign-spec-macros Source14: group-source-files.pl +Source15: kmp-trigger.sh Patch0: persistent-nvidia-id-string.patch +%if "%{flavor}" != "cuda" +%ifarch aarch64 +%if 0%{?suse_version} >= 1600 +Patch2: aarch64-TW-buildfix.patch +%endif +%endif +%endif BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: fdupes BuildRequires: gcc-c++ @@ -101,6 +109,12 @@ ExclusiveArch: x86_64 aarch64 %define kmp_template_name /usr/lib/rpm/kernel-module-subpackage %endif %(sed -e '/^%%post\>/ r %_sourcedir/kmp-post.sh' -e '/^%%postun\>/ r %_sourcedir/kmp-postun.sh' %kmp_template_name >%_builddir/nvidia-kmp-template) +%if "%{flavor}" == "cuda" +%(echo "%triggerin -p /bin/bash -n %%{-n*}-kmp-%1 -- kernel-firmware-nvidia-gspx-G06-cuda = %{version}" >> %_builddir/nvidia-kmp-template) +%(cat %_sourcedir/kmp-trigger.sh >> %_builddir/nvidia-kmp-template) +%endif +%(echo "%triggerin -p /bin/bash -n %%{-n*}-kmp-%1 -- kernel-firmware-nvidia-gspx-G06 = %{version}" >> %_builddir/nvidia-kmp-template) +%(cat %_sourcedir/kmp-trigger.sh >> %_builddir/nvidia-kmp-template) %kernel_module_package -n %{name} -t %_builddir/nvidia-kmp-template -f %_sourcedir/kmp-filelist -p %_sourcedir/preamble %{expand:%( for f in %{flavors_to_build}; do \ @@ -114,9 +128,11 @@ ExclusiveArch: x86_64 aarch64 %package -n nv-prefer-signed-open-driver %define version_major %(i=%{version}; echo ${i%%%%.*}) Summary: Prefer the signed open driver when installing CUDA -Requires: nvidia-open-driver-G06-signed-cuda-kmp = %version +Requires: nvidia-open-driver-G06-signed-cuda-kmp # This avoids the package being uninstallable when the CUDA repo is unavaliable preventing problems in staging -Requires: ( nvidia-compute-G06 = %version if ( cuda-drivers or cuda-drivers-%version_major ) ) +# Hard code version 555.42.06 as this requires is only needed for this version +# but since this meta package should apply to all versions. +Requires: ( nvidia-compute-G06 = 555.42.06 if ( cuda-drivers = 555.42.06 or cuda-drivers-%version_major = 555.42.06) ) %description -n nv-prefer-signed-open-driver By installing this package, the signed NVIDIA open driver built by SUSE will be preferred during installation @@ -135,7 +151,8 @@ Simply run: `zypper install --no-recommends cuda-runtime- nv-prefer-sig %description This package provides the open-source NVIDIA kernel module driver -for GeForce RTX 2000 series and newer GPUs. +for GeForce 16 series (GTX 16xx) and newer GPUs, i.e. Turing GPU family +and newer (Turing, Ampere, Ada Lavelace, Hopper, Blackwell, ...). %prep %autosetup -p1 -n open-gpu-kernel-modules-%{version} diff --git a/open-gpu-kernel-modules-550.100.tar.gz b/open-gpu-kernel-modules-550.100.tar.gz deleted file mode 100644 index eeadd11..0000000 --- a/open-gpu-kernel-modules-550.100.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d284bf619386f35254595bd7743fdd1294a4d6da290e63bb45fa05440648b361 -size 13813196 diff --git a/open-gpu-kernel-modules-550.127.05.tar.gz b/open-gpu-kernel-modules-550.127.05.tar.gz new file mode 100644 index 0000000..da5d1e5 --- /dev/null +++ b/open-gpu-kernel-modules-550.127.05.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fcbb2c68d3f9150b931f81f096a5cb41fdfdeed787d6df05249ff636d5981dd +size 13835212 diff --git a/open-gpu-kernel-modules-555.42.06.tar.gz b/open-gpu-kernel-modules-555.42.06.tar.gz deleted file mode 100644 index 9528679..0000000 --- a/open-gpu-kernel-modules-555.42.06.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14a336e1061adf18fea69a2c7e875fe3570315d5efbedb196840c56d6b9c67b8 -size 14032626 diff --git a/open-gpu-kernel-modules-560.35.03.tar.gz b/open-gpu-kernel-modules-560.35.03.tar.gz new file mode 100644 index 0000000..850a78a --- /dev/null +++ b/open-gpu-kernel-modules-560.35.03.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5dfb5e9b051510cfa987a25a2afe58f8746582128a0e79cc2839b2ed2c7bc58 +size 15534656 diff --git a/pci_ids-550.100 b/pci_ids-550.127.05 similarity index 100% rename from pci_ids-550.100 rename to pci_ids-550.127.05 diff --git a/pci_ids-555.42.06 b/pci_ids-555.42.06 deleted file mode 100644 index 890e5c4..0000000 --- a/pci_ids-555.42.06 +++ /dev/null @@ -1,31 +0,0 @@ -0x1E37 Tesla T10 -0x1EB4 NVIDIA T4G -0x1EB8 Tesla T4 -0x1EB9 NVIDIA T4 32GB -0x20B0 NVIDIA A100-PG509-200 -0x20B1 NVIDIA A100-PCIE-40GB -0x20B2 NVIDIA A100-SXM4-80GB -0x20B3 NVIDIA PG506-242 -0x20B5 NVIDIA A100-PCIE-80GB -0x20B6 NVIDIA PG506-230 -0x20B7 NVIDIA A30 -0x20F0 NVIDIA A100-PG506-207 -0x20F1 NVIDIA A100-PCIE-40GB -0x20F2 NVIDIA A100-PG506-217 -0x20F5 NVIDIA A800-80 -0x20F6 NVIDIA A800-40 -0x2235 NVIDIA A40 -0x2236 NVIDIA A10 -0x2237 NVIDIA A10G -0x2321 NVIDIA H100 NVL -0x2322 NVIDIA H800 PCIe -0x2324 NVIDIA H800 -0x233A NVIDIA H800 NVL -0x2330 NVIDIA H100 80GB HBM3 -0x2331 NVIDIA H100 PCIe -0x2339 NVIDIA H100 -0x25B6 NVIDIA A16 -0x26B5 NVIDIA L40 -0x26B8 NVIDIA L40G -0x27B8 NVIDIA L4 - diff --git a/pci_ids-560.35.03 b/pci_ids-560.35.03 new file mode 100644 index 0000000..473a0f4 diff --git a/pci_ids-supported b/pci_ids-supported index ccf1f1c..953b1b1 100644 --- a/pci_ids-supported +++ b/pci_ids-supported @@ -216,6 +216,7 @@ 0x2805 NVIDIA GeForce RTX 4060 Ti 0x2808 NVIDIA GeForce RTX 4060 0x2820 NVIDIA GeForce RTX 4070 Laptop GPU +0x2822 NVIDIA GeForce RTX 3050 A Laptop GPU 0x2838 NVIDIA RTX 3000 Ada Generation Laptop GPU 0x2860 NVIDIA GeForce RTX 4070 Laptop GPU 0x2882 NVIDIA GeForce RTX 4060 diff --git a/pci_ids-supported-550.100 b/pci_ids-supported-550.127.05 similarity index 99% rename from pci_ids-supported-550.100 rename to pci_ids-supported-550.127.05 index ccf1f1c..953b1b1 100644 --- a/pci_ids-supported-550.100 +++ b/pci_ids-supported-550.127.05 @@ -216,6 +216,7 @@ 0x2805 NVIDIA GeForce RTX 4060 Ti 0x2808 NVIDIA GeForce RTX 4060 0x2820 NVIDIA GeForce RTX 4070 Laptop GPU +0x2822 NVIDIA GeForce RTX 3050 A Laptop GPU 0x2838 NVIDIA RTX 3000 Ada Generation Laptop GPU 0x2860 NVIDIA GeForce RTX 4070 Laptop GPU 0x2882 NVIDIA GeForce RTX 4060 diff --git a/pci_ids-supported-555.42.06 b/pci_ids-supported-560.35.03 similarity index 100% rename from pci_ids-supported-555.42.06 rename to pci_ids-supported-560.35.03 diff --git a/preamble b/preamble index c4beec4..1213ef7 100644 --- a/preamble +++ b/preamble @@ -3,10 +3,16 @@ Conflicts: nvidia-gfxG06-kmp nvidia-driver-G06-kmp nvidia-gfxG05-kmp Requires: group(video) Provides: nvidia-open-driver-G06 = %{-v*} %if %{with cuda} +Provides: nvidia-open-driver-G06-signed-cuda-kmp-%1 = %{-v*} Provides: nvidia-open-driver-G06-signed-kmp = %{-v*} +Provides: nvidia-open-driver-G06-signed-kmp-%1 = %{-v*} Conflicts: nvidia-open-driver-G06-signed-kmp -Requires: kernel-firmware-nvidia-gspx-G06-cuda = %{-v*} +Conflicts: nvidia-open-driver-G06-signed-kmp-%1 +# workaround for broken cuda-drivers +Provides: nvidia-open-driver-G06-kmp = %{-v*} +Provides: nvidia-open-driver-G06-kmp-%1 = %{-v*} +Requires: (kernel-firmware-nvidia-gspx-G06 = %{-v*} if (nvidia-compute-utils-G06 = %{-v*} or nvidia-compute-G06 = %{-v*} or sle-module-NVIDIA-compute-release)) %else -Requires: kernel-firmware-nvidia-gspx-G06 = %{-v*} +Requires: (kernel-firmware-nvidia-gspx-G06 = %{-v*} if nvidia-compute-utils-G06 = %{-v*}) %endif Obsoletes: nvidia-open-driver-G06 = %{-v*}