Driver incompatibility(?) on Ubuntu 11.04

I just installed the developer driver for CUDA 4.1 (285.05.33) on a fresh install of Ubuntu 11.04, which is listed as the officially supported version. I then rebooted and found my computer was mostly dead. More specifically, X can’t start, saying there’s an API mismatch between the NVIDIA kernel module and the NVIDIA driver.

What do I need to do to bring my computer back to life?


Have you an Nvidia card with optimus technology?

I’ve spent 2 days of my life trying trying to install this driver and it was a failure.

to restart X to a working configuration you should:

press ctrl+alt+F1
go to sudo /etc/X11
and here sudo rm xorg.conf and sudo mv xorg.conf.backup xorg.conf
reboot with sudo reboot

this worked for me!



I have optimus on a laptop with Ubuntu 11.10. I installed bumblebee for the optimus and then I installed the toolkit and the example. You need gcc-4.4 and g+±4.4. Also ther are some symbolic links you need to take care.

I got inspired by this post I wrote my experience at the end, but if you install bumblebee you do not need the nvidia driver. Also you have to have the nouveau drivers uninstalled and black-listed.

How can I have the nouveau drivers uninstalled and black-listed?

thanks :)

Sorry to tell you this but a simple search on google will give you a fast answer. The isntruction should be in the tutorial for installing bumblebee.

My GPU is a GTX 580. It’s in a desktop, not a laptop.

There is no xorg.conf.backup. The NVIDIA installer claimed it was making a backup of xorg.conf, but I’ve been unable to find it anywhere.

I have not installed Bumblebee.


Unfortunately it is really tedious, I reinstall Ubuntu 6-8 times before I figured out how to do it. With bumblebee you get the to run the cuda programs like you would run the games with optimus and it has a nvidia driver compatible with cudatoolkit 4.1. I do no see other way because of the way the optimus works.

If you have grub, add to the line from which you boot, ’ text nomodeset ', it will bring you to text mode without X. Then uninstall the current nvidia driver (probably some different driver was installed upon Ubuntu installation) and install the current 4.1 again.

Hi, I’ve tryed to follow this instructions, all seems to work correctly … but when I try to compile an SDK code (e.g. deviceQuery) it turns out “/usr/bin/ld: cannot find -lcuda”

in a PC where CUDA works, in the folder /usr/lib, i have the files, and, but in the PC with optimus i haven’t these files.

I managed to bring my computer back to life with

sudo apt-get remove nvidia-current
sudo apt-get install nvidia-current

But I can’t run CUDA programs. (I can’t even compile them, because the OpenGL headers don’t seem to have been installed. My research indicates those are supposed to come with the video driver?)

As far as I can tell (and I could easily be wrong about this), the problem is that the video driver and the CUDA developer driver need to be compatible with each other. And they aren’t. The video driver installed by apt-get is 270.41.06. If I go to the NVIDIA website (, it offers a newer driver: 295.20. But if I go to the CUDA 4.1 download page (, the developer drivers have still a different version number, which is incompatible with both of the above: 285.05.33. This is despite the fact that it claims to work with Ubuntu 11.04.

What set of drivers do I actually need to install to get CUDA working?


Install the driver from

Yes, I did. That’s the one that killed my computer. See my first post.


Remove the Ubuntu nvidia-current package, install the development driver.

you have to make a symbolic link with the command ln from to and have the path added to your $LD_LIBRARY_PATH

Uninstall the ubuntu driver as well, then go to this page and follow the instrutions After you finish install cudatoolkit and the gcc-4.4 compiler and make the symbolic links gcc-4.4 --> gcc and g++4.4–>g++. Now try a cuda program you know it works.

I have a laptop with optimus and I can run cuda programs.

I first removed the existing driver:

sudo apt-get remove nvidia-current

Then I ran the CUDA 4.1 driver installer (285.05.33). Part way through installing, it gave me a long string of error messages about “Cannot create file” and “Cannot restore file”. The files all seemed to relate to the earlier driver (270.41.06). I held down the enter key, and eventually the error messages stopped appearing. It then claimed to have successfully installed the driver.

I rebooted. It got as far as the point where X starts up, and then the screen filled with garbage. It appears to be completely frozen. For example, ctrl-alt-f2 does nothing.

Any suggestions? (I can still boot into recovery mode, so I can at least get to a command prompt.)


remove all nvidi from the sytem. something like sudo apt-get purge nvidua*

then do this:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

sudo apt-get update

sudo apt-get upgrade

then :

Open the grub config file

sudo gedit /etc/default/grub

Find this line


Insert pcie_aspm=force inside the quotes so it looks like this

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pcie_aspm=force”

Update grub to make the changes

sudo update-grub


sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee

sudo usermod -a -G bumblebee USERNAME

install the cudaltoolkit


install gcc-4.4 and g+±4.4 and make links gcc-4.4 to gcc and g+±4.4 to g++.


compile your favourite program and try to run with optirun ./cuda_program

If these instructions are unsuccessful then , we can try step by step.

I don’t think those instructions apply to me. Like I said, I have a desktop, not a laptop, it isn’t an optimus GPU, and I’m not using Bumblebee.


Sorry. My mistake. Please tell here your exact configuration. Better to start form the beginning uin order to know what is wrong.

It’s a desktop (Dell XPS) with a GTX 580. I installed Ubuntu 11.04 from the live CD, telling it to reformat the partition. After installing, I ran software update to make sure everything was up to date, then installed the NVIDIA driver and CUDA toolkit from the CUDA 4.1 download page. I rebooted, and found that X was dead. It was at that point that I posted here. I had installed no other software on the system: it was a completely clean install.


One of my coworkers managed to get it working. The actual problem was a conflict between the NVIDIA driver and the Nouveau driver which apparently is preinstalled on Ubuntu. He managed to disable Nouveau - I’m not sure of the details of precisely how - and now it works.

This is pretty clearly a bug in the NVIDIA installer. It was run on a completely clean installation of the precise version of Ubuntu it’s advertised to work with, so there’s no legitimate reason for it to conflict with anything.