Note: For hints for building nouveau on Ubuntu, see UbuntuTips
Warning
Nvidia's proprietary libglx module is incompatible to the standard libglx module which is needed for free and open-source drivers such as nouveau.
Therefore, attempting to install the Ubuntu nouveau package will remove the nvidia-glx-* package from the system, making your installation of the proprietary nVidia driver unusable.
You'll have to reinstall it using apt-get in case you want to the proprietary nVidia driver is a requirement for this. If you are using the Ubuntu packages the xserver-xorg-video-nouveau package will automatically remove the nvidia-glx-* package when it is installed and the nvidia-glx packages will automatically remove the nouveau package when it is installed. You may wish to remove it manually using the restricted manager and then restart.
If you installed the nVidia driver (as downloaded from nvidia.com) manually, this will break your nVidia driver install, and it will need to be reinstalled if you wish to use it again. In that case, ensure that you have a working proprietary nVidia driver installation (e.g. NVIDIA-Linux-x86-190.53-pkg1.run) on your machine(s) before you attempt to install nouveau, because for downloading it from nvidia.com, you need a working JavaScript-capable browser, and re-downloading will be hairy if you are not able to start X because of a broken xorg server installation.
Packages in Ubuntu archive
From Jaunty onwards there are nouveau packages in the Universe archive. Just install xserver-xorg-video-nouveau. These are built for all architectures supported by Ubuntu, but are not neccesarily up to date. For example, the nouveau package for Ubuntu 9.04 is dated from the month of the 9.04 release, April 2009. More up to date packages are available for x86 and amd64 in the xorg-edgers PPA.
Packages and Live-ISO images for Ubuntu 9.10 and newer in the xorg-edgers PPA archive
https://edge.launchpad.net/~xorg-edgers/+archive/nouveau
Add the PPA to your apt sources, update the package lists, and install the xserver-xorg-video-nouveau package.
sudo add-apt-repository ppa:xorg-edgers/nouveau sudo aptitude update && sudo aptitude install xserver-xorg-video-nouveau
As of the 15th January 2010, this contains nouveau git code from late November/early December 2009, which is rather recent.
Building the xorg-edgers PPA packages from source yourself
The xorg-edgers PPA currently provides only packages for x86 and x86-64, although nouveau is known to run on (at least) PPC.
The PPA also does not provide packages from Ubuntu 9.04 and older because they do not include and xorg-server package oversion 1.7.0 which is required for recent nouveau code.
To rebuild the xorg-edgers PPA yourself, you can add the deb and deb-src lines from the PPA, then build the source packages.
To add the xorg-edgers PPA to your apt repositories (also possible if you run older Ubuntu versions like 9.04), run:
echo ' deb http://ppa.launchpad.net/xorg-edgers/nouveau/ubuntu karmic main deb-src http://ppa.launchpad.net/xorg-edgers/nouveau/ubuntu karmic main ' >>/etc/apt/sources.list.d/nouveau-xorg-edgers-ppa.list apt-get update
Note: You can ignore a possible key signature warning triggered by the xorg-edgers PPA at the end of apt-get update.
Then, to get and compile the sources from the PPA, run:
sudo apt-get install fakeroot sudo apt-get build-dep libdrm2 apt-get -b source libdrm2 sudo dpkg --install <binary packages built by previous command> apt-get install module-assistant sudo m-a a-i drm-modules sudo apt-get build-dep xserver-xorg-video-nouveau apt-get -b source xserver-xorg-video-nouveau sudo dpkg --install <binary package built by previous command>
Xorg.config
You will then need to select the nouveau driver in your /etc/X11/xorg.conf file. Enter it manually like this:
Section "Device"
...
driver "nouveau"
EndSection
Uninstalling
Reverting back to the proprietary nVidia drivers should be as simple as reinstalling the appropriate nvidia-glx{,-new,-legacy} package, reverting the xorg.conf change and uninstalling the nouveau packages e.g. (found using dpkg -l|grep nouveau) using dpkg -P. This will leave a git snapshot package of libdrm2 on your system, but that shouldn't cause problems. To revert completely, remove the PPA from your apt sources and downgrade the libdrm2 (and possibly libdrm-dev) package.

