Skip to content

Commit

Permalink
refactor: simpler nvidia kernel.cof fix (ublue-os#288)
Browse files Browse the repository at this point in the history
Upon closer inspection our akmod image already fprovides the
KERNEL_MODULE_TYPE variable so need to compute it.

Relates: ublue-os#286
  • Loading branch information
bsherman authored Oct 12, 2024
1 parent 527e668 commit f3806ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions nvidia-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f3806ea

Please sign in to comment.