Arjun Krishna

2 minute read

Steps to remove nvidia driver

If Ubuntu is not booting up after installing the nvidia drivers, we need to remove them and restore it to X.Org X server driver. Please reboot to root shell and run the following commands.

ubuntu-drivers list

output should look something similar

nvidia-340
nvidia-driver-390

Now remove these drivers.

sudo apt-get remove nvidia-340
sudo apt-get remove nvidia-driver-390
reboot

Your machine should boot normally.

The Software Updates screen should look something like this.

Additional Driver Updates

If the above solution is not working and secure boot is also turned off in BIOS, then try

sudo apt-get purge nvidia-*
sudo apt-get auto-remove
sudo apt-get update
sudo apt-get upgrade
sudo reboot

after reboot try loading the latest driver, in my case 410 was the latest

sudo apt install nvidia-driver-410
sudo reboot

this should fix it.

If still it did not fix, then you can try adding the repo

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade

and then trying to install the driver again.

if you run

nvidia-smi

you should see something like this, showing you that 410.48 version of the driver is installed

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.48                 Driver Version: 410.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 208...  Off  | 00000000:01:00.0  On |                  N/A |
| 40%   46C    P0    69W / 260W |   1286MiB / 10986MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      2440      G   /usr/lib/xorg/Xorg                            39MiB |
|    0      2524      G   /usr/bin/gnome-shell                          58MiB |
|    0      3119      G   /usr/lib/xorg/Xorg                           517MiB |
|    0      3251      G   /usr/bin/gnome-shell                         176MiB |
|    0      3749      G   ...-token=6D94646915EB50674AE550A28CA2E631   241MiB |
|    0      3833      G   gnome-control-center                           6MiB |
|    0      4179      G   ...-token=9D03A5ECB71266A14F94282A00840E6B    66MiB |
|    0      4444      G   ...-token=44BFCE6714302F7F5BF078EF6353E7CE    63MiB |
|    0      5659      G   ...quest-channel-token=6864229209901972762    83MiB |
+-----------------------------------------------------------------------------+

login screen now showing up on a non-primary monitor

After nvidia drivers are installed and working, sometimes the login screen after reboot is shown on a screen which is not your primary monitor. You can setup the multi monitor display by going to Settings > Devices > Displays and saving it. Now open a terminal and copy your settings to /var/lib/gdm3/.config to avoid login screen showing up on a non-primary display.

sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config