successful cuda 7.0 install onto ubuntu 14.04 amd x86_64 with a GTX460

Hi All,
I’ve spent my play-time for the last week trying to set up a wondows7/ubuntu14.04 dual-boot system with Cuda on the linux side. I’m not exactly a software artiste’, so it was actually a daunting effort. I had to re-install ubuntu three times after bricking it, and rebooted countless times. So for the sake of archeologists thousands of years from now trying to understand how the primitives managed to build stone tools & mud huts, pyramids, national highway systems, and cuda installs, as well as anyone else going through my travails, here are the steps of my final and successful effort. Starting from a fresh ubuntu install:

1)Added the following lines to the .bashrc file:
export PATH=./:/usr/local/cuda-7.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH

2)Check to see that ubuntu can recognize my graphics card with this command:
lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GF104 [GeForce GTX 460] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF104 High Definition Audio Controller (rev a1)

3)Check to make sure I’ve got a c compiler:
>gcc --version
gcc (Ubunto 4.8.4-2ubuntu1~14.04) 4.8.4
4)Do a bunch of installs, not every single bit is needed for cuda but this is what I did. Some of it may be redundant, for example I think I read that glut includes glib. But some web page told me to install glut3, glib2, gtk2, that’s what I did and it didn’t not work, so there you go!

sudo apt-get install freeglut3   freeglut3-dev
sudo apt-get install libglib2.0  libglib2.0-dev
sudo apt-get install libgtk2.0   libgtk20-dev
sudo apt-get install libxmu-dev
sudo apt-get install mesa-utils
sudo apt-get install vim  
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get update

5)Turn off the nouveau graphics driver by creating the blacklist file
sudo vim /etc/modprobe.d/blacklist-nouveau
blacklist nouveau
options nouveau modeset=0
Then execute the following command, that I don’t know what it does:
sudo update-initramfs -u
At this point you need to reboot for the nouveau disable to take effect. The CPU will be driving the display directly after the reboot, so you’ll see your font get double-sized and things will be fuzzy. You can check that nouveau was shut off with this command:

lsmod | grep nouveau

6)Shut down the X server before you do the install with ctrl-alt-F1
Then use the following command to drive the point home:
sudo serice lightdm stop

7)Now do the install. I downloaded the run-file and put it on a cdrom disk because the download takes an hour and I had to go through this sequence a few times. So put the run-file somewhere convenient, like your Downloads directory. cd into that directory and

sudo sh

I said yes at all the prompts and let things default. The runfile will install graphics driver 346 and a new OpenGL installation, along with Cuda and the samples.

8)Reboot . Hopefully you are not bricked. Check for the install with these:

ls /usr/local | grep cuda
ls /usr/bin | grep nvidia

Click the gear-shapped icon at the top-right, select ‘about this computer’, and you should see your GTX card specified as the graphics system.

cd into your /NVIDIA_CUDA-7.0_Samples (in your home directory if you let the installer default) and type ‘make’. When it’s done, cd into bin/x86_64/linux/release and run ‘deviceQuery’. If you get a bunch of stats for your graphics card, you can smile and relax. Then type ‘Mandelbrot’. If you get a fractal, you’re golden.

One issue, which might be superstition on my part, that gave me trouble is the installer’s replacement of openGL with the Nvidia version. Various links are made and files are moved. It seems to me that openGL must be installed (one of the installs in step 4) before the cuda install is done, or you’ll end up with a link to a non-existent file. This happened to me about 74 times, before for no particular reason I did all those sudo apt-get installs before the cuda install and suddenly things worked.

I did not install the most recent graphics driver 352, so I’m running version 346 that came with the cuda install. I tried uninstalling 346 and then installing 352, but after reboot my screen was frozen. So I had to re-install ubuntu :^( .

Well that’s my story and I’m sticking to it. I hope you have better luck than I did. Cheers! /jd