Uninstalling NVIDIA and Reinstall Nouveau Driver

Author:

In this post, I will show you how to uninstall NVIDIA Driver and reinstall the Nouveau driver on Debian Linux.

➡️ If you think this tutorial is helpful, please support my channel by subscribing to my YouTube channel or by using the Amazon/eBay/ClouDNS Affiliated links below (Full Disclaimer). I will get a small commission from your purchase to grow my channel:

🚀 ClouDNS Affiliated: https://www.cloudns.net/aff/id/255803/

🚀 Things I used for my server: https://amzn.to/3hudohP

🚀 Tools I used: https://amzn.to/3uXaSUr

🚀 Devices I used: https://amzn.to/3FYlfxk

🚀 Networking/Cybersecurity/Programming Books: https://amzn.to/3HEYwb0

🚀 TrueNAS HBA SAS controller IT Mode from the Art of Server: https://ebay.us/cBWEvJ

🧧 PayPal Donation: https://www.paypal.com/paypalme/sysadmin102

If you don’t like reading posts like I do, you can follow along on my YouTube Channel. Below is the video:

Coming soon

➡️ Introduction:

NVIDIA Driver on Linux is properly the most difficult driver to install on a Linux system for everyday users. Users may experience a blank screen after installing NVIDIA Driver. To access the current system through the GUI interface, the user would need to remove the Nvidia driver.

➡️ Step 1: Exit the blank screen and access tty console login screen

To access tty console, press Ctrl + Atl + F1

➡️ Step 2: Stop lightdm service

┌─[sysadmin102@parrot]─[~]
└──╼ $ sudo service lightdm stop

➡️ Step 3: Remove the nouveau blacklist.conf

Change the directory to /etc/modprobe.d/

┌─[sysadmin102@parrot]─[~]
└──╼ $ cd /etc/modprobe.d/
┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ ls
amd64-microcode-blacklist.conf  intel-microcode-blacklist.conf
blacklist-libnfc.conf           libhackrf0.conf
blacklist-nouveau.conf          mdadm.conf
broadcom-sta-dkms.conf          r8168-dkms.conf
dkms.conf                       r8188eus-dkms.conf
┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo rm blacklist-nouveau.conf 

➡️ Step 3:  Uninstall Nvidia Driver

To uninstall Nvidia Driver, run the below command:

┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo nvidia-uninstall

Select Yes to run nvidia-xconfig –restore-original-backup to restore the original x configuration file.

Remove all nvidia file or artifacts using the purge command:

┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo apt purge nvidia*
┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo apt autoremove

➡️ Step 3: Reinstall Xserver and Nouveau Driver

Run the below command to restore Xserver and Nouveau driver:

┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo apt install --reinstall xserver-xorg
┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo apt install --reinstall xserver-xorg-video-nouveau 

➡️ Step 4: Regenerate the kernel initramfs 

┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ sudo update-initramfs -u
┌─[sysadmin102@parrot]─[/etc/modprobe.d]
└──╼ $ reboot

To verify that Nouveau driver is being used, you can run the list command

┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ lspci | grep -i NVIDIA
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
41:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
┌─[sysadmin102@parrot]─[~/Downloads]
└──╼ $ lspci -s 41:00.0 -v
41:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] GP102 [GeForce GTX 1080 Ti]
	Flags: bus master, fast devsel, latency 0, IRQ 94, NUMA node 1
	Memory at 9d000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 80000000 (64-bit, prefetchable) [size=256M]
	Memory at 90000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 2000 [size=128]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>

➡️ If you think this tutorial is helpful, please subscribe to my YouTube channel for more tutorials: https://www.youtube.com/@sysadmin102

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »