1. The order of installing the Nvidia driver and CUDA 5.0 is not important.
2. The CUDA 5.0 requires Nvidia driver 304 or later.
3. Disable Nouveau by adding
so that Nvidia driver can be actived.
4. Dependent library should be installed, such as libxmu-dev.
After I installed Nvidia driver, tty1-tty6 is not working.
When I push ctrl+alt+F1~F6, only a blinking cursor on the screen.
If I need to use tty1-tty6, I first boot to recovery mode, and then normally strat Ubuntu. From this way, tty1-tty6 can be accessible again.