Installing FreeBSD on a Thinkpad X121e

I decided it was time to try FreeBSD. And what better way is there to learn about an operating system than to use it every day? So I decided to put it on my x121 and to dual-boot with Debian.


I was pleasantly surprised that the NIC (Atheros AR8151) was immediately recognized, this had been a problem in the past on Linux.

The wireless Realtek NIC (RTL8188CE) doesn't seem to be supported, but I didn't really try yet as I rarely need it. Supposedly the Windows drivers can be used though, see NDIS.


Getting FreeBSD to boot took very long because of a BIOS bug that prevents the x121 from booting off a disk partitioned with a GPT partition map. But this isn't a FreeBSD problem, anything that's not Windows will have the same problem.

I chainload the BSD installer through GRUB. Run update-grub in Debian after modifying /etc/grub.d/40_custom:

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'FreeBSD' {
    insmod ufs2
    insmod bsd

    set root='(hd0,msdos3)' # Obviously modify this as needed
    chainloader +1


I had audio right away (Radeon HD 6250/6310), but FreeBSD didn't switch to the headphone out when I plugged mine in. /dev/sndstat contains:

FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default
pcm2: <Conexant CX20590 (Analog Mic)> (rec)

dmesg had the following relevant output:

hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
hdaa1: <Conexant CX20590 Audio Function Group> at nid 1 on hdacc1
pcm1: <Conexant CX20590 (Analog 2.0+HP/2.0)> at nid 31,25 and 27 on hdaa1
pcm2: <Conexant CX20590 (Analog Mic)> at nid 35 on hdaa1

I had to add these two lines to /boot/device.hints to fix the issue:

hint.hdaa.1.nid31.config="as=2 seq=0 device=Speaker"
hint.hdaa.1.nid25.config="as=2 seq=15 device=Headphones"

Update: For whatever reasons the nid numbers for the sound cards have changed and all I can do now is to switch manually through sysctl hw.snd.default_unit=[1,2].


Xorg with the radeon driver (Radeon HD 6320) works with a big gotcha: xorg can't be restarted and it's impossible to switch to a virtual terminal. Doing so simply blanks the display, and I haven't found a way to reinitialize it after that. The vesa driver works fine but is limited to 1024x768.

I had a similar problem on Debian without the firmware-linux-nonfree package, so I'm not quite sure if this is an xorg or FreeBSD kernel problem.


I had to enable hald and dbus manually to have the keyboard work in X, /etc/rc.conf contains:

# Keyboard in xorg


FreeBSD has an excellent collection of ports, everything I need is in it. Also things like mplayer, VLC, audio tools etc. are all available and work.

Flash can be installed, but not natively. Not a high priority for me, so I didn't even try.

I was stuck with an outdated ports tree after the install using a FreeBSD-9.1-RELEASE memstick img. I'm not sure how this could have happened, but fixed it with portsnap.


FreeBSD runs just fine on the x121e. If you plan on buying one you should be aware that the specs might have changed since I bought mine, and that the Intel variant could also contain different parts.

I'll be using my install to play with various features, networking, filesystems, security, cross-platform development etc. The long-term goal is to become familiar enough with FreeBSD to be able to run it on a few production servers.

1 comment

  1. avatar
    wrote this comment on

    Use radeonkms to fix no X restart. It seems newer xorg expects kms and older code paths aren't well tested anymore.

Start a new thread

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.