19

I am trying to install nvidia drivers on my ubuntu 16.04 (I have a GeForce GTX 960M). I tried a lot of methods explained on internet but none seems to work. (I saw How to install nvidia-smi?, nvidia-smi: command not found on Ubuntu 16, but these did not help...)

Indeed when I run nvidia-smi, I get nvidia-smi command not found, and when I run lshw -numeric -C display I see that my graphical card is has status display unclaimed. I don't know if it is related but it seems weird

16

The solution that worked for me was to disable secure boot when rebooting after installing the NVIDIA drivers.

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-381

Then reboot, in the menu choose "change secure boot options", put the password you previously chose and disable the secure boot.

  • 1
    I have disabled boot secure, but still it does not work. I changed to 384 (with Cuda 8.0), still does not work. – khan Apr 9 '18 at 16:23
  • This did not work for me – Hakaishin Oct 11 '18 at 8:08
3

Try updating the driver.

  1. Add the PPA by running the following commands in terminal:

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get update
    
  2. Open Software & Updates from System Settings or directly from Dash, click on the Additional Drivers tab, select the driver you want to use, and click Apply changes.

  3. After the driver is downloaded and installed, restart your system.

  • 1
    it did not help... – fonfonx Apr 8 '17 at 20:41
  • It does not work. Despite selection of NVIDIA driver, it reverts it and select xorg... – khan Apr 9 '18 at 16:24
1

In my case, just disabling secure boot in the BIOS solved the problem.

1

I've had this condition, this happens if you somehow boot the all-working system w/o an NVidia card and then NVidia drivers and utils disappear.

This is what helped: (considering your CUDA version is 9.2 and driver version is 418)

sudo vi /etc/ld.so.conf.d/cuda-9-2.conf 

/usr/local/cuda-9.0/targets/x86_64-linux/lib 
/usr/lib/nvidia-418   ( <<- add this line)

Then do:

sudo dpkg-reconfigure nvidia-418

Then reboot. It should work.

So, in case, it still does not, just reinstall Cuda completely, that will do it.

0

You should use nvidia-current when you run install, so you can get the latest release.

  • 5
    nvidia-current in Ubuntu 16.04 is Version: 304.135-0ubuntu0.16.04.1 which is not the latest release. – karel Dec 30 '17 at 22:25
  • You're right. Looks like nvidia's current is not really current! So find the latest release on nvidia's web site and use the specific version (nvidia-<version>). Thanks! – ibrahim Dec 30 '17 at 22:32
  • +1: This answer might be invalid now, but may be helpful in the future – ntg Dec 27 '18 at 23:19
0

This worked for me:

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-396

Some use aptitude instead of apt:

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install aptitude
sudo aptitude install nvidia-driver-396

If nothing works, please check your ubuntu (if that's your case) kernel as several guides state that some kernels are not supported by Nvidia. Ukuu is a simple tool to install different kernels and add them to GRUB. I changed mine (in ubuntu-18.04 LTS) to 4.18.4-041804-generic and find it pretty good and stable.

If this code doesn't work follow this tutorial until step 8. Though the main objective is the complete installation with also CUDA, cuDNN, NCCL, tensorflow, etc I found it good to install Nvidia drivers also (learnt the kernel issue from it, in the comments)

0

The driver's version depends on your GPU. Check it here, before installing any driver: https://www.nvidia.com/Download/index.aspx?lang=en-us

0

Only thing that worked for me was I had to uninstall everything related to nvidia and bumblebee, and upgrade my kernel from 4.4 to 4.8.17 with the help of the Ukuu package, and install 390 version of the drivers.

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.