How to Install an Nvidia Driver in Ubuntu
Before installing the Nvidia driver, you will need to check a couple of things. First of all, if you have previously used the Envy third party method of “translating" commands to your graphics card, these drivers will all need to be removed.
Also, you will need to remove the Nouveau driver, something which is easily done by opening Applications > Accessories > Terminal and entering:
sudo apt-get --purge remove xserver-xorg-video-nouveau
With this done, you will be ready to install the Nvidia drivers.
Browse to System > Administration > Hardware Drivers (in some versions the option is Additional Drivers) and find the listing for your Nvidia card (you might have multiple components for which restricted drivers are available). This is listed as restricted as it isn't open source - the driver is still proprietary, and as such cannot be used under the GNU or any other open source license.
Look for the option to activate the driver, and use this; you should be able to tell pretty quickly whether or not this step has been successful. Any failure here can be resolved by using the Synaptic Package Manager via System > Administration, where you should search for the Nvidia driver listed in the Hardware Drivers screen. Right-click and use the Mark for installation option, then Apply to begin the download/installation process.
Once the driver has been installed, restart your computer.
(In Ubuntu 10.04 you may need to run sudo nvidia-xconfig from the Terminal before restarting).