Simplifying NVIDIA driver installation on Ubuntu
Troubleshooting and Resolving Issues
If you were not greeted with something graphical but rather a blank screen, then it is likely that the package is not in fact suitable for your GPU and will need to be removed. Don't panic just yet, however. This is a fairly easy and straightforward process as well. Reboot, and at the GRUB loading screen, instead of choosing a normal boot into Ubuntu, choose Advanced Options for Ubuntu and then choose the Ubuntu, with Linux … (recovery mode) option. The … will show the kernel that you are running and you can select the most recent kernel here. Make sure to select the recovery mode option regardless.
Once in recovery mode you will want to choose root, with the description of Drop to root shell prompt. This will boot into a command line and from here you can get rid of the offending packages. Run the following to find out which NVIDIA packages are installed:
$ apt list *nvidia* --installed
Once you have seen what packages are there, you can use the following two commands in the following order to rid yourself of the NVIDIA packages. First use:
$ apt remove nvidia-driver-390 nvidia-settings nvidia-prime nvidia-dkms ... etc.
You will have many NVIDIA packages here, and listing all of them after the driver package itself with a space between them will remove all. This will get rid of dependencies and libraries so that when you try the next option you are starting from a clean slate. In the example above I listed a few of the packages that show up when I run the list
command, but there are about 20 or 22 of them in total. Once that is done, you will finalize the uninstallation by running the same but with purge
instead of remove
, ‡ la:
$ apt purge nvidia-driver-390 nvidia-settings nvidia-prime nvidia-dkms ... etc.
This gets rid of any settings and configurations that may still be lingering after removal of the packages themselves. You can also do a quick cleaning with the following command after all of that:
$ apt autoremove
just to be sure that you have gotten everything out of there that can be removed.
When this is complete, simply type reboot
and hit Enter to reboot the system. At this point you should see that the nouveau drivers are loaded and running instead of the proprietary NVIDIA ones. You can now try a different driver package by listing and installing as you did before, and I would recommend going to the next available lower number. In my experience most of the problems that I have had with installing NVIDIA drivers stem from the fact that my old cards aren't well supported on newer drivers, even though those newer drivers will show up when queried. Going to older available packages one at a time ensures that I have the most up-to-date set of packages available for my card which will run without problems.
Concluding Remarks
I cannot express the amount of frustration I felt as a beginner around installing one of these only to have a blank screen be the result upon reboot. At that time, my solution was a complete reinstall of the OS, at which point I would try to use the open source driver package with its faults or go to a different NVIDIA driver and cross my fingers and hope for better results. Yes, I have reinstalled Ubuntu more then four times simply trying to get a driver package that worked. That is exactly why I think it is important not only to be comfortable with the terminal and with using the recovery mode, but also simply to know a bit about what is happening under the hood. Now that I have a method for recovery upon failure and have some confidence that I can get my system back to a working desktop, I can say that I simply find it easier and faster to use the terminal for the entire process. The added benefit here in my opinion is that you can actually see what is happening in the terminal rather than waiting, guessing, and hoping with the GUI equivalent (Figure 4).
Hopefully one day we will see the NVIDIA gang team up with our beloved open source community to produce a non-proprietary solution with the performance and benefits of the closed source offering that currently exists. Until then I am afraid we are stuck with some of this hassle. Following the advice given above, however, you at least won't have to be stuck at a blank screen for too long after installing their solution onto your machine. I guess it really is as they say: You win some and you lose some.
Infos
- NVIDIA: https://www.nvidia.com/
- AMD Radeon graphics cards: https://www.amd.com/en/graphics/radeon-rx-graphics
- Ubuntu: https://ubuntu.com/
- Red Hat Enterprise Linux: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
- Fedora Linux: https://getfedora.org/
- Nouveau Xorg driver: https://launchpad.net/nouveau
- SteamOS and Linux titles: https://store.steampowered.com/linux
- Pop!_OS by system76: https://pop.system76.com/
- YouTube: Gaming on Linux is NOT Ready: https://www.youtube.com/watch?v=Rlg4K16ujFw
- NVIDIA Optimus technology: https://www.nvidia.com/en-us/geforce/technologies/optimus/technology/
- Intel GPUs: https://www.intel.com/content/www/us/en/products/discrete-gpus.html
- Supermicro X8STi: https://www.supermicro.com/products/motherboard/Xeon3000/X58/X8STi.cfm
- Dell Latitude E-Series laptops: https://www.dell.com/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4