Ubuntu 16.04 CUDA installation "no CUDA-capable device is detected"

Hello,

OS: Ubuntu 16.04 (64 bit)
Kernel: 4.13
GPU: GeForce GTX 1050 Ti (driver version 390.67)

I need to install cuDNN. Taking to the account my driver I can use only version for CUDA 9.0. I installed CUDA 9.0 but when I run deviceQuery is says:

[i]./deviceQuery Starting…

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

cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL[/i]

Verification for CUDA-Capable GPU:

lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)

Driver version check:

cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 390.67 Fri Jun 1 04:04:27 PDT 2018
GCC version: gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~16.04)

While the installation of both CUDA and NVIDIA driver I was following the instruction, but it still doesn’t work. Could you please help me? What am I doing wrong here?

Thank you!

perhaps you installed your driver from the ppa repo for ubuntu. That may not have the necessary pieces to run CUDA. Follow the instructions in the linux install guide to clean out any old CUDA installs. Get your installers from https://www.nvidia.com/getcuda (that page also has a link the CUDA toolkit archive for older versions) follow the install instructions in the linux install guide.

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

Hello,

In the beginning I tried to install drivers with ppa and then I faced current problem. From this discussion https://devtalk.nvidia.com/default/topic/876432/cuda-setup-and-installation/no-cuda-capable-device-is-detected/ I understood that I have to start everything from the beginning. And that is what I did.

I followed exactly all of the instructions from:
https://docs.nvidia.com/cuda/archive/9.0/cuda-installation-guide-linux/index.html#pre-installation-actions
http://us.download.nvidia.com/XFree86/Linux-x86_64/390.67/README/index.html

I removed all the packages that I have with
sudo apt-get --purge -y remove ‘cuda*’
sudo apt-get --purge -y remove ‘nvidia*’
sudo apt autoremove

Then I rebooted, updated and upgraded.

To install the drivers I logged in as a root and run
sh NVIDIA-Linux-x86_64-390.67.run

and in advance for Nouveau I had a .conf file with this

blacklist nouveau
options nouveau modeset=0

Rebooted. Then disabled X server with service lightdm stop
and to prevent the X server from loading Nouveau run:

modprobe -r nouveau

I installed it with no problems then.

After I had downloaded CUDA 9.0 I went through all the Pre-installation Actions even thought I already did it before. After I followed the installation instructions for .deb files.

After installation added CUDAs path to the PATH variable:
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}

Installed the Samples and compiled them.

Overall I followed every step and still when I run ./deviceQuery it says “no CUDA-capable device is detected”.

So I do not understand. What I am missing here that it doesn’t work?

Thank you!

I don’t see anywhere that you removed nouveau from the initrd

and you may still have some mixed driver components hanging around.

the easiest approach might be to start with a clean load of the operating system