Let me just copy my answer for this (it only works with NVidia cards, basically its the way how you should install the driver perfectly.)
Well. There is a good way to install the nvidia driver correctly and the avoid problems later. Here is a great howto, step-by-step, easy-to-use.
But let me correct it out, regarding the 10.04 release !
First of all (before steps), download the "dkms" pack from the bottom of the post on the linked page, and the nvidia driver from nvidia.com into your home directory.
Step1, remove the drivers. Fix the "180" to "190" or "195" , don't sure how Ubuntu calls it at the minutre.
At step 2, edit
/etc/modprobe.d/blacklist.conf . Add 2 new entries to the end:
Then do a reboot, at the boot menu, select recovery mode. Go with the "root mode with networking" (or what, its at the bottom, you will be able to identify it, don't worry about the instructions. :))
When it boots, type your root password. Then type:
init 3 . Login again (yay).
Now, install the driver with
sudo sh ./NV* . There will be an error about "distributor provided.." don't care about it, just agree, yes yes (more, grep, fsck :)).
After it finishes, do a
sudo nvidia-xconfig . THEN, do the
sudo sh ./installdkms* part. After it finishes, you are done, reboot.
Yeah I'm aware of the howto and how its 'harder' than the "install restricted modules". However, a lot of people noticed issues , anomalies with the default driver. This way you will get the NVidia binary driver, more recent than the one Ubuntu ships, and it won't be a problem during kernel upgrades. Also, you can upgrade the driver by hand whenever you want. If you get stuck, comment, ask. (Check which part seems to be hard , check if you can find that blacklist and such before you dive in.)