I downloaded Nvidia driver from Nvidia's website. I set up it under kernel 3.11.0-17. Every thing was almost perfect for me. It was even working after update to kernel 3.11.0-18. However I wanted to clear the old kernel, so I uninstalled kernel 3.11.0.17.

Ubuntu just went to command line after boot screen, then I typed sudo depmod -a, after rebooting things are back. However, command line screen came again at the next restart. So now I need to keep calling sudo depmod -a and restarting again and again. How do I get over this?