When installing graphics drivers, I too find that I do not know which driver to install. I find that the safest way to install NVidia drivers is by, in fact, installing CUDA instead. When you install CUDA, it brings with it a compatible graphics driver.
If you select CUDA 10.1, for example, it will bring proprietary graphics driver version
4.18 with it.
I also surmise, given my experience, that components like cooling fans and temperature sensors do NOT load properly without CUDA installed. (you may have experienced differently, however) Basically, I do not trust any other graphics driver that does NOT come with CUDA.
My suggestion, if you are trying to install the most recent driver safely, would be to install the most recent version of CUDA, which, at the time of writing this, is version
There are several ways to install CUDA, but I will narrow down the choices so that the decision making is easier.
- Local Deb file installation
- Local Run file installation
The first option is the best option for people that decide they don't want to configure anything and just want their machine to work. You will not know where anything is installed since
deb installations follow the OSs decisions.
The second option is best when you want to configure where libraries are installed and other extra options, which, in this context, are irrelevant. This installation allows you to choose what features to keep. In fact, you could install CUDA without a driver, but that assumes you have your environment setup exactly how it is required by NVidia.
I suggest you take the first option so that you don't brick your computer.
I am assuming that you are running Ubuntu 1804 in this case.
What you will want to do is go to this link and then select Linux,
x86_64, and then
Ubuntu and then
1804. You will then select
deb (local). A list of commands will be listed for you. I have copied and pasted them here:
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
Here is how to start your BROKEN Ubuntu machine:
- Press the power button.
- Find the correct OS option in Grub2
- Go down 1 option for
- Select the first option, from the top, that says
Recovery Mode. You will be taken to a weird pink background window.
fsck to mount the OS drive.
Enable Networking (this may not work, it did not for me, but usually does work)
- Then select
Drop to root recovery prompt
If you cannot use a local Ubuntu machine WITH INTERNET, simply download the required files by pasting the links into a Windows machine's browser and download them.
You can then put those 2 files onto a flash drive and connect it to your broken Ubuntu machine.
Now you have a root terminal you can do stuff with.
I then mounted the thumb drive through CLI following this link.
You can then move the 2 files over to the local computer and run them.
BTW, I know there is a
sudo apt update command there, but
apt should still detect new sources added.
After following those instructions, you should reboot your machine and then try to log in normally.
If you do have internet, you can simply run the commands after enabling networking.
If the deb-file install does not work, you can simply download the run file version and install in root recovery prompt following the same methods.
You should have a working graphics driver AS WELL AS
CUDA after going through all of these steps. Slight modifications were added in case you don't have internet, but hopefully that is not the case. I happened to not have internet last I installed CUDA, so yeah, try that.
ONE MORE THING:
Sometimes, if you are in the broken login screen (after you typed the password and hit
ENTER), there is actually a sneak you can do.
Reboot your machine but DO NOT log in. You may also want to check if you have internet. Now, instead of normally logging in, press
Ctrl+Alt+F3 to go to a virtual serial port. You should then be able to log in through the terminal.
You should be able to have access to the internet.
At this point, you can simply run the original commands as before without changes.
Does this help you?