after installing cuda toolkit and cuda samples via runfile installation (nvidia driver installed separately - NVIDIA binary driver - version 340.76 from nvidia-340 (open source)))

after running ./deviceQuery i have this:

./deviceQuery Starting...

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

cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL

nvidia-smi gives me this:

| NVIDIA-SMI 340.76     Driver Version: 340.76         |                       
| 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 780 Ti  Off  | 0000:01:00.0     N/A |                  N/A |
| 37%   35C    P8    N/A /  N/A |    287MiB /  3071MiB |     N/A      Default |

So the question is which nvidia driver will satisfy CUDA set?

As far as I know there is no xordg/edgers nvidia drivers for ubuntu 14.04.2 ?



I use Nvidia drivers from nvidia-331 package from official Ubuntu repository on Ubuntu 14.04.2.

Recently something changed in drivers packages and CUDA stopped working, the symptom was error 30 ("Unknown error") in first CUDA-related operation.

After some debugging I investigated that problem was with missing nvidia_uvm kernel module. Check that it is loaded:

$ lsmod | grep nvidia
nvidia_uvm             34855  0 
nvidia              10744943  84 nvidia_uvm
drm                   303102  2 nvidia

If it's not loaded, check that you have installed appropriate package, for 331 version it is nvidia-331-uvm:

sudo apt-get install nvidia-331-uvm

But this is not enough: nvidia_uvm can't be loaded in straightforward way (e.g. by running modprobe nvidia_uvm), you need to either run you program as root (once, then module will be loaded and root permissions will no longer be required), or (recommended) install nvidia-modprobe package and reboot:

sudo apt-get install nvidia-modprobe
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. – Mitch Mar 8 '15 at 11:22

After much reading up, I got CUDA 6.5 working on Ubuntu 14.04 with an NVIDIA GeForce GT525M graphics processor and an integrated Intel graphics card.

Press Ctrl+Alt+F1 to open the terminal.

sudo service lightdm stop
sudo killall Xorg

Now install the graphics driver. I had to use the nvidia 340.29 driver that comes along with the CUDA run file. If you have an integrated Intel graphics card, you must use the --no-opengl-files option.

sudo ./NVIDIA-Linux-x86_64-340.29.run --no-opengl-files

At the end of the installation, do NOT let Nvidia reconfigure Xorg config files.

After that, load the Nvidia module:

sudo modprobe nvidia

and then you can install the CUDA Toolkit and samples:

sudo ./cuda-linux64-rel-6.5.14-18749181.run
sudo ./cuda-samples-linux-6.5.14-18745345.run

Reboot and verify from the "Additional Drivers" section in Systems Settings -> Software & Updates that "Manually installed driver" is selected. Now you can build and test deviceQuery and it should work without error.

The Nvidia CUDA Getting Started Guide for Linux talks about all these in detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.