0

I've been attempting to use caffe on my laptop and have been having problems installing the nvidia drivers (needed for the CUDA toolkit).

Unfortunately after switching to nvidia drivers in the "additional drivers" menu and rebooting, I get a black screen. I can still open the tty, however none of the solutions posted online have actually worked. (Most of them weren't even accepted by the OP too.)

Supposedly what I am supposed to do is install bumblebee, which installs fine without breaking ubuntu, but according to other threads here the proprietary nvidia drivers are needed to use cuda.

What am I doing wrong here?

  • leave away bumblebee, then you have screen back again. But do this in recovery mode of Ubuntu simply as root with: apt-get remove bumblebee - nothing more - then in recovery mode you could repair damaged files (auto-repair) and then reboot. – dschinn1001 Jul 08 '16 at 05:35
  • I actually don't have any data I care about on this installation, so my question isn't regarding saving the installation, it's simply getting it to install correctly in the first place. If it fails I can just reinstall ubuntu. However, I need to find a way for it not to fail so I can start doing CUDA stuff. – ThaHypnotoad Jul 08 '16 at 16:59
  • have you made export to the CUDA library files ? – dschinn1001 Jul 09 '16 at 18:09

3 Answers3

0

For machines with Optimus switchable graphics, the command line argument to use when installing the driver is "--no-opengl-files" (not "--no-opengl-libs"). e.g.:

sudo sh NVIDIA-Linux-x86_64-410.78.run --no-opengl-files
AusMatt
  • 11
0

Probably you forgot first before installation of nvidia-packages to export some variables to the library of CUDA.

On desktop in terminal one first needs to do:

export PATH=${PATH}:/usr/local/cuda/bin

and on 32-bit-machines this:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-current:/usr/lib32/nvidia- current

but on 64-bit-machines this:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib:/usr/local/cuda/lib64

The rest is explained here in a contribution of me, but this concerns a different package of nvidia, but in the end anyway you need above all to export as described above... :

How can I Install Nvidia Driver GT 520 and Cuda 5.0 in Ubuntu13.04?

dschinn1001
  • 3,829
  • exported these variables before installing and still got the black screen. – ThaHypnotoad Jul 10 '16 at 05:44
  • also, following your answer, running gdm start breaks both the tty and regular login. the tty flashes every couple of seconds. – ThaHypnotoad Jul 11 '16 at 00:36
  • @ThaHypnotoad - start gdm is only necessary when gnome is installed, otherwise you can leave this out. – dschinn1001 Jul 19 '16 at 19:11
  • alright. Now I have the "running in low graphics mode" error when I start up. If I press ok (I can't use my mouse to do it but can somehow use the touchscreen) it goes into a state of turning the backlight on and off once every two seconds, making the tty terminals also inoperable – ThaHypnotoad Jul 21 '16 at 05:13
  • alright so I did a clean install, this time following this guide:https://codeyarns.com/2015/09/25/how-to-install-cuda-7-5-on-ubuntu/ . It seems the issue was that I was using opengl libraries, and since my laptop has a switchable graphics card that causes serious issues. I also blacklisted nouveau properly this time, as it seems I wasn't doing it right before. (don't know what it was I was doing wrong though). – ThaHypnotoad Jul 22 '16 at 23:47
0

My issue was that I was a,) not blacklisting nouveau correctly (probably not rebooting after blacklisting. I should read the docs better.)

In addition, the main culprit was that I did not set --no-opengl-libs. Since my machine has a switchable graphics card, having the runfile install them is apparently screwy. IDK why though.