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.

Monday, June 20, 2011

Recipes: Tagliatelle Carbonara

As pasta has just been revealed to be the world's favourite food, despite what Giles Coren might think, this recipe turns out to be topical. Carbonara is one of those dishes which is so simple that you can taste every ingredient, so every ingredient needs to be a good one. With carbonara I think this is especially true of the lardons and parmasan. I really like Ginger Pig lardons which you can get from Greensmith's, who also do very good parmasan and semolina flour and typo 00.

Pasta-fallTagliatelleI recommend using a pasta machine (left), but it's not essential (right). If you are going to roll it by hand you might want to add a little bit of water to the mixture to make it more malleable.


The following measurements are good for one very hungry person, or possibly two small people.

First make the pasta dough by mixing 50g of semolina flour, 50g of typo 00, 1 large egg and a pinch of salt. Use a knife to mix and cut until it resembles breadcrumbs, press together, tip the dough out and kneed it for a while. Wrap in cling film and put in the fridge for about 30 minutes.

Fry the lardons in 1-2 tablespoons of olive oil until they begin to crispen. Meanwhile roll out the pasta dough, fold over and roll again. Repeat this process several times until the dough is a nice and smooth consistency. Then roll thin and cut into tagliatelle. I wouldn't be tempted to leave the tagliatelle too long, the novelty quickly wears thin. If you are using a machine you can skip the final notch before putting the dough through the cutting rollers for slightly thicker pasta.

Tag CarbCook the pasta in plenty of salted boiling water in a heavy pan for three minutes. Meanwhile beat together one egg, some cream and some finely grated paramasan and season. Once the pasta is done, turn off the heat and drain, returning the pasta to the pan. Pour over the lardons and their oil and mix. Add the egg, cream and parmasan mixture and stir thoroughly. the sauce should thicken with the residual heat of the pan but not cook, you don't want scrambled eggs. Serve with rocket.

Friday, June 17, 2011

Short Reviews: Casa Malevo, Argentinian Steak, Marble Arch

Casa MalevoGo for brunch, it's good value and they have proper morcilla. Dinner is fine, but not outstanding and quite expensive. Sides are mean, especially the chips. I could happily eat two of their little enamel bowl fulls, Mixed Grill @ Casa Malevowhich at this price is inexcusable, and perplexing when there is so much meat. The set mixed grill we had the other day was very generous, apart from the tiny cubes of very overdone fillet. The rump was nice but inconsistently done (we had four sets), but maybe that was intentional. Service, and the place itself, is very nice.

Tuesday, May 17, 2011

Short Reviews: Riverfront Restaurant @ BFI, Waterloo

Mussels & Fish Cakes @ BFI RiverfrontBefore I start complaining, let me just say that the food that we had at the BFI Riverfront was really very good. My smoked haddock fish cakes were nice and strong, complimented by a very good tartar sauce, something that I don't say very often, and the "oat crumb" coating was both crispy and tasty. The g/f's mussels came in a very nice tarragon sauce, which was a bit too thick and creamy for me, but not for her.

No, what I take issue with is the price. At first glance £9.50 - £11 for a main seems quite reasonable, especially for such a prime location, but who has just mussels for a main? You at least need some bread and butter (£2.50). Or just fish cakes and a dollop of boiled broccoli? You'd probably want some chips with that (£3.50). (I have to admit, the single serving of chips was pretty generous.)

Purely on presentation alone the fish cakes were missing something. That dollop of slightly overdone boiled broccoli didn't fill up much of the plate. Besides the cakes, broccoli and shot glass of tartar sauce, a lonely slice of lemon was doing its best to fill up the rest of the space.

Then there is the "discretionary" 12.5% service charge which is automatically added to you bill. Previously it's proved quite hard to not pay the full amount, and I was going to test it on this occasion, but our waitress managed to redeem her rude and brisk attitude at the last minute by giving us two cups with our single pot of tea :) But why oh why don't places like this just add service to the prices on the menu and have done with it?!

So we ended up spending £40 on two mains, one glass of wine and a cake and tea. Not so reasonable.

UPDATE: Apparently VAT is charged on the menu price, but not on added service, hence nowhere includes service on the menu price.

UPDATE: We went back during April 2012 and the food was still very good (we had rarebit, lamb burger and mussels in cider, which were all very good) and an accompaniment was included with each main, all priced around the £12 mark.

Friday, March 25, 2011

Mongol Rally Non-Sponsorship

As you may or may not know, Kai and I are planning to do the Mongol Rally this July. It's a jaunt in the name of charity, but as it's something that I want to do I feel bad asking friends and family to sponsor me do it. So we've come up with something a mite more fun.*

Here's the deal: for every donation that you make you can enter one of our two sweepstakes in which you must guess how far we will travel or how long it will take us. The clock and odometer stop when we either reach the finish line in Ulaanbaatar or fail completely. Our readings are final. Please be as specific as possible, eg, include minutes/metres. Duplicate entries will be disregarded. The prize will be 10% of the value of donations up to a maximum of £50 for each of the two sweepstakes. We'll also see if we can find some exciting artefacts (or tacky souvenirs) to bring back for the winners. All donations will go to charity and the winnings will come out of our own pockets (hence the £50 limit). Clear? Good.

To give you a better chance at estimating: we will be starting at Goodwood, West Sussex at approximately 4pm on Saturday 23 July. We will be travelling in a car that is no older than 10 years and has an engine of less than 1.3 litres, something like a Nissan Micra or VW Polo, possibly a Toyota Rav4 or one of those little Suzukis (if you have a spare one of these or similar hanging around, let us know). There's just one Czech point (haha) which we leave (I think) on 25 July and then the route is up to us. We plan to go south of the Caspian and Black seas, ie, via Turkey and Iran. We also plan to stop off in Odessa.

Using straight lines this is 6,273 miles. Using Google directions it's 6,723 miles to Korday, Kazakhstan where it stops giving directions. When making our visa application we estimated that it would take us 5 weeks. Last year roughly 2/3 of cars made it to the finish line. Feel free to do more research on the Rally:

http://mongolrally.theadventurists.com/

How to enter:

There is a Just Giving page for each of the two sweepstakes. Donate your money and leave an appropriate guess in your comment. I'm afraid we will not be able to correct mistakes, but hey, you can try again.

If you want to guess at the duration of our journey go to:

http://www.justgiving.com/geekoutTime

If you want to guess at the final distance of our journey go to:

http://www.justgiving.com/geekoutDistance

We have yet to decide when we will stop accepting entries.

If you want to donate but not take part there are also two pages for straight donations:

https://www.justgiving.com/GeekoutAmnesty
https://www.justgiving.com/geekout

Donate on either of those pages and you can request slogans to be written on our car, guess when/where Kai and I will have our first argument or who will kill who first and how.

Good luck!

* Fun is not guaranteed.