Tuesday, June 2, 2015

Ubuntu 14.04: Install NVIDIA driver

http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.0-ubuntu


sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get install nvidia-364


If ./devicequery runs only with sudo:

Try executing:
1) modprobe nvidia (or nvidia-331, or nvidia-current, whatever the name of the module is)
and run ./deviceQuery ... does it work now?

2) sudo nvidia-smi
and run ./deviceQuery ... does it work now?

3) sudo ./deviceQuery
does it work now?

or

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


http://gerfficient.com/2014/08/13/nvidia-on-ubuntu-14-04-lts/

http://labs.beatcraft.com/en/index.php?CUDA6.5%2FUbuntu14.04


To fix:  /usr/local/lib/libcudnn.so.6.5 is not a symbolic link

rename /usr/local/lib/libcudnn.so.6.5, because the symbolic link of that lib has been defined in the /usr/local/cuda-6.5/lib64, so there a duplication occurs in /user/local/lib


Cannot load libcuda...

http://stackoverflow.com/questions/10808958/why-cant-libcudart-so-4-be-found-when-compiling-the-cuda-samples-under-ubuntu

try:
32-bit: sudo ldconfig /usr/local/cuda/lib
64-bit: sudo ldconfig /usr/local/cuda/lib64

or

create a nvidia_settings.conf file in /etc/ld.so.conf.d/ and add the path to the libs in the file nvidia_settings.conf
 /usr/local/cuda/lib64
 /usr/local/cuda/lib
Now to update the changes run the following command:
sudo ldconfig

2 comments:

  1. http://stackoverflow.com/questions/32408264/how-can-i-compile-a-cuda-application-that-targets-both-kepler-and-maxwell-archit

    ReplyDelete
  2. http://askubuntu.com/questions/731990/gpu-manager-overwrites-xorg-conf

    ReplyDelete