问题:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
解决方案:
具体操作如下:
#系统内核更新
查看内核版本
uname -r
#下载3个内核deb安装文件
#下载4.12版本的内核
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12.9/linux-headers-4.12.9-041209_4.12.9-041209.201708242344_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12.9/linux-headers-4.12.9-041209-generic_4.12.9-041209.201708242344_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12.9/linux-image-4.12.9-041209-generic_4.12.9-041209.201708242344_amd64.deb
#下载v4.15的内核版本
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500_4.15.0-041500.201802011154_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-headers-4.15.0-041500-lowlatency_4.15.0-041500.201802011154_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-image-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/linux-image-4.15.0-041500-lowlatency_4.15.0-041500.201802011154_amd64.deb
#安装内核文件
sudo dpkg -i *.deb
#安装完成以后,重新启动系统,验证内核的版本
uname -r
sudo chmod 777 ***.run
#打开文件
sudo vim /etc/modprobe.d/blacklist.conf
#在文件后面加:
blacklist nouveau
# 运行run文件
sudo sh NVIDIA-Linux-x86_64-440.44.run -no-x-check -no-nouveau-check -no-opengl-files
#
run文件安装界面选择显示:
1. There appears to already be a driver installed on your system (version:
390.42). As part of installing this driver (version: 390.42), the existing
driver will be uninstalled. Are you sure you want to continue?
Continue installation Abort installation
(选择 Coninue,如果是重装的话)
2. The distribution-provided pre-install script failed! Are you sure you want
to continue?
Continue installation Abort installation
(选择 Cotinue)
3. Would you like to register the kernel module sources with DKMS? This will
allow DKMS to automatically build a new module, if you install a different
kernel later.
Yes No
(这里选 No)
4. Install NVIDIA's 32-bit compatibility libraries?
Yes No
(这里选 No)
5. Installation of the kernel module for the NVIDIA Accelerated Graphics Driver
for Linux-x86_64 (version 390.42) is now complete.
OK
验证:
nvidia-smi
#重装nVidia驱动
sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-390
sudo reboot
#重启后
lsmod | grep nvidia