I want to try some of the new features in the btrfs filesystem, and to do that I need to use a newer kernel than is included in Ubuntu 12.04. To do that, I have installed linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb, linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb, and linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_amd64.deb from the mainline kernel download here.

However, on rebooting into the 3.4 kernel, my desktop is stuck at a very low resolution and I cannot increase it to the full. This did happen when I first installed, but a simple install of the nvidia-current package got everything working nicely with my GTX570 card. There were appear to be some DKMS errors when I installed the kernel, and they indicated I should look at /var/lib/dkms/nvidia-current/295.40/build/make.log:

Reboot into recovery mode as the drivers won't install with X running. Do this by rebooting, holding shift if necessary to get into Grub and choosing the recovery option, then "Root shell" at the text menu.

You should now be faced with a shell that looks something like this:

root@sirius:~#

Enter the following command so that the root filesystem is writable:

mount -o rw,remount /

Install a few required packages (you may need to do dhclient eth0 to bring the network up beforehand):

apt-get install dkms

Make the Nvidia installer executable and run it:

chmod +x $INSTALLER_FILE
./$INSTALLER_FILE

where $INSTALLER_FILE is the location where the installer is downloaded to (use tab-completion to help you, probably something like /home/josh/Downloads/NVIDIA-Linux-x86_64-302.17.run)