Ubuntu 11.10 nvidia module failed to load (no module exists)

An old question, but still without answer - hope this helps someone.

Make sure you have headers for your kernel installed - without this one, you will not be able to build nvidia module.

sudo apt-get install linux-headers-`uname -r`

Then, run

sudo dpkg-reconfigure nvidia-current

After all, run

sudo nvidia-xconfig

or restore your original xorg.conf.


Updating the headers of the kernel did the trick! I had tried to run sudo nvidia-xconfig without luck but a fresh install of nvidia plus updating the headers fixed the generation of the file. See commands for a fresh update below:

sudo apt-get --purge remove nvdia-*  

sudo apt-get install nvidia-current