Hey all,
I am using Ubuntu 12.10 at the moment and I want to install the CUDA-Toolkit with the Developer-Driver and the CUDA-Sampels. But if i have installed the Driver from the CUDA-Toolkit Package the XServer didn’t come up again and i have a black sceen with a flashing Cursor. Then I can’t do anything. Has anyone of you the CUDA-Toolkit running with Ubuntu 12.10?
I had a similar problem installing nvidia drivers on Ubuntu 12.04. Do you have a intel sandy bridge CPU? If so, you can try creating a .conf file in /etc/modprobe.d/ and add ‘blacklist i915’ and ‘blacklist intel_agp’. I think the problem has to do with the integrated graphics module being loaded at startup instead of the nvidia module. Or something like that, I’m not really that familiar with linux.
Hey,
i don’t have a intel sandy bridge CPU, but i have a Intel Ivy CPU. Do you know the blacklist command to blacklist this Graphicalunits? Maybe?
Hello,
I have an optimus laptop with Ubuntu 12.04and the only way to use cuda was together with bumblebee and the driver from the repostory ppa:ubuntu-x-swat (http://bumblebee-project.org/install.html#Ubuntu).
You may be able to use the --optimus flag when installing. If installing the display driver separately, use the --no-opengl-files (I think that’s the flag.)
I have this exact same problem. It even prevents shell access! The only way to get to the shell is to choose the recovery option from the grub boot menu, and then root shell. But I’m not sure what to do from there since I have no idea what the cuda installer actually did (and there’s no uninstaller of course; that would be too simple).
How can I revert the cuda installer’s actions?
OK I worked out how to get out of the retarded computer-is-totally-fucked-just-by-trying-to-install-cuda situation:
- Reboot into the grub menu.
- Select “Ubuntu advanced options” or similar.
- Select the lastest “… (recovery)” option.
- Wait for it to boot and you should get a blue text-mode menu. Select “Root shell” or similar.
- Run this command: mount -o remount,rw /
- Run this command: nano /etc/modprobe.d/blacklist.conf
- Add this line at the end of the file then save (ctrl-X, ctrl-S).
blacklist nvidia_experimental_310
(note, the 310 may change at some point in the future).
-
Now reboot by running this command: shutdown -r now
-
Boot normally. It should give you your normal desktop back. The first time I did it the resolution was fucked and unity crashed, but next time it worked.
-
Go to System Settings->Software Sources->Other drivers->nvidia-current.
You should now be where you started off and can try to install again, assuming you want to risk shitty software screwing your computer up again. Stupid nVidia.
Here are a couple of guides that look promising:
http://b-feng.blogspot.co.uk/2012/10/install-cuda-5-on-ubuntu-1210.html
Ok, further information:
It is currently impossible to install the CUDA 5 SDK on Ubuntu 12.10
There are a couple of reasons:
First if you try to install will GCC-4.3, the driver installation fails with a message like “The kernel was compiled with GCC-4.7. You must use that version.”
Well ok then I’ll use GCC-4.7. The driver installation succeeds. But then the toolkit refuses to install because GCC-4.7 is an unsupported version! What. The. Fuck. nVidia.
The second reason is this: Even though the driver install successfully with GCC-4.7, and it actually works fine and even has shiny KMS and a high-res console, compiz refuses to start, so you cannot use the Ubuntu desktop.
The error is this:
Fatal: glXQueryExtensionsString is NULL for screen 0
If you Google it there are a lot of people having that error with fglrx (the AMD driver), but not much about nVidia. The only solution is to go back to the official Ubuntu drivers.
The driver options in the Ubuntu settings UI (the command is “software-properties-gtk”) are all greyed out except for “Continue using manual driver…” which sucks. So you have to install it by running “sudo apt-get install nvidia-common”.
I give up. nVidia’s Linux cuda support is shit, and installing their drivers on Linux has always been an absolutely massive pain in the arse. (Linus deserves part of the blame here for refusing to work with binary driver vendors.)
Sorry for the flurry of posts, but I decided not to give up. So it turns out that to use the CUDA 5 features you need the nVidia driver 304.54 or later.
The nvidia-current-updates is currently at 304.51, which is pretty damn annoying but I guess that that gets you at least CUDA 4 support. Maybe. Alternatively you could try nvidia-experimental-304.
You also have to symlink libglut as described in one of the links above. When you’ve done that you can run the cuda installer but DONT LET IT INSTALL THE DRIVER!
Remember to add /usr/local/cuda/lib64 to your ldconfig.
After I did all that, I built the Mandelbrot example and it finally worked! So in conclusion these are the instructions:
- sudo apt-get install nvidia-current-updates
1.5. Restart computer. - sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so
- sudo apt-get install gcc-4.4 g+±4.4
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±4.4 20
- Check version with
gcc --version
. - Switch to terminal: CTRL-ALT-F1
- sudo service lightdm stop
- chmod +x cuda…
- sudo ./cuda…
- NO I DO NOT WANT TO INSTALL YOUR BROKEN DRIVER!
- Yes install toolkit, Yes install samples.
- sudo echo “/usr/local/cuda/lib64” > /etc/ld.so.conf.d/cuda.conf
- sudo ldconfig
Wasn’t that easy? It’s a good job nobody ever needs to use the command line in modern Linux distros isn’t it…
If you thought that was hard, try doing the same thing on an Optimus enabled laptop ;) Before Bumblebee was available I broke ground and published some instructions on ubuntuforums on how to just modprobe nvidia and run CUDA code without actually loading the X driver…
But yes, it’s just what it is… NVIDIA is always at least one compiler revision behind… even on the Windows side… MSVC 2012 support has to be massaged equally and it might have to be even more massaged to get it working with APIs that depend on cmake…