nvidia-smi command not found Ubuntu 16.04

197,772

Solution 1

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.

Solution 2

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.

Solution 3

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.

Solution 4

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

Solution 5

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

Share:
197,772

Related videos on Youtube

fonfonx
Author by

fonfonx

Updated on September 18, 2022

Comments

  • fonfonx
    fonfonx over 1 year

    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

  • fonfonx
    fonfonx about 7 years
    it did not help...
  • karel
    karel over 6 years
    nvidia-current in Ubuntu 16.04 is Version: 304.135-0ubuntu0.16.04.1 which is not the latest release.
  • ibrahim
    ibrahim over 6 years
    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!
  • khan
    khan about 6 years
    I have disabled boot secure, but still it does not work. I changed to 384 (with Cuda 8.0), still does not work.
  • khan
    khan about 6 years
    It does not work. Despite selection of NVIDIA driver, it reverts it and select xorg...
  • Hakaishin
    Hakaishin over 5 years
    This did not work for me
  • ntg
    ntg over 5 years
    +1: This answer might be invalid now, but may be helpful in the future
  • Brad
    Brad over 4 years
    Not work for me. I got Package nvidia-381 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'nvidia-381' has no installation candidate
  • Free Url
    Free Url over 4 years
    +1 I would usually use the cli, but this was better than the answer above. Got me working without having to worry about purging packages or which version to install - I got a more updated one without having to try... Nice!
  • Nagabhushan S N
    Nagabhushan S N almost 4 years
    How to find which version to install? I mean nvidia-381 or nvidia-340....
  • James Bond
    James Bond over 3 years
    Thanks for secure boot disabling feature. I just have disabled it in BIOS and nvidia driver started working, because I already installed it while system installing. Ubuntu 20.04.
  • Prince Emmanuel
    Prince Emmanuel over 3 years
    Glad it worked for you @FreeUrl
  • Lucas Azevedo
    Lucas Azevedo about 3 years
    @NagabhushanSN depends on the model of your GPU.. you can get the right driver on nvidia's website
  • Alex Lokk
    Alex Lokk almost 3 years
    Worked for me: Ubuntu 16.04.7 LTS, nvidia-384, disabled secure boot.