How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
DotHaru

How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by DotHaru »

So I have been trying to install Nvidia Driver on Linux Mint 15 for the past three days with varying success. As for the driver, I'm pretty sure I was able to install the proper driver and get NVIDIA settings to work perfectly. But then when I try and run CUDA, it all just crashes and I must re-install the OS... I would love some help.

I've followed:
this tutorial both ron's method and alkadia's method from the description
http://community.linuxmint.com/tutorial/view/176

this tutorial as well
http://linuxg.net/how-to-install-nvidia-319-32-drivers-on-ubuntu-13-04-12-10-12-04-and-linux-mint-15-14-13/

as well as various others and some youtube videos.

After installing my driver, I move on to try and install CUDA as well. Sadly i can't seem to install them... EIther I'm missing files or I don't have the proper compiler
... For the CUDA I've followed the tutorial found on their download page of the CUDA driver's download page.

I'm at a loss... I have NVIDIA GTX 680 FTW in an ASUS rock motherboard. The driver I need is the 319.32 version. And I need CUDA. They hardware worked perfectly under Ubuntu 12.04 and 12.10. But I'd like to make the switch from Ubuntu as it's getting a little to... not what it used to be.

I'm fairly noob when it comes to linux, and I end up reading a TON of tutorials and forums whenever I try and do something new... but this CUDA thing has got me at a loss. ANy help will be appreciated~!!!

Thanks,
DotHaru
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
trapperjohn

Re: How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by trapperjohn »

Cuda requires the NVidia Cuda development driver... from NVidia https://developer.nvidia.com/cuda-downloads) The NVidia vanilla drivers won't help you with Cuda development.

Here's a tutorial I wrote:
[url]http://www.codeproject.com/Articles/513265/CPU-Computing-Using-CUDA-Eclipse-and-Java-with-JCu[/url]

There are a couple of more recent developments that you may be encountering, Watch the NVidia install console carefully.

#1:
One is that the NVidia developer driver needs to be compiled with the same compiler used to compile the kernel on the machine. If you see; "You appear to be compiling the NVIDIA kernel module with a compiler different from the one that was used to compile the running kernel. This may be perfectly fine, but there are cases where this can lead to unexpected behavior and system crashes.", then you will need to create a compiler alternative. Most often it is not "perfectly fine."

The last available NVidia version (that I downloaded) for the drivers was compiled with 4.6, so it fails to install on a machine that is using g++/gcc > 4.6. Hopefully this is soon to be changed, so any reader should check first. One good way to test is to try installing the driver and see if a compiler version error occurs. There may be other types of errors, so watch for the compiler 4.6/4.7 double speak in the console during the driver install. If you see it we can fix it.

Before you can create a gcc-4.6 alternative, you need to install gcc-4.6. But this isn't enough. We need to instruct our machine to use 4.6. This is done with "alternatives." After you install 4.6 there won't be any alternatives. running the following will fail:
sudo update-alternatives --config gcc

You will be told that there no alternatives. We need to make them. (If you browse to /var/lib/dpkg/alternatives you will see that there are alternatives for other things, but gcc won't be in there. In /usr/bin you will see both gcc-4.6 and gcc-4.7.)

run:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20

Now, when you run
sudo update-alternatives --config gcc

you get a choice.

I usually do this with g++ as well. You can install g++-4.6 and g++-4.7 from Synaptic, then run:

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20

Last time I installed the driver, I set both gcc and g++ to 4.6. Later, I change the alternatives back to 4.7 with update alternatives.

#2:
The nouveau driver is increasingly difficult to hack off the machine. It used to be that the NVidia Developer driver could do this on its own. Recently I have had to modify grub to bring about the desired effect. On my machine grub is configured in /etc/default/grub. I change the line that reads "GRUB_CMDLINE_LINUX_DEFAULT......" to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.modeset=0 (note: there are other variants of this syntax that work (GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 quiet splash"... in some cases better than this one. There also appear to be other places where the grub config template is storred on certain distributions. One way or the other, nouveau is one persistent nag that fouls the installation of the developer driver. You need to kill it, at its birth, when the system boots.)

After this, I run
sudo update-grub

After a sucessful driver install, at boot, you will see a short NVidia flash screen. If you see this, then you are ready to move on to the toolkit and samples. In the article, pay particlar attention to the section headed by Save time and frustration.
Arny006

Re: How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by Arny006 »

sorry to put myself in the discussion but is not a easier way to install driver and cuda like:

Code: Select all

sudo add-apt-repository -y ppa:ubuntu-x-swat/x-updates && sudo apt-get -y update && sudo apt-get -y install nvidia-current nvidia-settings
after repository is added you can install all additional cuda-tools, development, etc.
robert3353

Re: How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by robert3353 »

Arny006 wrote:sorry to put myself in the discussion but is not a easier way to install driver and cuda like:

Code: Select all

sudo add-apt-repository -y ppa:ubuntu-x-swat/x-updates && sudo apt-get -y update && sudo apt-get -y install nvidia-current nvidia-settings
after repository is added you can install all additional cuda-tools, development, etc.
I just used your method for installing Nvidia drivers, I opened a root terminal and cut and pasted your provided string and hit enter. What a piece of cake!!! Couldn't have been easier, after the installer did its thing I rebooted my laptop and during the boot process I was happly presented with with the Nvidia splash screen which told me that the Nvidia drivers were installed. This is great because I am an avid gamer and I just finished installing Steam on my new install of Linux Mint KDE 64 v15 and am in the process of downloading several games. I was pleasantly surprised to discover that all the games that I own on the Windows version of Steam that are also avaiable for Linux were already in my Steam Library waiting to be downloaded, I thought that I might have to re purchase them for Linux. Thanks for such a simple method of getting the Nvidia drivers installed.
trapperjohn

Re: How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by trapperjohn »

Hi folks,

My understanding of the original post was that it pertained to how to install the NVidia Development Driver for Cuda development. This driver is necessary to write Cuda applications, some of which may be games, math applications, etc.

The NVidia Development driver is not required to run applications that have been developed for Cuda-enabled NVidia gpus. In this case, the user only needs nvidia-current and nvidia-settings.
cypherzero

Re: How do I install Nvidia drivers + CUDA in Mint 15 KDE?

Post by cypherzero »

Thanks for posting up that single command line to install the NVidia drivers. Now I'm able to run Google Sketchup in Linux Mint 15! :D Now I can be Windows free!
Locked

Return to “Software & Applications”