The process for installing the NVidia drivers on Fedora 30+ is slightly different. Now, you need to do this:
Enable the 3rd party repo:
sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
Next, ensure the machine is fully up-to-date:
sudo dnf update
Note that you’ll need to reboot of there’s a kernel update now.
Then, you install the drivers:
sudo dnf install nvidia-settings kernel-devel dkms-nvidia nvidia-driver nvidia-driver-cuda nvidia-driver-cuda-libs nvidia-driver-libs nvidia-driver-libs.i686
If you don’t want CUDA, just remove those packages from the above command.
Next, you’ll need to edit
/etc/X11/xorg.conf and paste the following in (create it if it doesn’t exist):
Section "Device" Identifier "Device0" Driver "nvidia" EndSection
Once done, you’ll need to remove the nouveau driver:
sudo dnf remove xorg-x11-drv-nouveau
Now, you need to rebuild the DKMS drivers so that they can be loaded when we reboot again:
sudo dkms autoinstall
Make sure this last command completes successfully. If it doesn’t, then you’re likely to get a black screen on reboot - and will have to login via SSH to fix it.
Finally, we need to blacklist the open-source driver, since we’re using the Nvidia driver:
echo "blacklist nouveau" | sudo tee --append /etc/modprobe.d/blacklist.conf
Now, we need to rebuild the grub config to get that change to take effect:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Finally, we can now reboot and it should work.
If it doesn’t work, try rebooting again by logging in via SSH and entering
You can also check the Xorg logs. These are located in
/var/log, and start with
Xorg.. The one you probably want is
Xorg.0.log, but I’d recommend checking the last-modified date on them with
ls -l and pickingt he one that was modified most recently.
If that still doesn’t work and you want to get it back to the way it was before, remove the edit to
/etc/modprobe.d/blacklist.conf above with a
sudo nano /etc/modprobe.d/blacklist.conf. Then, remove all nvidia packages:
sudo dnf remove *nvidia* sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg