Ubuntu 16.04 LTS, CUDA 8.0 deviceQuery cudaGetDeviceCount returns error 35: "CUDA driver version is insufficient for CUDA runtime version"

My GPU is a GTX 950.

I installed CUDA 8.0 from .deb (not runfile) using the instructions at Installation Guide Linux :: CUDA Toolkit Documentation. When I try to run the deviceQuery sample, this is what I get:

$ ./deviceQuery./deviceQuery Starting...

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

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

These are the results of lspci:

$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 950] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 0fba (rev a1)

I’ve updated the PATH variable in my ~/.bashrc to include the CUDA bin directory, and nvcc seems to be found with no issue:

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

This is the output of nvidia-smi:

$ nvidia-smi
Sun Aug 20 10:57:41 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 950     Off  | 0000:01:00.0      On |                  N/A |
|  0%   37C    P5    11W / 110W |    373MiB /  1996MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0       946    G   /usr/lib/xorg/Xorg                             228MiB |
|    0      1879    G   compiz                                          90MiB |
|    0      2431    G   /usr/lib/firefox/firefox                         1MiB |
|    0     26095    G   ...s-passed-by-fd --v8-snapshot-passed-by-fd    51MiB |
+-----------------------------------------------------------------------------+

And this is the NVIDIA driver info in /proc/driver/nvidia/version:

$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  375.66  Mon May  1 15:29:16 PDT 2017
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

I think I installed the GPU driver 375.66 using apt-get. Didn’t download the .deb. Could this be related to the problem?

Thanks for any help.

I had a similar error on my system, but was able to fix it.

When following the guide to install CUDA via a .deb file you can choose between the local and the network solution. When I tried to install CUDA via the network solution it did not work. But it did work when I used the local solution.

The network solution is the same as installing CUDA in the following way:

adding:
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/
to the sources.list.d and then doing:

sudo apt-get update
sudo apt-get install cuda

While the local solution is downloaded here:
https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

So it seems there is a discrepancy between the two .deb solutions

Would be nice to get an explanation why though.

Note that I also used CUDA 8.0.61, Ubuntu 16.04 and nvidia 375.66, but with a Geforce 1050Ti.

AxVi,

Sorry I never replied to this! I haven’t had time to play around with CUDA again until now, but per your suggestion, I downloaded the local solution (https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb)–note that the current CUDA version is 9.0.176, which is what I downloaded, although originally it was 8.0.61 that had been giving me trouble. Either way, using the local solution and not the network solution of the new 9.0 version worked, after a reboot.

Thank you!