Install Proprietary Nvidia GPU Drivers on Ubuntu 16.04 / 17.10 / 18.04

Linux, including Ubuntu is rapidly being installed on advanced computers with proprietary graphic cards and drivers to support them… If you currently own a Ubuntu computer with Nvidia graphics installed, you’re in luck, because you can now get fresh drivers from upstream, currently shipping Nvidia cards.

This brief tutorial is going to show students and new users how to install Nvidia official PPA repository to always get the latest drivers for your Nvidia graphics cards for your Ubuntu machines..

The current official release: `nvidia-387` (387.34) and the current long-lived branch release: `nvidia-384` (384.98)

Specific graphics cards should use the list below:

For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.104)
For NV4x and G7x GPUs use `nvidia-304` (304.137)

When you’re ready to install the PPA and drivers, continue below;

Step 1: Add the Official Nvidia PPA to Ubuntu

To add the drivers repository to Ubuntu, run the commands below:

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

When you run the commands above, you should get a prompt to accept the repository signing key as well.. accept and continue installing the PPA…

Step 2: Update and Install Nvidia Drivers

Now that the PPA is installed, run the commands below to install the current latest drivers for your system.

sudo apt update
sudo apt install nvidia-387

After installing the drivers above reboot your system for the new drivers to be enabled on the systems..

Step 3: Install Cards Specific Drivers

If you want to install the drivers for the specific cards installed on your systems, use the list below:

For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.104)
For NV4x and G7x GPUs use `nvidia-304` (304.137)

Reboot after installing as well

For support timeframe for these cards, see the official page below.

https://nvidia.custhelp.com/app/answers/detail/a_id/3142

Also, once logged back in, you may want to open Software & Updates under System Settings and go to Additional Drivers tab, select the required driver version and click “Apply Changes”.

This how you install Nvidia GPUs drivers for computers with Nvidia cards installed.

Enjoy!

You may also like the post below:

Install Lighttpd HTTP Server on Ubuntu 16.04 LTS with MariaDB and PHP 7.1 Support

25 Replies to “Install Proprietary Nvidia GPU Drivers on Ubuntu 16.04 / 17.10 / 18.04

  1. Seems to be broken:

    $ sudo add-apt-repository ppa:graphics-drivers/ppa
    Cannot add PPA: ‘ppa:~graphics-drivers/ubuntu/ppa’.
    ERROR: ‘~graphics-drivers’ user or team does not exist.
    $

    1. Have you tried manually going in there to add the repository manually? I had the same problem myself although it was because I hadn’t connected to the internet yet. But since your posting I’m going to assume you’ve connected to the net, and I would have you try to add it manually.

  2. nvidia-304 seems to be broken. On lubuntu 18.04:

    sudo add-apt-repository ppa:graphics-drivers
    [sudo] password for user:
    Fresh drivers from upstream, currently shipping Nvidia.

    ## Current Status

    Current short-lived branch release: `nvidia-396` (396.24)
    Dropped support for Fermi series (https://nvidia.custhelp.com/app/answers/detail/a_id/4656)

    Current long-lived branch release: `nvidia-390` (390.48)
    Old long-lived branch release: `nvidia-384` (384.130)

    For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.106)
    For NV4x and G7x GPUs use `nvidia-304` (304.137) End-Of-Life!

    Support timeframes for Unix legacy GPU releases:
    https://nvidia.custhelp.com/app/answers/detail/a_id/3142

    ## What we’re working on right now:

    – Normal driver updates
    – Help Wanted: Mesa Updates for Intel/AMD users, ping us if you want to help do this work, we’re shorthanded.

    ## WARNINGS:

    This PPA is currently in testing, you should be experienced with packaging before you dive in here:

    Volunteers welcome! See also: https://github.com/mamarley/nvidia-graphics-drivers/

    ### How you can help:

    ## Install PTS and benchmark your gear:

        sudo apt-get install phoronix-test-suite

    Run the benchmark:

        phoronix-test-suite default-benchmark openarena xonotic tesseract gputest unigine-valley

    and then say yes when it asks you to submit your results to openbechmarking.org. Then grab a cup of coffee, it takes a bit for the benchmarks to run. Depending on the version of Ubuntu you’re using it might preferable for you to grabs PTS from upstream directly: http://www.phoronix-test-suite.com/?k=downloads

    ## Share your results with the community:

    Post a link to your results (or any other feedback to): https://launchpad.net/~graphics-drivers-testers

    Remember to rerun and resubmit the benchmarks after driver upgrades, this will allow us to gather a bunch of data on performance that we can share with everybody.

    If you run into old documentation referring to other PPAs, you can help us by consolidating references to this PPA.

    If someone wants to go ahead and start prototyping on `software-properties-gtk` on what the GUI should look like, please start hacking!

    ## Help us Help You!

    We use the donation funds to get the developers hardware to test and upload these drivers, please consider donating to the “community” slider on the donation page if you’re loving this PPA:

    http://www.ubuntu.com/download/desktop/contribute
    More info: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
    Press [ENTER] to continue or Ctrl-c to cancel adding it.

    Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
    Hit:2 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
    Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
    Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    Ign:6 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04 InRelease
    Hit:7 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04 Release
    Fetched 163 kB in 3s (51.9 kB/s)
    Reading package lists… Done
    user@Winfast:~$ lsmod | grep nvidia
    user@Winfast:~$ lsmod | grep NVIDIA
    user@Winfast:~$ sudo apt update
    Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
    Hit:2 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
    Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
    Ign:5 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04 InRelease
    Hit:6 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04 Release
    Get:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    Fetched 163 kB in 3s (52.7 kB/s)
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    All packages are up to date.
    user@Winfast:~$ sudo apt install nvidia-304
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    nvidia-304 : Depends: xorg-video-abi-11 but it is not installable or
    xorg-video-abi-12 but it is not installable or
    xorg-video-abi-13 but it is not installable or
    xorg-video-abi-14 but it is not installable or
    xorg-video-abi-15 but it is not installable or
    xorg-video-abi-18 but it is not installable or
    xorg-video-abi-19 but it is not installable or
    xorg-video-abi-20 but it is not installable or
    xorg-video-abi-23
    Depends: xserver-xorg-core but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    user@Winfast:~$ ubuntu-drivers devices
    == /sys/devices/pci0000:00/0000:00:05.0 ==
    modalias : pci:v000010DEd00000242sv0000105Bsd00000CAFbc03sc00i00
    vendor : NVIDIA Corporation
    model : C51G [GeForce 6100]
    driver : nvidia-304 – third-party free recommended
    driver : xserver-xorg-video-nouveau – distro free builtin

    user@Winfast:~$ sudo ubuntu-drivers autoinstall
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    nvidia-304 : Depends: xorg-video-abi-11 but it is not installable or
    xorg-video-abi-12 but it is not installable or
    xorg-video-abi-13 but it is not installable or
    xorg-video-abi-14 but it is not installable or
    xorg-video-abi-15 but it is not installable or
    xorg-video-abi-18 but it is not installable or
    xorg-video-abi-19 but it is not installable or
    xorg-video-abi-20 but it is not installable or
    xorg-video-abi-23
    Depends: xserver-xorg-core but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

  3. I was installing the way you suggest but it get stuck. And it was showing Following Error-

    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

    1. Make sure you don’t have another process (maybe Ubuntu Software center ?) already using dpkg. Rebooting usually solves this issue.

  4. The best way(in my opinion) is to use the ubuntu repository.
    try : ubuntu-drivers devices #It will permit to see what versions is recommended for your driver
    then : sudo ubuntu-drivers autoinstall # the recommended version will be installed

  5. I am so weary of pages that suck hours of my time that do not work. After the PPA install,

    “Unable to locate package nvidia-387”

    Or any other package. What a waste of time.

  6. Thank you so much for this. You saved my bacon! I never would have thought too look to apply the driver. Thank you! Also, these computers in which I am installing these drivers are going to Africa to refugees. You have saved me time and effort which will changes countless lives. Thank you for the help.

  7. Hi. I did all of this, but in SOFTWARE & UPDATES -> ADDITIONAL DRIVERS appears the nvidia but don’t allow me to select another option but “Continue using a manually installed driver”.

    1. I used the first procedure to install the nvidia 304 drivers in Black Lab Enterprise linux. When I went to the Software & Updates > Additional Drivers, there were several other nvidia drivers listed (along with radio nobs in front to select them) along with the default OS driver. Did you see a list of additional drivers on the Additional Drivers page?

  8. When you are on the SOFTWARE & UPDATES > ADDITIONAL DRIVERS page, are there other nvidia drivers listed? They should all have a ‘radio knob’ in front of them to enable you to select the specific driver that you want to install.

  9. after installing nvidia driver, the login screen converts to a black blank screen and frequently restarts that screen, I read several threads and did many ways but didn’t work.my graphic card is gt720m and Ubuntu 18.04 and the version of driver is 340.107. I can just go to recovery mode and from root terminal purge nvidia driver to go back in Ubuntu, but still I need to install Nvidia driver, what should I do?

  10. Doesn’t work for me. After
    sudo add-apt-repository ppa:graphics-drivers
    sudo apt update
    sudo apt install nvidia-410
    (410 is the current branch now in 11/2018)
    … I get …
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut.
    Statusinformationen werden eingelesen…. Fertig
    E: Paket nvidia-410 kann nicht gefunden werden.
    (translated: cannot find package nvidia-410)

  11. This worked for me:
    sudo add-apt-repository ppa:graphics-drivers
    sudo apt update
    sudo apt install nvidia-390

    Then, in “Software & Updates”, “Additional Drivers” I could select “nvidia-driver-410”.

    I checked the “390” version was compatible with my card before installing: http://www.nvidia.com/object/unix.html
    Not all the “nvidia-nnn” versions are available, even though the blurb says “410” is the latest.
    Run this to get a list of versions:
    sudo apt-cache search nvidia-

  12. Adding the repository worked fine, but once the driver was installed in Ubuntu 16.04.2 on my T-61 laptop it insisted on hibernating when the top was closed while it was sitting in its docking station. Changing the “power” settings to ask it not to do this had no effect. The same settings work just fine with the freeware driver. Hibernating is awkward and pointless when the laptop is in a docking station. I tried tweaking settings to use the monitor connected to the docking station as primary, but only succeeded in rendering the machine totally unusable: blank screen all the time. I finally installed 16.04.2 again and went back to the freeware driver. It’s flaky, but at least I can see what I am doing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.