Installing Ubuntu 12.04 (Precise Pangolin) on a ThinkPad X220

Update: In October 2012 I upgraded to 12.10. Update: In May 2013 I upgraded to 13.04. This resulted in hangs on reboot. These were eliminated when I installed the latest kernel from the raring-proposed repo. See also Updates below.

This is the same machine on which I previously installed Ubuntu 11.04.
For this LTS release I decided to do a clean install rather than an upgrade from 11.10.

With every release of Ubuntu, more and more aspects of the system work correctly without any manual intervention.
Here is a summary of what I nevertheless had to do to get the machine back to the way I like it.

Associate my bluetooth HIDs

Adjust display layout

Problem: With some layouts the machine hangs! Will look into this.

Adjust touchpad

Switch to two-finger scrolling

Disable mouse clicks

Install compizconfig-settings-manager and run ccsm:

Assign the Resize Windows function to Alt-Button3 which is easier than the default, Alt-Button2. Update: The upgrade to Ubuntu 12.10 reverted this setting to the default, so I had to set it again.

Enable terminal bell:

Run gconf-editor and use it to change desktop | gnome | peripherals | keyboard | bell_mode from "off" to "on". Update: This is not necessary or possible in Ubuntu 13.10.

(Without this, every program I run after executing any command with sudo also effectively has full root privileges. This is ungood. If I want to run a sequence of commands as root without having to authenticate every time I'll just do "sudo su" to start a root shell!)

Micmute: The thinkpad-acpi module and kernel generate an ACPI event (ibm/hotkey HKEY 00000080 0000101b) for the microphone mute button but in releases earlier than precise this is not mapped to anything; in precise it is mapped to 256 which is also greater than 255, the highest that X can handle. Bug reported here.

The fault lies with X which can't handle key codes above 255. But as discussed, e.g., here, it may be a long time before this gets fixed in X.

In Precise updates as of October 2013 a workaround has been implemented for micmute: this key is now treated as if it were F20.
This will supposedly be fixed for Ubuntu 13.10 (Saucy) too.