OpenBSD 4.8 on a Thinkpad X61s

OpenBSD 4.8 sports some exciting developments for laptop users, most notably support for ACPI suspend/resume, so I grabbed the snapshot of the upcoming 4.8 release.

I installed it on my Thinkpad X61s (pretty much the same as X61, which is not very different from X60 and X60s).

The installation process was very quick and easy yet again, especially since I dedicated the whole disk to OpenBSD and let it decide the partitioning automatically. Less than 10 minutes from start to finish.

Things that worked out of the box:

  • Sound

  • Volume keys (verified with ears and mixerctl)

  • Brightness keys

  • Battery status (apm)

  • X - no configuration needed, just startx

  • Suspend/resume when pressing Fn-F4. X, wifi etc all working after resume.

The wifi card was recognized alright as “Intel Wireless WiFi Link 4965” with driver iwn but didn’t work right away:

iwn0: error, 2, could not read firmware iwn-4965
iwn0: could not read firmware

This is however Intel’s fault. OpenBSD comes with the driver but not the firmware files because, as man iwn explains, “Intel refuses to grant distribution rights without contractual obligations”. The same man page provides a URL to a package with the firmware files that you can install right away with pkg_add:

# pkg_add http://damien.bergamini.free.fr/packages/openbsd/iwn-firmware-5.5.tgz

(This address was current as of this writing, but please check the man page to verify.)

After installing the firmware package, you should be good to go. I used this to connect to my WPA-protected home network:

# ifconfig iwn0 nwid fooninja wpa wpapsk `wpa-psk fooninja secretpassword`
# dhclient iwn0

If everything seems to go well but still doesn’t work, make sure the system is not trying to use the wired interface em0. (Try ifconfig em0 down and route flush.)

By default, closing the lid does not suspend the computer. To change this, set the sysctl entry machdep.lidsuspend to 1:

# sysctl machdep.lidsuspend=1

To make the change permanent, put it in /etc/sysctl.conf.