Installing Ubuntu 11.04 (Natty Narwhal) on a ThinkPad X220
I installed Ubuntu 11.04 (Natty Narwhal) on a ThinkPad X220, model 42902GW.
Netboot
As a source of network installation files I made use of another GNU/Linux computer on my home LAN which is connected to the Internet through a familiar ADSL-modem/gateway/router/caching nameserver/DHCP server (call it "the gateway") at address 172.19.3.1. The gateway's DHCP server issues leases in the range 172.19.3.2 to 172.19.3.100.
First I set up the "source" machine, in my case one which already also had Ubuntu 11.04 installed. It has address 172.19.3.7 (assigned to it by the gateway's DHCP server). For the X220 to boot from it the machine needs to run a DHCP server and a TFTP server. The DHCP server serves only this special purpose since, as I mentioned, the gateway is the network's main DHCP server. The source's DHCP server must be so configured that it doesn't conflict with the existing DHCP server.
Install the isc-dhcp-server package and edit /etc/dhcp/dhcpd.conf using the following as a model. I am not sure that every line is needed, but this worked for me.
ddns-update-style none; option domain-name-servers 172.19.3.1; # This is the address of my gateway option routers 172.19.3.1; # This is the address of my gateway option subnet-mask 255.255.0.0; # This is the netmask of my home network default-lease-time 600; max-lease-time 7200; allow booting; allow bootp; subnet 172.19.3.0 netmask 255.255.255.0 { range 172.19.3.220 172.19.3.229; # This is a range separate from the one used by the gateway and includes the address below } group { next-server 172.19.3.7; # This is the address of the "source" host trawsfynydd { # 'trawsfynydd' is the name I chose for my X220 hardware ethernet f0:de:f1:6b:22:bf; # This is the Ethernet address of the X220 fixed-address 172.19.3.220; # This is an address in the range as defined above filename "/pxelinux.0"; } }
Now install the tftpd-hpa package, download the network installation tarball and untar it into the location whence tftpd serves files.
$ cd /tmp $ wget http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/netboot.tar.gz $ cd /var/lib/tftpboot $ sudo tar zxf /tmp/netboot.tar.gz
Second set up the X220 for PXE (Pre-boot eXecution Environment).
- Switch on the X220 and press F1. ThinkPad Setup starts.
- Set Config | Network | Ethernet LAN Option ROM to "Enabled".
- Select Startup | Boot; select "PCI LAN IBA GE Slot..." and use the [+] key to move it to the top of the boot priority order
- Press F10 to save and exit.
Voilà, the X220 boots the Ubuntu installer.
Installation
I won't describe the Ubuntu installer. I'll just mention some little problems I had.
First, when it came time to resize the existing (ntfs) partition the partitioner asked what size I would like for "this partition". Did it mean the to-be-resized ntfs partition or the new ext4 partition?
Turns out it meant: the to-be-resized ntfs partition, so the suggested "max" selection was the opposite of what I wanted.
Second, when I selected (only) the "Ubuntu desktop" task the installation reported failure without explaining what had gone wrong.
I de-selected all tasks and the installation succeeded.
Third, after reboot the screen came up black.
I pressed CTRL-ALT-F1 to get the system console so I could log in.
After logging in I ran tasksel and installed "Ubuntu desktop" and this time no failure was reported.
Information
/proc/cpuinfo
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz stepping : 7 cpu MHz : 800.000 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5182.27 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series Chipset Family MEI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB Controller: Intel Corporation 6 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.1 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 2 (rev b4) 00:1c.3 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 4 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1d.0 USB Controller: Intel Corporation 6 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation 6 Series Chipset Family LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 6 Series Chipset Family 6 port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series Chipset Family SMBus Controller (rev 04) 03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 (rev 34) 0d:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04)
lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 006: ID 04f2:b217 Chicony Electronics Co., Ltd Bus 001 Device 005: ID 0a5c:217f Broadcom Corp. Bluetooth Controller Bus 001 Device 004: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Configuration
- Having installed bare Ubuntu I had to run tasksel and select at least "Ubuntu Desktop".
- In order to allow NetworkManager to manage eth0 I had to comment out the "eth0" stanza in /etc/network/interfaces
- I used System Settings | Ubuntu Software Center to install ccsm ("Advanced Desktop Effects Settings") so I could enable Wobbly Windows and so I can initiate window resize with Super+Button3 (i.e., Windows-key+Right-click) which is easier than grabbing a window border or trying to press Alt and the scroll wheel while dragging.
- Add PPAs to apt sources list for additional indicators
Fixes
Fix for no-beep bug
- To fix the known no-system-beep problem create .xprofile containing
pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg
and add
xset b 100
to .bashrc so that the system bell can be heard.
Fix for "[drm:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed... blt ring idle..." problem
- To fix this known problem do
echo 1 > /sys/module/i915/parameters/semaphores
and to fix it permanently make the following change to
/etc/default/grub
- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" + GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.semaphores=1"
Findings
Compared with this Gentoo user's experience
- (improvements)
- I didn't have to do anything special to have the thinkpad-acpi module loaded or use special keys
- Both microphones are seen
- I have no difficulties with the fans
- I have no difficulties with SD cards
- The "Hangcheck timer elapsed" problem has a workaround as described above
- (disimprovements)
- Suspend doesn't work: it causes a general protection fault
Things to look into
Make a key table
... as I have done in the past.
BEGIN WORK IN PROGRESS THIS DATA IS INCORRECT!!!!!
References:
- Hotkey architecture in Ubuntu
- /usr/include/linux/input.h -- list of Linux key codes
- Default meanings of special keys
Key combination | Extra function symbol | Scan code (showkey -s) (hex) |
Linux key code (showkey -k) |
Input event (input-events) |
... on input device(*) | ACPI event (acpi_listen) |
HAL event (lshal -m) | X event (xev) |
Keyboard Shortcuts name |
---|---|---|---|---|---|---|---|---|---|
⟦🔇 (loudspeaker icon with stroke) | down: e0 20 up: e0 a0 |
113 | KEY_MIN_INTERESTING | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = mute | 121 | XF86AudioMute | |
-🔈 (minus sign, loudspeaker icon) | down: e0 2e up: e0 ae |
114 | KEY_VOLUMEDOWN | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = volume-down | 122 | XF86AudioLowerVolume | |
🔈+ (loudspeaker icon, plus sign) | down: e0 30 up: e0 b0 |
115 | KEY_VOLUMEUP | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = volume-up | 123 | XF86AudioRaiseVolume | |
⟦🎤 (microphone icon with stroke) | |||||||||
ThinkVantage | down: e0 1f e0 9f | 148 | KEY_PROG1 (0x94) | 10 | ibm/hotkey HKEY 00000080 00001018 | computer_logicaldev_input_3 condition ButtonPressed = prog1 | 156 | XF86Launch1 | |
Fn | up: e0 63 e0 e3 | 143 | KEY_WAKEUP | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = wake-up | 151 | XF86WakeUp | |
Fn-F1 | (none) | 466 | KEY_FN_F1 (0x1d2) | 10 | ibm/hotkey HKEY 00000080 00001001 | (none) | (none) | (none) | |
Fn-F2 | 🔒 (padlock symbol) | down: e0 12 e0 92 | 152 | KEY_SCREENLOCK (0x98) | 10 | ibm/hotkey HKEY 00000080 00001002 | computer_logicaldev_input_3 condition ButtonPressed = coffee | 160 | XF86ScreenSaver |
Fn-F3 | 🔋 (battery symbol) | down: e0 71 e0 f1 | 236 | KEY_BATTERY (0xec) | 10 | ibm/hotkey HKEY 00000080 00001003 | computer_logicaldev_input_3 condition ButtonPressed = battery | 244 | XF86Battery |
Fn-F4 | ☾ | down: e0 5f e0 df (but sometimes nothing?) |
142 | KEY_SLEEP (0x8e) | 10 | ibm/hotkey HKEY 00000080 00001004 | computer_logicaldev_input_3 condition ButtonPressed = sleep | 150 | XF86Sleep |
Fn-F5 | ⸨💻⸩ (radiating computer symbol) | down: e0 73 e0 f3 | 238 | KEY_WLAN (0xee) | 10 | ibm/hotkey HKEY 00000080 00001005 | computer_logicaldev_input_3 condition ButtonPressed = wlan | 246 | XF86WLAN |
Fn-F6 | (camera, headset) | (none) | 471 | KEY_FN_F6 (0x1d7) | 10 | ibm/hotkey HKEY 00000080 00001006 | (none) | (none) | (none) |
Fn-F7 | 💻⎚ (computer symbol, screen symbol) | down: e0 56 e0 d6 | 227 | KEY_SWITCHVIDEOMODE (0xe3) | 10 | ibm/hotkey HKEY 00000080 00001007 | computer_logicaldev_input_3 condition ButtonPressed = switch-videomode | 235 | XF86Display |
Fn-F8 | (trackpoint symbol, vertical bar, trackpad symbol) | down: e0 79 e0 f9 | 192 | KEY_F22 (0xc0) | 10 | ibm/hotkey HKEY 00000080 00001008 | computer_logicaldev_input_3 condition ButtonPressed = f22 | 200 | 0xc8 |
Fn-F9 | down: 6f ef | 194 | KEY_F24 (0xc2) | 10 | ibm/hotkey HKEY 00000080 00001009 | computer_logicaldev_input_3 condition ButtonPressed = f24 | 202 | 0xc9 | |
Fn-F10 | down: e0 63 up: e0 e3 |
143 | KEY_WAKEUP | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = wake-up | 151 | XF86WakeUp | |
Fn-F11 | (none) | 476 | KEY_FN_F11 (0x1dc) | 10 | ibm/hotkey HKEY 00000080 0000100b | (none) | (none) | (none) | |
Fn-F12 | ⎚ ▶❍ (screen symbol, right arrowhead, diskpack symbol) | down: e0 25 e0 a5 (but sometimes nothing?) |
205 | KEY_SUSPEND (0xcd) | 10 | ibm/hotkey HKEY 00000080 0000100c | computer_logicaldev_input_4 condition ButtonPressed = hibernate | 213 | XF86Suspend (*) |
Fn-Home | ☀▴ | down: e0 54 e0 d4 | 225 | KEY_BRIGHTNESSUP (0xe1) | 6 | video LCD0 00000086 00000000 | computer_logicaldev_input_0 condition ButtonPressed = brightness-up | 233 | XF86MonBrightnessUp |
Fn-End | ☀▾ | down: e0 4c e0 cc | 224 | KEY_BRIGHTNESSDOWN (0xe0) | 6 | video LCD0 00000087 00000000 | computer_logicaldev_input_0 condition ButtonPressed = brightness-down | 232 | XF86MonBrightnessDown |
Fn-PgUp | (illuminating overhead lamp symbol) | (none) | (none) | (none) | (none) | (none) | (none) | (none) | (none) |
Fn-Space | [🔍+] (screen with magnifying glass symbol and plus sign, i.e., "zoom" symbol) | (none) | 372 | KEY_ZOOM (0x174) | 10 | ibm/hotkey HKEY 00000080 00001014 | computer_logicaldev_input_4 condition ButtonPressed = zoom | (none) | (none) |
Fn-→ | ⏭ (barred right arrowhead, i.e., "next" symbol) | down: e0 19 up: e0 99 |
163 | KEY_NEXTSONG | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = next-song | 171 | XF86AudioNext |
Fn-↓ | ⏯ (right arrowhead, double bar, i.e., "play/pause" symbol) | down: e0 22 up: e0 a2 |
164 | KEY_PLAYPAUSE | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = play-pause | 172 | XF86AudioPlay |
Fn-← | ⏮ (barred left arrowhead, i.e., "prev" symbol) | down: e0 10 up: e0 90 |
165 | KEY_PREVIOUSSONG | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = previous-song | 173 | XF86AudioPrev |
Fn-↑ | ∎ ("stop play" symbol) | down: e0 24 up: e0 a4 |
166 | KEY_STOPCD | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = stop-cd | 174 | XF86AudioStop |
◂ ⎗ (left arrowhead, page icon) | down: e0 6a up: e0 ea |
158 | KEY_BACK | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = back | 166 | XF86Back | |
⎘ ▸ (page icon, right arrowhead) | down: e0 69 up: e0 e9 |
159 | KEY_FORWARD | 4 | (none) | platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = forward | 167 | XF86Forward | |
On UltraBase X6 ▸ (right arrowhead) |
down: e0 56 up: e0 d6 |
227 | KEY_SWITCHVIDEOMODE (0xe3) | 6 | video VID 00000080 00000000 | platform_dock_0 property info.docked = false computer_logicaldev_input_0 condition ButtonPressed = switch-videomode |
235 | ? |
Information from lsinput: INCORRECT -- WORK IN PROGRESS!!!
n | name |
---|---|
0 | "Lid Switch" |
1 | "Sleep Button" |
2 | "Power Button" |
3 | "AT Translated Set @ keyboard" |
4 | "Microsoft Comfort Curve Keyboard" |
5 | "Microsoft Comfort Curve Keyboard" |
6 | "Microsoft Microsoft® Nano Trans" |
7 | "Microsoft Microsoft® Nano Trans" |
8 | "Microsoft Microsoft® Nano Trans" |
9 | "Video Bus" |
10 | "hdaps" |
11 | "PC Speaker" |
12 | "ThinkPad Extra Buttons" |
13 | "TPPS/2 IBM TrackPoint" |
Hotkey mask when the above table was compiled:
$ cat /sys/devices/platform/thinkpad_acpi/hotkey_mask 0x008dffff $ cat /sys/devices/platform/thinkpad_acpi/hotkey_all_mask 0x00ffffff $ cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask 0x008dffff $ cat /sys/devices/platform/thinkpad_acpi/hotkey_report_mode 1
END WORK IN PROGRESS
Fix suspend
"Suspend-to-RAM and brightness control of the display work with kernel >= 3.0-rc6" according to this fellow.
Does the mic hardware mute button work?
No.