Getting wireless to work in Ubuntu on a Lenovo ThinkPad X200

Ubuntu logoI ordered my X200 with the default wireless ethernet adapter, the ThinkPad 11b/g Wireless LAN Mini PCI Express Adapter III. I’m not even sure why I had a choice between that or the more expensive Intel WiFi Link 5100/5300, but given that I only really needed 802.11b/g support, I went with the cheaper default.

I was obviously disappointed to discover upon installing Ubuntu that it couldn’t see my wireless ethernet adapter. Grrr. This is important! It did determine that I needed some restricted (aka closed-source) Atheros drivers in order to try to get it to work, but apparently those drivers didn’t have support for this particular wireless chipset (AR242x):

$ lspci
...
03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)

Without finding the kind of shining bullet that would make everything dandy, I attempted a few different instructions for how to get wireless to work, most of them outside my normal apt-get comfort level, and eventually, almost surprisingly, wireless started working. Of course I’d done a number of different things, and I wasn’t really sure which combination had produced the intended effect. So this morning I reinstalled Ubuntu from scratch, tried what I assumed to be the bare minimum necessary to get wireless to work, and it did!

So anyway, this is what worked for me:

  1. Install Ubuntu
    At the time of writing, 8.04 (Hardy Heron) was the latest version
  2. Update Ubuntu
    sudo apt-get update && sudo apt-get dist-upgrade
  3. Install tools for compiling software
    sudo apt-get install build-essential
  4. Get the latest MadWifi HAL from http://snapshots.madwifi.org/, e.g.
    wget http://snapshots.madwifi.org/madwifi-hal-0.10.5.6/madwifi-hal-0.10.5.6-r3861-20080903.tar.gz
  5. Decompress
    tar xzf madwifi-hal-0.10.5.6-r3861-20080903.tar.gz
  6. Compile
    cd madwifi-hal-0.10.5.6-r3861-20080903
    sudo make
    sudo make install
  7. Reboot

Et voila!
Ubuntu Hardy Heron (8.04) running on a Lenovo ThinkPad X200 with wireless!

Update, October 10, 2008:
Well wouldn’t you know it. Last night I updated Ubuntu (which included a kernel bump from 2.6.24-19 to 2.6.24-21) and this morning at the CM Summit when I booted up my laptop to liveblog Evan Williams—no wireless. Luckily I had the madwifi dir and instructions still in the trash, so I make, make installed it, rebooted, and voila—all was right in the world. I had decent wireless all day long.

Until I returned home, where it seems to alternate between either dragging or not wanting to get an IP address at all. And yet Stephanie is having no problems on her Mac. This is MONDO ANNOYING. At the moment I am tethered, sitting upright, wishing I was laying down in bed.

Update, July 27 2009:
Should have updated this a long time ago, but as of Ubuntu v9.04 (Jaunty Jackalope), released on April 23, 2009, wireless on the Lenovo ThinkPad X200 works out of the box.

· Tech