NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.

前言: 如下方法,不须要重装驱动,简单快捷。适用于Ubuntu系统下,以前已经安装过驱动,但驱动失效的问题。
若是此方法仍然没法解决问题,可参考Ubuntu下安装nvidia显卡驱动,重装驱动。web

前段时间刚装了驱动:Ubuntu下安装nvidia显卡驱动bash

可是最近准备用GPU跑模型时,提示cuda 不存在。前段时间刚装的驱动,怎么会不存在呢?svg

  • 第一步,打开终端,先用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.
  • 第二步,使用nvcc -V检查驱动和cuda。
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

发现驱动是存在的,因而进行下一步ui

  • 第三步,查看已安装驱动的版本信息
ls /usr/src | grep nvidia

好比个人驱动版本是:nvidia-450.57spa

  • 第四步,依次输入如下命令
sudo apt-get install dkms

sudo dkms install -m nvidia -v 450.57
  • 等待安装完成后,再次输入nvidia-smi,查看GPU使用状态:

在这里插入图片描述
最后,咱们熟悉的页面又回来了!问题得以解决!.net

本文同步分享在 博客“AI 菌”(CSDN)。
若有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一块儿分享。code

相关文章
相关标签/搜索