Please note that neither installing a kernel upgrade nor drivers from officially unsupported repositories is recommended! Follow these instructions at your own risk and only if you know what you're doing!
If you installed an kernel that's ahead of current official Ubuntu repositories (e.g. kernel 3.4 or 3.5) you might not succeed with simply reinstalling nvidia drivers.
The only way I found so far to get nvidia-drivers to work again is by adding the following ppa to your repositories. In a terminal type:
sudo add-apt-repository ppa:xorg-edgers/ppa
After that, do a sudo apt-get update
and sudo apt-get install nvidia-current
.
That should do the trick. If not, run an additional sudo apt-get upgrade
.