Why is it so hard to install CUDA on linux

Hi All,

I recently switched from Windows to Ubuntu and everything is going well except for CUDA. I have tried time and time again to install this thing but it is absolutely frustrating! I am not trying to be rude but I just find it unfair that with Windows there is a seamless installation process but when it comes to Ubuntu it’s simply a joke.

I have read blog after blog with no successful answer as to how to install it on ubuntu 12.04. It would be great if the Nvidia engineers made the process a bit more easier on the Linux community.

Again I am not trying to be rude but its just so frustrating.

Thanks,
Sachin

It is more the fault of linux than the fault of Nvidia. The kernels are changing so fast it is not easy to keep pace with it. The safest option is not to update kernel or distribution until it is sure ever thing will work. Optimus laptops do not make it easier. I have an optimus laptop with Ubuntu 12.04 and I can use cuda. Post here your configuration and maybe we can figure out what went wrong.

You have optimus laptop and CUDA working Linux? Wow!

What laptop model do you have and how you managed that?

I tried my private Asus K53SV and work Dell XPS15 force to work CUDA with optimus and I failed twice. (using Ubuntu 11.04 on Asus and Fedora 16 on Dell)

if you want to use CUDA on ubuntu, do a favour to yourself, throw in the wc 12.04 version and all other version with unity and install 10.04… i’m actually working with ubuntu 10.04 and slackware 13.37 and have no problem… whrn i installed CUDA on ubuntu i follow the linux install guide of nvidia and every thing went well… supported versions are 10.04 and 11.04, but i HATE a lot unity, so 10.04 is the way… of course if you must use a recent version like 12.04, as pasoleatis, it is not fault on nvidia if canonical change so fast the kernel… (i use a desktop, so what kind of problem bring the optimus tecnoly with cuda and linux?)

On gentoo, installing cuda is trivial:

emerge nvidia-cuda-toolkit nvidia-drivers

Sorry :) Couldn’t resist!

I can’t comment on ubuntu or FC, but we run RHEL / CentOS on production servers. On these, installing CUDA is also fairly simple.

# download toolkit and drivers

sudo bash drivers.run  # and follow onscreen prompts

sudo bash toolkit.run  # and follow onscreen prompts

With the only caveat being that you need to re-install the drivers every time you get a kernel upgrade.

I have laptop with optimus and CUDA! It is Acer 4830tg with 540m and an intel SandyBridge cpu. I use Ubuntu 12.04. It was not the easiest installation but eventually I got it. I do not know the exact configuration of your laptops/pcs so I do know if this advices will work for :

I did a fresh installation of Ubuntu 12.04, then I install bumblebee to get the optimus support (the nvidia driver gets install in the process) , then I installed the cudatoolkit. This time I was not able to compile the examples, but my programs are working without problems. The latest CUDA toolkit works with the 4.6 gcc compilers, but you have to install them as well.

I compile the programms with nvcc like usually, but I run them as a gpu program using “optirun ./a.out”

Late edit. I think that all laptops with sandy bridge cpu (i5 and i7) have optimus. So these advices should work for you.

Good luck!

Hello,

The problem with optimus is that it does not have a switch between the intel gpu and nvidia, but for costs reason most of optimus still use the intel gpu for output, even if the rendering is done by the nvidia gpu. In the BIOS there is option only for turning off nvidia, but not the intel gpu. (in the older laptops there was an option to turn off either the intel gpu or the nvidia gpu)

The kernels at this moment do not support this and it will only use the intel gpu for everything. Without the bumblebee we would not be able to use at all the nvidia card. People (me included) tried at the beginning just to install the nvidia driver hoping that it will jsut run on nvidia, but obviously this did not work and resulted in damaged X.

Dear all,

  • What about the status in 2020 ? Is this still the same problem with Ubuntu?
  • I have a GeForce 940M, evidently it should run with this optimus stuff, so I installed Bumblebee.
  • Recently, I’ve updated my Ubuntu to 16.04 LTS to solve one known issue of 14.04 LTS with Nvidia drivers.
  • Drivers got “well” installed, but
  • After installing latest Nvidia drivers, it became not possible to log in to X server any longer.
  • I took the opportunity to run optirun nvidia-detector and primusrun nvidia-detector. Error message was that bridge cannot be established with the CUDA drivers…
  • So I had to go for nvidia-uninstall, then it seems Intel GPU is still playing the main role.

Would you recommend me to install a special version of a Linux distribution where CUDA drivers are known to be more easy to handle?

Thanks for everything,
Thibault

To the benefit of Nvidia, the solution was to buy a new graphical card for desktop linux computer…