Preq
Removing 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 proprietary driver 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 have 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.
Packages in PPA archive
https://launchpad.net/~raof/+archive
Add the sources.list entry specific to Gutsy or Hardy respectively. From this page you can also see what the latest version that is built for Ubuntu is.
Upgrade libdrm2, install module-assistant and run
sudo module-assistant auto-install drm-modules
or equivalently
sudo m-a a-i drm-modules
This will build and install the nouveau drm kernel module for your currently running kernel. You will need to re-run this command whenever your kernel ABI changes (installing a different kernel flavour, building a custom kernel, installing a kernel update).
You can then install the xserver-xorg-video-nouveau package.
Other Architectures
The PPA only builds packages for x86 and x86-64, although nouveau is known to run on (at least) PPC as well. Users of architectures not supported by the PPA can add the deb and deb-src lines from the PPA, and build from the source packages. Note: Install fakeroot first.
sudo apt-get build-dep libdrm2 apt-get -b source libdrm2 sudo dpkg --install <binary packages built by previous command> 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
Switching between the nouveau and nVidia proprietary drivers should be as simple as reinstalling the appropriate nvidia-glx{,-new,-legacy} package, and reverting the xorg.conf change. This will leave a git snapshot package of libdrm2 on your system, but that shouldn't cause problems. To revert completely, you would need to remove the PPA from your apt sources and downgrade the libdrm2 (and possibly libdrm-dev) package.

