Saturday, October 29, 2011

Arch Linux on a Thinkpad X220

Crucial M4 SSD Thinkpad X220 7mm ModSome thoughts on Arch Linux on the X220:
  • Adding i915.i915_enable_rc6=1 to you kernel boot options can result in considerable cooling and power savings (and possible unwanted shutdowns?)
  • The screen brightness jumps to full after certain ACPI events, such as at startup and lid open. I haven't fully solved this but have added xbacklight -set 80 to my .xinitrc.
  • Occasionally when I connect to power, yacpi reports a maximum CPU frequency of 800MHz. I haven't been able to reliably recreate or investigate.
  • Volume/Mute buttons work with xbindkeys, though I haven't got the mic mute to work yet even with Corubba's udev keymap suggestion below. Also if the machine is muted at boot the mute toggle doesn't work. (Windows seems to exhibit similar behaviour.)
  • For right and middle click on the Touchpad install xf86-input-synaptics-clickpad. You can also configure XOrg for tapping the corners.
  • I haven't properly measured battery life, but it's estimated at around five hours with my standard 6 cell pack, which isn't bad, and is similar to the Windows estimate.
  • If your machine reboots after shutdown add rmmod ehci_hcd to rc.local.shutdown.
  • If your machine pauses at shutdown with e1000e 0000:00:19.0: eth0: Could not acquire PHY then add rmmod e1000e to rc.local.shutdown.
  • Power button to power off instructions here. Note that you have to hold the power button down for three seconds until the machine beeps. Note also that I couldn't get the "first solution" on that page to work, but the second does.
  • If udevd times out (after 30 seconds) at boot then try adding your wireless driver (eg rtl8192ce) to MODULES in rc.conf.
I've had a bit of an adventure with wireless, so I thought I'd give it its own section:
  • I made the mistake of not paying £3 to upgrade the wireless to Intel and got the RealTek 8188ce card by default. The kernel driver doesn't seems fine. that great, use the RealTek driver or better, the AUR package (currently neither is available for 3.1).
  • As I found out to my cost, the Thinkpad BIOS has a whitelist of wireless cards, and if yours doesn't match then your machine won't even boot, even if it is a genuine Intel Centrino Advanced-N 6200. However there are plenty of modded BIOSes out there, although not necessarily quite up to date. Try googling your model number + "whitelist". I got my X220 BIOS here.
  • Oddly, after installing the 6200 my machine started suspending twice when I closed the lid, fixed by adding the following line to /etc/acpi/actions/lm_lid.sh
    if [[ `cat /proc/acpi/button/lid/LID/state | awk '{print $2}'` = "closed" ]]
  • Disappointingly the Intel card doesn't seem any better than the RealTek, not connecting as fast as the RealTek did with the Aur driver and it didn't cure my disconnection issues. They seem to have been cured by flashing our Virgin provided D-Link DIR-615 with dd-wrt.
See also my post on the X220 and booting GPT drives.

A note for Windows 7 - don't install the Intel HD graphics driver before Windows SP1 or you'll get a blue screen.

Wednesday, October 26, 2011

Mount/Read VMWare vmdk Disks

You can try the VMWare-Mount utility, but an easier way is to use VMWare Player to "map" the disk in the Utilities menu in Machine Settings.

Monday, October 17, 2011

UEFI Bootable Windows 7 USB Media

Problems with the Thinkpad X220 and GPT, UEFI, MBR and Legacy BIOS Booting

Crucial M4 SSD Thinkpad X220 7mm ModAfter several days banging my head against a brick wall and suffering the indifference of Lenovo/IBM tech support I have learnt a lot about UEFI, in regards to the X220 in particular.
  1. The X220 cannot/will not boot GPT disks using Legacy BIOS. I would call this a bug.
  2. The X220 will not boot /efi/*/*.efi unless "signed"(?) into BIOS, you have to copy it to /efi/boot/bootx64.efi. I guess this is a security feature, but I'm not sure how secure it is if you can bypass it so easily.
  3. Disabling the BIOS setting "USB UEFI BIOS Support" disables *all* USB booting, ie, both UEFI and legacy BIOS. If this isn't a bug then
    1. it at least needs relabelling,
    2. could be moved/linked to the boot menu and
    3. is redundant as you can disable USB booting using the Boot menu.
I should say that this was with BIOS version 1.22 (I think).

I recommend following these instructions to create a very useful and versatile boot disk for diagnosis.

If you want to use the X220 UEFI boot menu I recommend disabling booting from LAN as it adds a few seconds to the boot time. You have to disable it in several places in the BIOS to avoid the wait.

See also my more general post on Arch Linux on the X220.

Sunday, October 09, 2011

Fix HTC HD2 Digitiser/Touchscreen

Make sure you try a soft-reset first by pushing the little red button on the back of the phone while it is on. After four months I just discovered that that fixed it. Luckily I hadn't ordered a new screen/digitiser on ebay.

Tuesday, October 04, 2011

Invalid MIT-MAGIC-COOKIE-1 key

I eventually tracked down the above error to the file ~/.Xauthority, which I removed, which solved the problem. Perhaps back it up first.