From f3806eadebd5b952400957e84a80cf2104050198 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Sat, 12 Oct 2024 13:51:56 -0500 Subject: [PATCH] refactor: simpler nvidia kernel.cof fix (#288) Upon closer inspection our akmod image already fprovides the KERNEL_MODULE_TYPE variable so need to compute it. Relates: #286 --- nvidia-install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nvidia-install.sh b/nvidia-install.sh index 4e2a916..0530836 100755 --- a/nvidia-install.sh +++ b/nvidia-install.sh @@ -49,11 +49,7 @@ rpm-ostree install \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/{eyecantcu-supergfxctl,negativo17-fedora-nvidia,nvidia-container-toolkit}.repo # ensure kernel.conf matches NVIDIA_FLAVOR (which must be nvidia or nvidia-open) -# kmod-nvidia-common defaults the value to 'nvidia-open' but this will match on $NVIDIA_FLAVOR -KERNEL_MODULE_TYPE="kernel" -if [[ "${NVIDIA_FLAVOR}" == "nvidia-open" ]]; then - KERNEL_MODULE_TYPE="kernel-open" -fi +# kmod-nvidia-common defaults to 'nvidia-open' but this will match our akmod image sed -i "s/^MODULE_VARIANT=.*/MODULE_VARIANT=$KERNEL_MODULE_TYPE/" /etc/nvidia/kernel.conf systemctl enable nvidia-persistenced.service