A tempoarily quickfix:
#!/usr/bin/env bash
set -euo pipefail
echo “==- Quick StillOS NVIDIA RTX fix -==”
if [[ $EUID -ne 0 ]]; then
echo “Ooops, I think I need sudo privileges before I can continue:”
echo “sudo bash $0”
exit 1
fi
echo
echo “Adding kernel args to stop the daggummit nouveau…”
rpm-ostree kargs
–append-if-missing=rd.driver.blacklist=nouveau,nova_core
–append-if-missing=modprobe.blacklist=nouveau,nova_core
–append-if-missing=nouveau.modeset=0
–append-if-missing=initcall_blacklist=nouveau_init
echo
echo “Creating akmods logging folder…”
mkdir -p /var/log/akmods
echo
echo “Building NVIDIA kernel module with akmods… Please bear with your computer, it might take some time ;-)”
set +e
akmods --force
AKMODS_EXIT=$?
set -e
echo
echo “akmods exit code: $AKMODS_EXIT”
echo
echo “Searching for the newly built nvidia kmod RPM!”
mapfile -t NVIDIA_RPMS < <(find /var/cache/akmods/nvidia -name “*.rpm” 2>/dev/null | sort)
if [[ ${#NVIDIA_RPMS[@]} -eq 0 ]]; then
echo “Fant ingen NVIDIA kmod-RPM-er i /var/cache/akmods/nvidia”
echo “Ouch! I didn’t find any kmod-RPM in /var/cache/akmods/nvidia !”
echo “Trying to fetch some error logs:”
find /var/cache/akmods -type f | grep -Ei “nvidia|failed|log” || true
echo
echo “Try find the last log lines, ex.:”
echo “sudo tail -120 /var/cache/akmods/nvidia/*.failed.log”
exit 1
fi
echo “Found these RPMs:”
printf ’ - %s\n’ “${NVIDIA_RPMS[@]}”
echo
echo “Deactivating EPEL tempoarily if the repo-files exist…”
echo “This is to prevent the RPM-GPG-KEY-EPEL-$releasever_major-error that I ran into all the time…”
for repo in /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo; do
if [[ -f “$repo” ]]; then
sed -i ‘s/^enabled=1/enabled=0/g’ “$repo”
echo “Deactivated: $repo”
fi
done
echo
echo “Installing local NVIDIA kmod RPM with rpm-ostree…”
rpm-ostree install --allow-inactive “${NVIDIA_RPMS[@]}”
echo
echo “FINISH!”
echo
echo “Reboot now using systemctl reboot or sudo reboot”
echo
echo “After reboot, confirm with the command:”
echo “nvidia-smi”
echo ‘lsmod | grep -E “nvidia|nouveau|nova”’