Hi,

As many of you I also had big problems installing the nVidia driver in Ubuntu, I use 8.0.4.2 but this might (!!) also work with other versions of Ubuntu.
I tried it all:
several threads in this forum saying use CTRL-ALT-F1, shut down the X server, install the driver and start the xserver
I used Envyng (also from outside the graphical desktop) to get it done, but nothing worked. The best I could get was a 800*600 display mode, sometimes 640*480 and most of the time a screen which was divided into two parts.
On the top was a green area, below it a black area and then the desktop would start. Horizontally this desktop was divided into two areas again, making the left side of the desktop appear in the middle of the monitor. Moving the mouse to the right side and of the screen, it would appear back on screen on the left side, where the right side of the desktop was placed. It was totally out of sync.

I went to the nVidia site and found this:

Goto: http://www.nvidia.com/Download/index.aspx?lang=en-us
Choose the right type, series and product and click on search
It will come back with the latest stable version 180.22 (Jan.30)
Step 1: Read the license
Step 2: Download the file (and remember where you put it)
Step 3: Now it gets interesting. Before trying to install the driver read and check the following info which I found in a forum-thread on the nvidia site:
http://www.nvnews.net/vbulletin/showthread.php?t=72490


Debian GNU/Linux or [K]Ubuntu with Xorg 7.x

If you wish to install the NVIDIA Linux graphics driver on a Debian GNU/Linux or Ubuntu system that ships with Xorg 7.x, please ensure that your system meets the following requirements:

* development tools like make and gcc are installed
* the linux-headers package matching the installed Linux kernel is installed
* the pkg-config and xserver-xorg-dev packages are installed
* the nvidia-glx package has been uninstalled with the --purge option and the files /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel do not exist
color=blue]I used Synaptic to uninstall all I could find with the name nvidia and glx in it with the option: Mark for complete removal.[/color]

If you use Ubuntu, please also ensure that the linux-restricted-modules or linux-restricted-modules-common packages have been uninstalled. Alternatively, you can edit the /etc/default/linux-restricted-modules or /etc/default/linux-restricted-modules-common configuration file and disable the NVIDIA linux-restricted kernel modules (nvidia, nvidia_legacy) via:

DISABLED_MODULES="nv nvidia_new"

What they say is: add the above line into the file /etc/default/linux-restricted-modules

Additionally, delete the following file if it exists:

/lib/linux-restricted-modules/.nvidia_new_installed

Please note: unfortunately, it has become difficult to keep track of the pre-/post-installation steps required for [K]Ubuntu, and the above instructions may be incomplete. If in doubt, it is recommended that you use your distributor's NVIDIA Linux graphics driver packages, exclusively.
If you require further assistance after following the instructions above, please see:
http://www.nvnews.net/vbulletin/showthread.php?t=46678.

Step 4: CTRL-ALT-F1
Log in with your username and password.
sudo /etc/init.d/gdm stop
password
cd /folder where nvidia driver is stored/
sh NV [TAB] #(name will be completed when TAB is pressed)
Accept the license.
I got a message (as always) that I do not have a precompiled kernel module available and if it is okay to get it from the nvidia website. Answer yes. But, there is no module available there so it will build a new one in your computer.
Install the 32-bit libraries also and let the program change your xorg.conf file
The driver is now installed.
Start your Xserver by:
sudo /etc/init.d/gdm start

Congratulations. You now have the latest stable version of the nVidia driver installed. It worked for me, while nothing else worked so it could also work for you.