I'm trying to get CUDA working on Ubuntu. I can install any flavor and version, but have begun with Ubuntu 12.04 because I can't get the network set up with 11.04.

This question is similar: No Cuda in Ubuntu 12.04? and links to https://sn0v.wordpress.com/2012/05/11/installing-cuda-on-ubuntu-12-04/ but that blog post appears... incomplete. The author mentions in the comments below that his instructions above don't work.

Here is what I have done:

0) Installed Ubuntu 12.04 64-bit on ASUS N56V with Nvidia GT 650M

1) According to the official Ubuntu docs here https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia I should have "Additional Drivers" available, but I do not have any.

2) According to http://www.nvidia.com/content/cuda/cuda-downloads.html this OS version is not yet support.

3) How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics? says CUDA will work. Bumblebee is needed to display with OpenGL. Follow the instructions in step 4) to install Bumblebee

4) Try to follow the instructions here, which suggest using Bumblebee: Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia

optirun firefox & # HARD REBOOT :(

It doesn't reboot if glxspheres has been run once...

5) Back to (3) How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics?

Get the 11.04 CUDA code (Toolkit and SDK, NOT driver) from http://www.nvidia.com/content/cuda/cuda-downloads.html

wget "http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_64_ubuntu11.04.run"
wget "http://developer.download.nvidia.com/compute/cuda/4_2/rel/sdk/gpucomputingsdk_4.2.9_linux.run"


sudo sh ./cudatoolkit_4.2.9_linux_64_ubuntu11.04.run

Then add the following two lines to .bashrc

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda/bin:$PATH


sh gpucomputingsdk_4.2.9_linux.run # don't run under sudo

cd ~/NVIDIA_GPU_Computing_SDK/C
LINKFLAGS=-L/usr/lib/nvidia-current make -j

Lots of link errors...

6) Lets try PCL, the reason for all of this...

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all

sudo apt-get install libboost-dev libboost-mpi-dev libeigen3-dev  libflann-dev  libvtk5-dev  libqhull-dev openni-dev sphinxbase-utils libsphinxbase-dev libsphinxbase1  cmake cmake-curses-gui libvtk5-qt4-dev libegl1-mesa libegl1-mesa-dev libegl1-mesa-drivers libgl1-mesa-glx libglew1.6-dev libglu1-mesa libglu1-mesa-dev

svn co http://svn.pointclouds.org/pcl/trunk pcl-trunk
cd pcl-trunk; mkdir build; cd build
make kinfu_app -j8

Error: CUDA driver version is insufficient for CUDA runtime version /home/user/pcl-trunk/gpu/containers/src/initialization.cpp:76


I also have an Asus N56vz with Nvidia GT 650M. I got it running without problems with the first approach you tried, i.e. install ubuntu 12.04, add x-swat repository, apt-get update, and then install bumblebee. Optirun works fine after that.

I also installed the current CUDA toolkit and sdk without any special tricks and everything works fine (including building pcl-trunk).

Another problem I had with that setup: the Kinect (you probably want to use with pcl) doesn't support USB 3.0 with the current kernel of Ubuntu 12.04. Updating to the current kernel of Ubuntu 12.10 solved that issue.

| improve this answer | |

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.