1

I've recently installed graphic drivers for an nvidia geforce RTX 2070. After that, Ubuntu (version 21.04) wouldn't boot anymore. (Lots of people seem to have this issue, see e.g. [1], [2], [3].) I've installed the driver via the built-in app (forgot the name and can't look since I can't boot, I think "Something & Packages"). I've then managed to remove the drivers by running some variant of sudo apt purge nvidia-.* in the Root Shell Prompt accessed via recovery mode, which allowed me to boot again.

I've next tried installing drivers by running the file downloaded here from the terminal. I figured that, if it doesn't work, I could remove the drivers again with the above command. However, this time, the same command returned a message saying there are no packages that start with 'nvidia' installed. As a result, I'm now unable to boot Ubuntu.

I've also tried

  • Navigating to the file (also in the recovery mode root shell) and launching it with the --uninstall option. It threw some error messages during the process but told me the drivers were successfully removed. However, I still can't boot.
  • Reinstalling and uninstalling with the file
  • Navigating into /etc/ and removing all files with xorg in their name (I have no idea what those files are, but it was among the suggested fixes I've found.)

Still can't boot. Any ideas other than the three things above or reinstalling Ubuntu?

Aside from being unable to boot, I still really need to get the drivers going. I only have Ubuntu to run ML stuff, which also requires a functioning GPU. Is there anything better than trying another of the suggested drivers and hoping for a different result?

EDIT: I believe this is (also) a hardware issue; the behavior changed after I changed BIOS settings (the action, only in the opposite direction, is described here.)

EDIT2: I've been told I need another power supply, I'll try that next.

silver
  • 121

2 Answers2

3

I had similar problem. Exact steps might be different but you should get an idea from what I did.

  1. uninstall nvidia drivers as mentioned above.

  2. reboot and instead of login to UI, login to console

  3. make sure nvidia modules are not loaded. You can do that by running command

sudo lsmod  | grep nvidia

This will list any nvidia modules loaded by the kernel. If the modules are loaded that means your nvidia uninstall was not clean and you will need to manually remove the kernel module.

rmmod <name of nvidia modules>
  1. Install xserver-xorg
sudo apt-get install --reinstall xserver-xorg-video-nouveau

This will set your system to use nouveau.

  1. Reboot and connect your monitor. It should detect now.

  2. Use "Additional Drivers" from "Show Application" to install nvidia drivers. (I think latest right now is "nvidia driver metapackage from nvidia-driver-470".

Reboot.

  1. Assuming you don't have secure boot enabled. If secure boot is enable you need to ensure that nvidia kernel modules are signed and loaded.

  2. run sudo lsmod | grep nvidia and nvidia-smi to check if nvidia drivers are loaded.

  3. Now run torch.cuda.is_available() and see if it is able to use GPU.

2

List all Nvidia related packages

dpkg -l | grep nvidia

Purge all the Nvidia related package you see in the list

When you have done this successfully

sudo ubuntu-drivers autoinstall
sudo prime-select nvidia

Reboot and now your system should work fine