Local Tech Repair: Installing CUDA on Ubuntu 10.10

Tuesday, February 15, 2011

Installing CUDA on Ubuntu 10.10

When I first tried to install CUDA on ubuntu 10.10 i didn't really know how to. So I figured I will help anyone else out who is having trouble with installing it. the laptop that I installed it on was
OS: Ubuntu 10.10
Kernal: Linux 2.6.35-26-generic
Graphics: nvidia 9800m GT

things that i needed was the nvidia proprietary driver from their website 


this is not the same as the ones in the package manager. 
then I got the CUBA Toolkit 
and put them in a location you can get to them like / 

if need be do "sudo nautilus" this will bring up a root level folder so that you can copy and past them to the / directory

step 1
sudo apt-get purge nvidia-* 
step 2
sudo gedit /etc/modprobe.d/nvidia-graphics-drivers.conf
then add
blacklist vga16fb
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidiafb

Step 3
Step 4
boot into recovery mode
Step 5
select drop to shell (should be on the bottom)
telinit 3
login to your admin account
sudo -i
then cd to /
now to run the dev drivers .run files first remember to put ./ before the name
go through the commands it may tell you it needs to uninstall things or add things and you can let it do that.
after it installs
then run the CUDA toolkit
after that just reboot by typing
and start normally
login and then go to terminal and type
nvcc -V

also I would suggest reading through their start guide as it may cover new things that i did not.

*edit update 03/23/2011*
I also wanted to let you guys know that you should keep the nvidia drivers that you downloaded because you will need to reinstall it for each new kernal that you install on your computer. for instance when you update ubuntus and you download a new kernal and try to load that kernal it will just drop to shell and allow you to login but you will need to install the drivers before you can start the gui version of ubuntu.
by typing startx after you installed it.

just a heads up.