Skip to content

Instantly share code, notes, and snippets.

@grenade
Last active June 2, 2024 14:25
Show Gist options
  • Save grenade/8844d472bc1dcec48d37291b0b7b7220 to your computer and use it in GitHub Desktop.
Save grenade/8844d472bc1dcec48d37291b0b7b7220 to your computer and use it in GitHub Desktop.
reinstall nvidia driver from rpm-fusion after a fedora upgrade
#!/bin/bash
# usage:
# curl -sL https://gist.github.com/grenade/8844d472bc1dcec48d37291b0b7b7220/raw/nvidia-driver-reinstall.sh?$(uuidgen) | bash
# uninstall all nvidia packages
sudo dnf erase '*nvidia*'
# disable the nvidia driver that doesn't come from rpm-fusion
# https://rpmfusion.org/Howto/CUDA#Which_driver_Package
sudo dnf module disable nvidia-driver
# install driver from rpm-fusion
# https://rpmfusion.org/Howto/NVIDIA
sudo dnf -y install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
sudo reboot
# should output the version of the driver such as `460.67`, not `modinfo: ERROR: Module nvidia not found.`
modinfo -F version nvidia
@superuser-miguel
Copy link

@methanoid Why did you use this method??? Drop by the Fedora Forums if you still need help. . .

@methanoid
Copy link

@methanoid Why did you use this method??? Drop by the Fedora Forums if you still need help. . .

I got it installed. Basically NV+Wayland=MESS. No issues with KDE6 and X11. So I removed Nvidia and put AMD card in and all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment