INSTALLING CUDA 9.0 ON UBUNTU 16.04 WITH NVIDIA GEFORCE 1080

I have spent countless hours trying to install CUDA on my old computer with Geforce 8800 GT with Ubuntu 16.04 – and according the matching google hits, several others also have problems.

But my main conclusion is, for NVIDIA Geforce 8800 GT:

  • Only works with the Nvidia 340 driver
  • Does not work with higher CUDA version than 6.5
  • Do NOT install OPENGL drivers on Ubunty, it will destroy your graphical boot up, and it is so much hazzle getting it to work, that you’d rather install Ubuntu again. Which I have done – like 15 times…

Of all the tutorials and forum posts I have found, this is the only one actually working:

https://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/

But I had to modifiy it for my use, and that is the tutorial below.

Installing CUDA 8.0 on clean install Ubuntu 16.04 with NVIDIA Geforce 8800GT

Install build essentials and do an update.

Download 64-bit Ubuntu driver cuda_6.5.14_linux_64.run from NVIDIA.

Open up a terminal (CTRL+SHIFT+T) and check if the downloaded file cuda_6.5.14_linux_64.run is executable, it should be green.

If it is white, it’s not executable, and you have to run:

You can now extract the separate installers via:

Download NVIDIA-Linux-x86_64-340.104 instead of the default nvidia-304.29 that comes with the toolkit from here: http://www.nvidia.com/Download/driverResults.aspx/123703/en-us

Completely uninstall anything in the Ubuntu repositories with nvidia-* A purge will completely uninstall programs and configuration.

No need to create an xorg.conf file. If you have one, remove it (assuming you have a fresh OS install).

Create theblacklist-nouveau.conf file

Add these two lines:


Then do:

Reboot computer. Nothing should have changed in loading up menu. You should be taken to the login screen. Once there type: Ctrl + Alt + F1, and login to your user. Keep the next commands handy in another machine since now you are in tty.

In tty:

The top line is a necessary step for installing the driver. Then do

Direct quote from Abhijeet Kislay, and this is what makes the differense from ALL other tutorials and forum posts I have seen!

I cannot stress how important is the opengl flag in the above command. If you miss that, either you will get stuck in “login loop” or your computer would boot with a black screen at all times.

If you get a problem with the driver saying X is running, do this, and try again:

Install the toolkit

Set Environment path variables in .bashrc

Verify the driver version

Answer will be something like this

Check CUDA driver version:

Answer

At this point you can switch the lightdm back on again by doing:

Fix/break the header file that doesn’t want to let us use gcc > 4.8. All we are going to do is comment out (//) the error line that drops you out of a build.

In nano press CTRL+SHIFT+_ to enter line number.

Line: 82 – comment out error //#error — unsupported GNU version! gcc 4.9 and up are not supported!

To see if we are properly done with the installation, we need to run a sample.

Something like this should show up

And now everything works perfect.

 

 

Sjekk ut:

https://github.com/xmrMiner/xmrMiner/blob/master/INSTALL.md

 

Facebook Comments