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 40e0cf7..3793440 100644 --- a/nvidia-open-driver-G06-signed.changes +++ b/nvidia-open-driver-G06-signed.changes @@ -1,3 +1,57 @@ +------------------------------------------------------------------- +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 diff --git a/nvidia-open-driver-G06-signed.spec b/nvidia-open-driver-G06-signed.spec index dba7f8e..24c1aa6 100644 --- a/nvidia-open-driver-G06-signed.spec +++ b/nvidia-open-driver-G06-signed.spec @@ -80,6 +80,7 @@ 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" Patch1: kernel-6.10.patch @@ -111,6 +112,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 \ @@ -124,9 +131,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 diff --git a/preamble b/preamble index 60b8dcd..2ac7552 100644 --- a/preamble +++ b/preamble @@ -8,8 +8,10 @@ Provides: nvidia-open-driver-G06-signed-kmp = %{-v*} Provides: nvidia-open-driver-G06-signed-kmp-%1 = %{-v*} Conflicts: nvidia-open-driver-G06-signed-kmp Conflicts: nvidia-open-driver-G06-signed-kmp-%1 -Requires: kernel-firmware-nvidia-gspx-G06-cuda = %{-v*} +# workaround for broken cuda-drivers +Provides: nvidia-open-driver-G06-kmp = %{-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*}