ubuntu中NVIDIA-SMI错误的解决方案

问题:
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值