Help for "cudaGetDeviceCount returned 38" after ./deviceQuery

Hello.I installed CUDA8.0 on Ubuntu14.04 and runned ./deviceQuery.
Then error:cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL

Some info about this problem below:
(1) $ ls -l /usr/bin/ | grep nvidia
-rwxr-xr-x 1 root root 24351 8月 17 19:38 nvidia-bug-report.sh
-rwxr-xr-x 1 root root 60536 8月 17 19:38 nvidia-cuda-mps-control
-rwxr-xr-x 1 root root 46344 8月 17 19:38 nvidia-cuda-mps-server
-rwxr-xr-x 1 root root 221968 8月 17 19:38 nvidia-debugdump
-rwxr-xr-x 1 root root 270 11月 22 2016 nvidia-detector
-rwxr-xr-x 1 root root 352808 8月 17 19:38 nvidia-installer
-rwsr-xr-x 1 root root 29424 8月 17 19:38 nvidia-modprobe
-rwxr-xr-x 1 root root 37992 8月 17 19:38 nvidia-persistenced
-rwxr-xr-x 1 root root 294472 8月 17 19:38 nvidia-settings
-rwxr-xr-x 1 root root 488896 8月 17 19:38 nvidia-smi
lrwxrwxrwx 1 root root 16 8月 17 19:38 nvidia-uninstall -> nvidia-installer
-rwxr-xr-x 1 root root 188096 8月 17 19:38 nvidia-xconfig

(2)$ ls -l /dev | grep nvidia
crw-rw-rw- 1 root root 195, 0 8月 17 19:39 nvidia0
crw-rw-rw- 1 root root 195, 255 8月 17 19:39 nvidiactl
crw-rw-rw- 1 root root 195, 254 8月 17 19:39 nvidia-modeset
crw-rw-rw- 1 root root 241, 0 8月 17 19:42 nvidia-uvm
crw-rw-rw- 1 root root 241, 1 8月 17 20:00 nvidia-uvm-tools

(3)$ sudo dmesg | grep NVRM
[ 154.686101] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 375.26 Thu Dec 8 18:36:43 PST 2016 (using threaded interrupts)
[ 157.881344] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 375.26 Thu Dec 8 18:36:43 PST 2016 (using threaded interrupts)
[ 215.363310] NVRM: Your system is not currently configured to drive a VGA console
[ 215.363312] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 215.363313] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 215.363314] NVRM: drivers including, but not limited to, vesafb, may result in
[ 215.363315] NVRM: corruption and stability problems, and is not supported.

Waiting for your help!Thank you very much!!

more info:
$ nvidia-smi
±----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26 Driver Version: 375.26 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 ERR! Off | 0000:05:00.0 On | N/A |
| 32% 46C P8 13W / 250W | 213MiB / 11170MiB | 12% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 6473 G /usr/lib/xorg/Xorg 210MiB |
±----------------------------------------------------------------------------+

$ lspci |grep -i nvidia
05:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
05:00.1 Audio device: NVIDIA Corporation Device 10ef (rev a1)

$ nvidia-smi -a
==============NVSMI LOG==============

Timestamp : Thu Aug 17 20:57:52 2017
Driver Version : 375.26

Attached GPUs : 1
GPU 0000:05:00.0
Product Name : Unknown Error
Product Brand : GeForce
Display Mode : Enabled
Display Active : Enabled
Persistence Mode : Disabled
Accounting Mode : Disabled
Accounting Mode Buffer Size : 1920
Driver Model
Current : N/A
Pending : N/A
Serial Number : N/A
GPU UUID : GPU-9e74d154-b662-b7f5-743d-d0f933c31839
Minor Number : 0
VBIOS Version : 86.02.39.00.2A
MultiGPU Board : No
Board ID : 0x500
GPU Part Number : N/A
Inforom Version
Image Version : G001.0000.01.04
OEM Object : 1.1
ECC Object : N/A
Power Management Object : N/A
GPU Operation Mode
Current : N/A
Pending : N/A
GPU Virtualization Mode
Virtualization mode : None
PCI
Bus : 0x05
Device : 0x00
Domain : 0x0000
Device Id : 0x1B0610DE
Bus Id : 0000:05:00.0
Sub System Id : 0x36091462
GPU Link Info
PCIe Generation
Max : 3
Current : 1
Link Width
Max : 16x
Current : 16x
Bridge Chip
Type : N/A
Firmware : N/A
Replays since reset : 0
Tx Throughput : 162000 KB/s
Rx Throughput : 0 KB/s
Fan Speed : 32 %
Performance State : P8
Clocks Throttle Reasons
Idle : Not Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Not Active
Sync Boost : Not Active
Unknown : Not Active
FB Memory Usage
Total : 11170 MiB
Used : 213 MiB
Free : 10957 MiB
BAR1 Memory Usage
Total : 256 MiB
Used : 5 MiB
Free : 251 MiB
Compute Mode : Default
Utilization
Gpu : 26 %
Memory : 5 %
Encoder : 0 %
Decoder : 0 %
Ecc Mode
Current : N/A
Pending : N/A
ECC Errors
Volatile
Single Bit
Device Memory : N/A
Register File : N/A
L1 Cache : N/A
L2 Cache : N/A
Texture Memory : N/A
Texture Shared : N/A
Total : N/A
Double Bit
Device Memory : N/A
Register File : N/A
L1 Cache : N/A
L2 Cache : N/A
Texture Memory : N/A
Texture Shared : N/A
Total : N/A
Aggregate
Single Bit
Device Memory : N/A
Register File : N/A
L1 Cache : N/A
L2 Cache : N/A
Texture Memory : N/A
Texture Shared : N/A
Total : N/A
Double Bit
Device Memory : N/A
Register File : N/A
L1 Cache : N/A
L2 Cache : N/A
Texture Memory : N/A
Texture Shared : N/A
Total : N/A
Retired Pages
Single Bit ECC : N/A
Double Bit ECC : N/A
Pending : N/A
Temperature
GPU Current Temp : 40 C
GPU Shutdown Temp : 96 C
GPU Slowdown Temp : 93 C
Power Readings
Power Management : Supported
Power Draw : 16.06 W
Power Limit : 250.00 W
Default Power Limit : 250.00 W
Enforced Power Limit : 250.00 W
Min Power Limit : 125.00 W
Max Power Limit : 300.00 W
Clocks
Graphics : 468 MHz
SM : 468 MHz
Memory : 405 MHz
Video : 544 MHz
Applications Clocks
Graphics : N/A
Memory : N/A
Default Applications Clocks
Graphics : N/A
Memory : N/A
Max Clocks
Graphics : 1936 MHz
SM : 1936 MHz
Memory : 5505 MHz
Video : 1708 MHz
Clock Policy
Auto Boost : N/A
Auto Boost Default : N/A
Processes
Process ID : 6473
Type : G
Name : /usr/lib/xorg/Xorg
Used GPU Memory : 210 MiB

You don’t mention which GPU you are using, but it looks like the driver doesn’t recognize it. I suggest installing the latest driver for your GPU.

The GPU I am using is GTX1080Ti.And whatelse info should I provide?

375.26 doesn’t work with 1080Ti

Go to www.nvidia.com/drivers, and find the latest driver for your 1080Ti, and install it. This assumes you used the runfile installer method to install CUDA 8, but that appears to be the case if you got 375.26 installed.

http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#abstract

Or you could just install CUDA 9 RC.

Thank you very much!Appreciate it!

Thank you very much!Appreciate it!
I did read the installation guide and follow it seriously.Also the instalation happened severial times last night.
Whatever,the new driver 384.59 made the ‘./deviceQuery’ and './bandwidthTest’work.
Thank you again!

Same issue. Is there an available Cuda 8 for 1080Ti now?

I attached my env info as below:

$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz
Stepping:              1
CPU MHz:               3699.984
BogoMIPS:              7200.50
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              15360K
NUMA node0 CPU(s):     0-11
$ nvidia-smi
Tue Nov 14 02:53:14 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  ERR!                Off  | 0000:02:00.0     Off |                  N/A |
|  0%   34C    P0    59W / 250W |      0MiB / 11171MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  ERR!                Off  | 0000:04:00.0     Off |                  N/A |
|  0%   38C    P0    57W / 250W |      0MiB / 11169MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+