1

I recently encountered an issue with my Ubuntu 20.04 setup after attempting to upgrade CUDA from version 10.1 to 11.4. After the upgrade, I noticed that the nvidia-smi command was no longer functioning properly. In an attempt to resolve the issue, I ran ubuntu-drivers autoinstall, but unfortunately, this caused my system to stop booting normally. Now, I can only boot into recovery mode.

I've tried reinstalling Ubuntu 20.04 and 22.04 while using safe graphics mode (the try and install option led to a black screen), but this hasn't resolved the problem. It seems that I'm still stuck with the issue. Has anyone else faced a similar problem or have any suggestions on how I can get my system back to its normal state?

Edit

I've noticed an interesting detail that might be relevant. The command ubuntu-drivers list lists nvidia-340 among the drivers. However, when I try to remove it using sudo apt remove nvidia-340, I receive the message: Package 'nvidia-340' is not installed, so not removed.

  • Never tried a CUDA "upgrade", just installed the version I want in a separate directory. See https://askubuntu.com/questions/1219761/cuda-10-2-different-installation-paths/1244010#1244010 You be best to purge all nvidia and cuda packages, then install Nvidia from the standard Ubuntu repos, then use the Nvidia .run script, rejecting any offer of vid drivers and override the bin/lib location to be cuda/bin and cuda/lib instead of the system areas. – ubfan1 Aug 23 '23 at 18:54
  • Is it necessary to reinstall Nvidia drivers to solve the issue of my Ubuntu only booting in recovery mode? I believed I had completely removed all Nvidia drivers, but I still see nvidia-340 in the ubuntu-drivers list. Why is this happening? – mirzanahal Aug 25 '23 at 01:33
  • The Canonical Nvidia packages contain all the scripts to rebuild the driver when the kernel updates (or even the video driver). Nvidia drivers from any other source may not -- hence the common "Update broke my computer" complaint. A clean removal of the existing Nvidia packages let the full install replace everything, so it can have a working configuration. Older CUDA debs had weird dependencies that might cause removal of all cuda files when the video driver updates. See solutions here that install CUDA without any package or system dependencies. – ubfan1 Aug 25 '23 at 03:58

1 Answers1

0

I've identified the solution to my issue. I realized that I have a GeForce 210 graphics card inserted into my motherboard. After reinstalling Ubuntu, the Nouveau driver was automatically activated. However, the graphics card cannot communicate with the nouveau driver through VGA, and this resulted in a black screen.