Problem Installing CUDA on Ubuntu 10.04

Hi all,

I am trying to upgrade to the 3.2 version of CUDA but having a familiar problem:

$ ./deviceQuery

./deviceQuery Starting...

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

cudaGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.


Press <Enter> to Quit...


I know it’s a common problem, and maybe the solution is obvious, but even after trolling this site and google for hours, I can’t solve it. So I’m sorry, but I’m making one more post on this subject. Here is what I’ve done:

First, I verify that CUDA is 3.2 and driver 260.19.26:

$ nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2010 NVIDIA Corporation

Built on Wed_Nov__3_16:16:57_PDT_2010

Cuda compilation tools, release 3.2, V0.2.1221

$ cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module  260.19.26  Mon Nov 29 00:53:44 PST 2010

GCC version:  gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

Now, I’m following the “CUDA - Getting Started with Linux” document. I am reasonably satisfied that the driver and tools are installed. I run make and everything compiles (albeit with many warnings). However, as shown above, when I run “deviceQuery” I get a bad result.

I am running Ubuntu 10.04 in 64-bit. I can see my card in lspci. Also I’ve already modified my .bash_profile to have LD_LIBRARY_PATH. And, I can see the files I expect in /dev:

$ uname -m && cat /etc/*release 






$ lspci

....... <omitted lines> ........

01:00.0 VGA compatible controller: nVidia Corporation G84 [Quadro FX 570] (rev a1)

$ cat ~/.bash_profile

# NVIDIA told me to add these variables

export PATH=$PATH:~/bin:~/usr/bin:/usr/local/cuda/bin

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

$ ls -l /dev/nvid*

crw-rw---- 1 root video 195,   0 2011-02-05 12:26 /dev/nvidia0

crw-rw---- 1 root video 195, 255 2011-02-05 12:26 /dev/nvidiactl

I can’t find anything else to try! Please, someone advise.

Thanks in advance!

I’m currently running Ubuntu 10.04, CUDA 3.2 with the 260.19.26 display drivers – the same as you.

Re-installing everything should fix this, but…

When I had this issue, from what I recall, I fixed it by simply (cleanly) re-installing the display drivers.

How are you installing them?

On Ubuntu, best way, I’ve found, is to:

  1. Kill X. [ Ctrl+Alt+F5 ]

  2. Ensure X is dead [ sudo service gdm status ]

    2.5 If it’s not, kill it again! [ sudo service gdm stop ]

  3. Install drivers [ sudo sh .sh ]

  4. Reboot [ sudo reboot ]

Let us know how it goes. Good luck!