5. CentOS Stream 9/8, Red Hat (RHEL) 9.0/8.5, Rocky Linux 8.5 Uninstall NVIDIA drivers and Enable Nouveau

I assume here that you have used this guide install part to install your NVIDIA drivers. This whole process is good to run on runlevel 3. When there is no X running. So first boot to runlevel 3 using direct parameter (3) on Grub linux/linuxefi line or using “systemctl set-default multi-user.target”.

5.1 Change root user

su -
## OR ##
sudo -i

5.2 Start NVIDIA Uninstall Process

nvidia-installer --uninstall

5.3 Restore xorg.conf

You can restore xorg.conf backup or remove /etc/X11/xorg.conf if you don’t have any special configuration.

Fedora NVIDIA Uninstall Restore Xorg Conf

5.4 NVIDIA Uninstall Warning

You might see following warning if you have updated some packages since nvidia drivers installation. Just select “OK”.

Fedora NVIDIA Uninstall Warning Altered

5.5 NVIDIA Installer Uninstalling

Fedora NVIDIA Uninstall Process

5.6 Fedora NVIDIA Uninstall Complete

Fedora NVIDIA Uninstall Complete

5.7 Remove blacklist nouveau

Remove ‘blacklist nouveau’ line from /etc/modprobe.d/blacklist.conf

5.8 Edit /etc/default/grub

Remove ‘rd.driver.blacklist=nouveau’ from end of ‘GRUB_CMDLINE_LINUX=”…”‘

## Example row with Fedora 35/34/33 BTRFS ##
GRUB_CMDLINE_LINUX="rhgb quiet"
## Or example row with LVM ##
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet"

5.9 Update grub2 conf

## BIOS ##
grub2-mkconfig -o /boot/grub2/grub.cfg
## UEFI CentOS Stream 9/8 ##
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
## UEFI Red Hat (RHEL) 9.0/8.5 ##
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
## UEFI Rocky Linux 8.5 ##
grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg

5.10 Generate initramfs

## Backup old initramfs nvidia image ##
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nvidia.img
 
## Create new initramfs image ##
dracut /boot/initramfs-$(uname -r).img $(uname -r)

5.11 Reinstall xorg, mesa and libglvnd packages

## CentOS Stream, RHEL, Rocky Linux ##
dnf reinstall xorg-\* mesa\* libglvnd\*

5.12 Reboot

Run systemctl set-default graphical.target first or if you used direct grub parameter, then just:

reboot

5.14 NVIDIA Drivers Uninstall Complete and nouveau enabled

Fedora NVIDIA Uninstall Back to nouveau