Switch Back From NVIDIA to Nouveau
· 2 min read
disable nvidia driver
-
open terminal
-
check the current driver
lspci -k | grep -A 2 -E "(VGA|3D)"
see the output like this:
Kernel driver in use: nvidia
-
switch to text mode
sudo systemctl set-default multi-user.target
sudo reboot -
remove nvidia driver one by one
sudo modprobe -r nvidia*
uninstall nvidia driver
sudo apt remove --purge '^nvidia-.*'
sudo apt autoremove
sudo apt clean
Or if you installed nvidia driver from the official website, you can uninstall it by running the installer again and select uninstall.
sudo ./NVIDIA-Linux-x86_64-xxx.xx.run --uninstall
reinstall the nouveau driver
sudo apt install xserver-xorg-video-nouveau
update the initramfs
sudo update-initramfs -u
reconfigure xorg
sudo rm /etc/X11/xorg.conf*
enable nouveau driver
sudo rm /etc/modprobe.d/blacklist-nouveau.conf
switch back to graphical mode
sudo systemctl set-default graphical.target
sudo reboot
verify the nouveau driver
lspci -k | grep -A 2 -E "(VGA|3D)"
see if the output like this:
Kernel driver in use: nouveau
resolve the issue
modprobe: FATAL: module nvidia is in use
stop the display manager
sudo systemctl stop gdm/kdm/lightdm
kill processes using the nvidia driver
sudo fuser -k /dev/nvidia*
unload the nvidia driver
sudo modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia
blacklist the nvidia driver
echo "blacklist nvidia" | sudo tee /etc/modprobe.d/blacklist-nvidia.conf
sudo update-initramfs -u