Ubuntu Install Nvidia Driver

Problem Restatement

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Step1 uninstall the old version NVIDIA driver

1
sudo apt-get remove --purge nvidia*

If the above command is not work, you can try the command below which is more effective.

1
sudo /usr/bin/nvidia-uninstall 

Step2 download the NVIDIA driver

Search your NVIDIA driver by input your computer information in Nvidia Web.
And then download the .run file.

step3 install the NVIDIA driver

1
2
3
sudo service lightdm stop // Ensure it doesn't work, maybe default is stop state.
sudo sh NVIDIA-Linux-x86_64-390.77.run // Change the filename to what you download
sudo service lightdm start

Some tips !Importanct!

  • The distribution-provided pre-install script failed! Are you sure you want to continue? Choose “yes” to continue.
  • Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? Choose “no” to continue.
  • Nvidia’s 32-bit compatibility libraries? Choose “no” to continue.
  • Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. Choose “yes” to continue.

Reference

Ubuntu安装、更新显卡驱动
linux服务器 更新显卡驱动


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!