Linux 无法插入';英伟达:没有这样的装置

Linux 无法插入';英伟达:没有这样的装置,linux,ubuntu,cuda,nvidia,caffe,Linux,Ubuntu,Cuda,Nvidia,Caffe,我正在尝试运行Linux-Ubuntu。 安装后,我在gpu中运行caffe,错误是 I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0 modprobe: ERROR: could not insert 'nvidia_352': No such device F0910 13:28:13.728612 10629 common.cpp:142] Check failed: error == cudaSucce

我正在尝试运行
Linux-Ubuntu
。 安装后,我在gpu中运行caffe,错误是

I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0
modprobe: ERROR: could not insert 'nvidia_352': No such device
F0910 13:28:13.728612 10629 common.cpp:142] Check failed: error == cudaSuccess (38 vs. 0)  no CUDA-capable device is detected
*** Check failure stack trace: ***
    @     0x7ffd3b9a7daa  (unknown)
    @     0x7ffd3b9a7ce4  (unknown)
    @     0x7ffd3b9a76e6  (unknown)
    @     0x7ffd3b9aa687  (unknown)
    @     0x7ffd3bf91cb5  caffe::Caffe::SetDevice()
    @           0x40a5a7  time()
    @           0x4080f8  main
    @     0x7ffd3aeb9ec5  (unknown)
    @           0x408618  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)
我的NVIDIA驱动程序是352.41。 我安装了352,它是最新版本

sudo apt-get install nvidia-352[sudo] 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-352 is already the newest version.
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live libupstart1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
我的Ubuntu有NVIDIA驱动程序352,为什么我会有这样的错误

I0910 13:28:13.606891 10629 caffe.cpp:296] Use GPU with device ID 0
    modprobe: ERROR: could not insert 'nvidia_352': No such device
    F0910 13:28:13.728612 10629 common.cpp:142] Check failed: error == cudaSuccess (38 vs. 0)  no CUDA-capable device is detected
我检查了是否有CUDA功能的设备,比如

lspci | grep -i nvidia
05:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K2000] (rev a1)
05:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
我有支持CUDA的设备,为什么会出错

编辑1: 是的,我的/deviceQuery测试失败了

../NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL
我检查了dev/文件夹,我有nvidia0

crwxrwxrwx  1 root root    195,   0 Sep 10 16:51 nvidia0
crw-rw-rw-  1 root root    195, 255 Sep 10 16:51 nvidiactl
我的nvcc-V支票给了我

li@li-HP-Z420-Workstation:/dev$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
然后我的版本检查

li@li-HP-Z420-Workstation:/dev$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  352.41  Fri Aug 21 23:09:52 PDT 2015
GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 
有什么问题吗?

现在问题解决了。 我选中了
sudo dpkg--list | grep nvidia
我发现我的内核有352.41,但客户端有304.12。 所以我做了
sudo apt-get-remove--purge-nvidia-*
。它删除了所有的包。 然后,将352.41安装为

$ sudo add-apt-repository ppa:xorg-edgers/ppa -y
$ sudo apt-get update
$ sudo apt-get install nvidia-352
之后

$ sudo dpkg --list | grep nvidia
rc nvidia-304 304.128-0ubuntu0~gpu14.04.2 amd64 NVIDIA legacy binary driver - version 304.128
rc nvidia-304-updates 304.125-0ubuntu0.0.2 amd64 NVIDIA legacy binary driver - version 304.125
ii nvidia-352 352.41-0ubuntu0~gpu14.04.1 amd64 NVIDIA binary driver - version 352.41
rc nvidia-opencl-icd-304 304.128-0ubuntu0~gpu14.04.2 amd64 NVIDIA OpenCL ICD
rc nvidia-opencl-icd-304-updates 304.125-0ubuntu0.0.2 amd64 NVIDIA OpenCL ICD
ii nvidia-opencl-icd-352 352.41-0ubuntu0~gpu14.04.1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.6.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 355.11-0ubuntu0~gpu14.04.1 amd64 Tool for configuring the NVIDIA graphics driver
现在版本匹配。 然后./deviceQuery,所有工作都按预期进行。
谢谢,我也有这个问题。重新安装英伟达的驱动程序并没有解决这个问题。 最后,我通过使用grub添加两个内核参数解决了这个问题

附加模块:

GRUB_CMDLINE_LINUX_DEFAULT
与:


我认为这是
cuda7.5
kernel3.19
之间的冲突,我也遇到了这个问题。上面的答案对我不适用。当我安装最新的驱动程序(
nvidia-364
)时,它工作正常。要运行的命令:

sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update 
sudo apt-get install nvidia-364

我认为当我们使用不同版本的
gcc
来编译驱动程序模块和Linux内核时,问题就会出现

另一种方法是使用.run文件安装。 这需要先杀死X服务器。 X服务器被杀死,如下所示

Make sure you are logged out.
Hit CTRL+ALT+F1 and login using your credentials.
kill your current X server session by typing sudo service lightdm stop or sudo stop lightdm
Enter runlevel 3 (or 5) by typing sudo init 3 (or sudo init 5) and install your .run file.
You might be required to reboot when the installation finishes. If not, run sudo service start lightdm or sudo start lightdm to start your X server again.
然后
run.run文件为sudo sh xxxxx.run

您可能会收到错误,因为
提供的分发版预安装脚本失败!确实要继续吗?
。然后中止安装并重试

disable the "Nouveau kernel driver" as sudo update-initramfs -u
然后重新启动系统并重新启动stop X server,输入runlevel 3并执行sudo sh xxxx。再次运行。

这一次,您可以忽略该消息并继续执行该规定的失败消息。
然后,您将能够从.run文件安装Nvidia驱动程序。

如果您正在显示来自非Nvidia设备的视频,但已安装驱动程序,则必须使用“-no opengl files”标志进行安装,Gnome才能工作

我建议下载一个单独的驱动程序,并通过登录控制台手动安装:

1. Alt Ctrl F2/f3/f4/f5 to get to console.
2. “init 3”  to kill UI
3. relogin if necessary to console
4. wget http://us.download.nvidia.com/tesla/418.67/NVIDIA-Linux-
驱动程序x86_64-418.67.run

5. sh NVIDIA-Linux-x86_64-418.67.run --no-opengl-files
6. After installation - reboot

暂且不谈caffe,您是否确定基本的CUDA安装工作正常?当然,我已经安装了CUDA7.5。所有lib和header都安装在/usr/local/cuda7.5中。所有路径导出为导出路径=/usr/local/cuda-7.5/bin:$PATH$export LD_LIBRARY\u PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY\u PATH。我成功安装了caffe。这不是我要求的。你能否编译并成功运行一个简单的CUDA应用程序,比如CUDA工具包中的一个示例?@talonmies,是的,它失败了。我在编辑中更新了。我想知道为什么?显然你的CUDA安装坏了。互联网上充斥着安装和排除CUDA故障的建议和说明。也许是时候去看看了。但这真的不是一个主题问题。也许还有更好的地方可以尝试在这方面获得帮助(例如Nvidia论坛,askubuntu)[nvidia论坛!在
/etc/default/grub
中添加
pci=nocrs-pci=realloc
,然后
#更新grub
GeForce 7系列7300 LE:
$lspci-vnn | grep-i VGA-A 12>内核驱动程序在使用中:nvidia
。很好。但是
startx
和ubuntu桌面GUI登录仍然会导致屏幕不统一。:我不知道是不是“修复”。如果Ubuntu安装在UEFI中,需要禁用快速启动和安全启动,以便加载驱动程序。
5. sh NVIDIA-Linux-x86_64-418.67.run --no-opengl-files
6. After installation - reboot