19

I have downloaded Nvidia driver for Linux from official website to install in my laptop. It is a file named NVIDIA-Linux-x86_64-390.67.run, how to install this file?

22

Determine the latest version of Nvidia driver available for your graphics card

  1. Visit the graphics drivers PPA homepage here and determine the latest versions of Nvidia drivers

  2. Verify that your graphics card is capable of running the latest drivers.

If your graphic is supported, you can go ahead and remove all previously installed Nvidia drivers on your system. Enter the following command in terminal.

sudo apt-get purge nvidia*

Add the graphics drivers PPA

​Let us go ahead and add the graphics-driver PPA -

sudo add-apt-repository ppa:graphics-drivers

sudo apt-get update

Install (and activate) the latest Nvidia graphics drivers.Enter the following command to install the version of Nvidia graphics supported by your graphics card -

sudo apt-get install nvidia-XXXX 

(xxxx - Supported Version)

Reboot your computer for the new driver to kick-in. You can check your installation status with the following command

lsmod | grep nvidia

If there is no output, then your installation has probably failed. It is also possible that the driver is not available in your system's driver database. You can run the following command to check if your system is running on the open source driver nouveau. If the output is negative for nouveau, then all is well with your installation.

lsmod | grep nouveau

This is my terminal output of Nvidia Drivers.

My Nvidia Drivers

devansh@varshney:~$ nvidia-smi
Wed Apr 24 01:14:16 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56       Driver Version: 418.56       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| 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 940MX       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P5    N/A /  N/A |    254MiB /  2004MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3975      G   /usr/lib/xorg/Xorg                           108MiB |
|    0      4002      G   /usr/lib/firefox/firefox                       1MiB |
|    0      4350      G   /usr/bin/gnome-shell                         137MiB |
|    0      5204      G   /usr/lib/firefox/firefox                       1MiB |
|    0     24924      G   /usr/lib/firefox/firefox                       1MiB |
+-----------------------------------------------------------------------------+
  • 4
    Note: On Kubuntu I had to do sudo apt-get install nvidia-driver-xxxxx (specifically, 415) – Nathan Lafferty Feb 7 at 0:44
  • Similarly, on Ubuntu 18.04 I needed nvidia-driver-430 instead of nvidia-430 which was not found. – ComputerScientist Aug 10 at 4:33
8

I am using the nvidia-driver-390 driver version 390.48 in 18.04 which was installed with the following command:

sudo ubuntu-drivers autoinstall 
sudo reboot  

When installing a proprietary graphics driver, it is not necessary to uninstall the open source graphics driver. The two graphics drivers can be installed alongside each other allowing the open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.

The ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available.

5

To do this, you would add the graphics driver PPA with the following commands in terminal:

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

After this, you should now remove any current NVIDIA drivers by entering the following into your terminal:

sudo apt-get purge nvidia*

Now that you have done this, it is safe to install the latest version:

sudo apt-get install nvidia-driver-396

Please note that it is nvidia-driver-396 on Ubuntu 18.04, it is nvidia-396 on Ubuntu 16.04 but you are not using 16.04.

0

A simple double click should do the trick. If it doesn’t, right click -> Permissions -> enable execute permission and then try the double click again

0

I'm not sure I agree with manually installing specific drivers via

sudo apt-get install nvidia-XXXX 

Isn't it always better to wait until the new driver is available via Software & Updates?

I thought that was the purpose of adding the PPA?

  • The purpose of adding a PPA is generally to be on the edge, so you can installed the most current version instead of waiting for a new version of Ubuntu which includes the newer version of the software you want on the edge. – Alexis Wilke Sep 22 at 4:35
0

After following a ton of links and suggestion I'll put here what worked for me. The reason why I needed the driver from NVIDIA was to be able to run TensorFlow on my laptop with the configuration

  • Linux Mint 19.1 Tessa on 18.04 Ubuntu
  • RTX 2060 graphics card

What follows next were the steps I took:

  1. Go to the BIOS of your laptop (press F2 at the beginning of rebooting your computer) and disable secure booting.

  2. Once you login back to the computer again, open up a terminal and run:

    sudo apt install nvidia-settings
    

    This will allow you to modify settings for the driver you will install.

  3. Go to https://www.tensorflow.org/install/gpu and follow the steps for Ubuntu 18.04.

  4. Now, the major issue I ran into that took me forever to fix was the fact that after rebooting the computer I was running into a black screen. This was happening because the laptop was not using the original "Intel" graphics card anymore and had switched to "NVIDIA". If you run into a similar situation, use the command CTRL+ALT+F1 to go to a tty screen (teletype terminal). There you may be able to login using your username/password. Then run the code:

    sudo apt install nvidia-prime
    

    The purpose of this last command was to be able to change which graphics card my laptop was using. I then ran:

    sudo prime-select intel
    

To leave the tty and go back to your regular screen you may either reboot or do a CTRL+ALT+F7" (at least this is the command that worked for me).

Once logged in again I was able to change back to the NVIDIA card (sudo prime-select nvidia) and reboot normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.