# 2.1. Verify You Have a CUDA-Capable GPU
$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1617 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 0fbb (rev a1)
If your graphics card is from NVIDIA and it is listed in CUDA GPUs - Compute Capability | NVIDIA Developer, your GPU is CUDA-capable.
I have NVIDIA GTX 980M & it is CUDA capable
# 2.2. Verify You Have a Supported Version of Linux
the output of uname is
$ uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION=“Ubuntu 14.04.3 LTS”
NAME=“Ubuntu”
VERSION=“14.04.3 LTS, Trusty Tahr”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 14.04.3 LTS”
VERSION_ID=“14.04”
HOME_URL=“http://www.ubuntu.com/”
SUPPORT_URL=“http://help.ubuntu.com/”
BUG_REPORT_URL=“http://bugs.launchpad.net/ubuntu/”
# 2.3. Verify the System Has gcc Installed
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# 2.4. Choose an Installation Method
I chose ## 3. Package Manager Installation
[i]$ sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
$ sudo apt-get update
$ sudo apt-get install cuda
[/i]
# 6. Post-installation Actions
6.1.1. Environment Setup
$ export PATH=/usr/local/cuda-7.5/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
6.2.1. Install Writable Samples
$ cuda-install-samples-7.5.sh
6.2.2. Verify the Installation
6.2.2.1. Verify the Driver Version
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015
GCC version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
6.2.2.2. Compiling the Examples
$ cd <directory_where_NVIDIA_CUDA_7.55_SAMPLES_IS_LOCATED>
6.2.2.3. Running the Binaries
$ sudo ./bin/x86_64/linux/release/deviceQuery
./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 **
$ sudo ./bin/x86_64/linux/release/bandwidthTest
[CUDA Bandwidth Test] - Starting…
Running on…
cudaGetDeviceProperties returned 38
→ no CUDA-capable device is detected
CUDA error at bandwidthTest.cu:255 code=38(cudaErrorNoDevice) “cudaSetDevice(currentDevice)”
$ nvidia-smi -a
Failed to initialize NVML: GPU access blocked by the operating system
$ sudo dmesg | grep NVRM
[ 2.205328] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015
[ 5.758941] NVRM: Your system is not currently configured to drive a VGA console
[ 5.758943] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 5.758944] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 5.758945] NVRM: drivers including, but not limited to, vesafb, may result in
[ 5.758946] NVRM: corruption and stability problems, and is not supported.
[ 2201.848371] NVRM: API mismatch: the client has the version 352.79, but
[ 2201.848371] NVRM: this kernel module has the version 352.63. Please
[ 2201.848371] NVRM: make sure that this kernel module and all NVIDIA driver
[ 2201.848371] NVRM: components have the same version.
[ 2201.848377] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 5170.497366] NVRM: API mismatch: the client has the version 352.79, but
[ 5170.497366] NVRM: this kernel module has the version 352.63. Please
[ 5170.497366] NVRM: make sure that this kernel module and all NVIDIA driver
[ 5170.497366] NVRM: components have the same version.
[ 5170.497375] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 5246.157751] NVRM: API mismatch: the client has the version 352.79, but
[ 5246.157751] NVRM: this kernel module has the version 352.63. Please
[ 5246.157751] NVRM: make sure that this kernel module and all NVIDIA driver
[ 5246.157751] NVRM: components have the same version.
[ 5246.157755] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 7117.817773] NVRM: API mismatch: the client has the version 352.79, but
[ 7117.817773] NVRM: this kernel module has the version 352.63. Please
[ 7117.817773] NVRM: make sure that this kernel module and all NVIDIA driver
[ 7117.817773] NVRM: components have the same version.
[ 7117.817781] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 7205.000574] NVRM: API mismatch: the client has the version 352.79, but
[ 7205.000574] NVRM: this kernel module has the version 352.63. Please
[ 7205.000574] NVRM: make sure that this kernel module and all NVIDIA driver
[ 7205.000574] NVRM: components have the same version.
[ 7205.000584] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 7221.475002] NVRM: API mismatch: the client has the version 352.79, but
[ 7221.475002] NVRM: this kernel module has the version 352.63. Please
[ 7221.475002] NVRM: make sure that this kernel module and all NVIDIA driver
[ 7221.475002] NVRM: components have the same version.
[ 7221.475005] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 8559.989437] NVRM: API mismatch: the client has the version 352.79, but
[ 8559.989437] NVRM: this kernel module has the version 352.63. Please
[ 8559.989437] NVRM: make sure that this kernel module and all NVIDIA driver
[ 8559.989437] NVRM: components have the same version.
[ 8559.989447] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 8669.607073] NVRM: API mismatch: the client has the version 352.79, but
[ 8669.607073] NVRM: this kernel module has the version 352.63. Please
[ 8669.607073] NVRM: make sure that this kernel module and all NVIDIA driver
[ 8669.607073] NVRM: components have the same version.
[ 8669.607081] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22
[ 9117.962288] NVRM: API mismatch: the client has the version 352.79, but
[ 9117.962288] NVRM: this kernel module has the version 352.63. Please
[ 9117.962288] NVRM: make sure that this kernel module and all NVIDIA driver
[ 9117.962288] NVRM: components have the same version.
[ 9117.962292] NVRM: nvidia_frontend_ioctl: minor 255, module->ioctl failed, error -22