Arch on a Lenovo ThinkPad x140e
Recently at work I had been virtualizing Arch Linux on a MacBook Pro using VirtualBox. While there were many perks (easy backups, no hardware issues), when I left that assignment (and had to give back the Mac), I couldn’t justify spending a grand on a Mac which would spend most of its time running Linux in a virtual machine, so I set out to find a cheap, modern, Linux compatible laptop. Ultimately, I landed on the Lenovo Thinkpad x140e which was certified by Canonical to run Ubuntu. Unfortunately, for Arch Linux, much of the hardware did not work out of the box. This post covers the modifications I performed to get all of the hardware working including:
- network adapters (wired and wireless)
- input devices (trackpad and trackpoint)
- Fn keys for volume and brightness
This guide assumes that you’ve gone through all of the steps in the Arch installation guide. For what it’s worth, this guide is window manager agnostic (or even atheist if you’re just in terminal), though I’m using Awesome.
The integrated Radeon HD 8330 card is supported by the proprietary driver,
catalyst (not recommended) or the open source
xf86-video-ati driver. If
using the latter, also install the
mesa-libgq for 3D acceleration and
mesa-vdpau for accelerated video decoding.
The ethernet card is supported by a driver in the kernel, you’ll just need to install a dhcp client (e.g. dhcpcd) to handle getting your computer to talk to the router.
Wireless is a little tougher, the Broadcom chipset used is not yet supported by any of the open source drivers, and so you’ll need to follow the instructions for installing broadcom-wl drivers. Namely:
broadcom-wlfrom the AUR
- create a blacklist file named something like
/etc/modprobe.d/wireless.confwith the following:
blacklist brcm80211 blacklist b43 blacklist ssb
- create a
modules-load.dfile named something like
- restart the machine.
You should then be able to connect to wireless through
Trackpad and Trackpoint
I personally am not a fan of the track pad, but if you’d like yours to work
configure it to your liking.
Trackpoint should work out of the box, though if you’d like middle button
scrolling, add the file
Section "InputClass" Identifier "Trackpoint Wheel Emulation" MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device" MatchDevicePath "/dev/input/event*" Option "EmulateWheel" "true" Option "EmulateWheelButton" "2" Option "Emulate3Buttons" "false" Option "XAxisMapping" "6 7" Option "YAxisMapping" "4 5" EndSection
While the integrated sound card is supported out of the box, the system will
most likely set the wrong default card and so you won’t be able to hear
anything, you can correct this by disabling the other sound device (which is
actually just a virtual device exposed by
thinkpad_acpi to represent the
volume and mute buttons, and is not really needed — see below) by adding a file
options snd_hda_intel 1 enable=1 index=0 options snd_hda_intel 2 enable=0 index=1
and restarting. You’ll still need to unmute all the channels using something
alsa-utils through pacman and use
unmute the channels and adjust the volume.
ACPI Events (volume and brightness keys)
In the past I’ve configured the window manager to handle volume and brightness
function keys. However, using the Linux ACPI daemond allows your
machine to handle these keys strokes before you even start X! First install
acpid through pacman, and
Next, you’ll be making the events for the brightness and volume key presses.
event=video/brightnessdown action=../../etc/acpi/handlers/bl -
event=video/brightnessup action=../../etc/acpi/handlers/bl +
event=button/volumedown action=../../etc/acpi/handlers/vol -
event=button/volumeup action=../../etc/acpi/handlers/vol +
event=button/mute action=../../usr/bin/amixer set Master toggle
Next make the directory
/etc/acpi/handlers, in which create the following
#!/bin/sh bl_dev=/sys/class/backlight/radeon_bl0 step=5 case $1 in -) echo $(($(< $bl_dev/brightness) - $step)) >$bl_dev/brightness;; +) echo $(($(< $bl_dev/brightness) + $step)) >$bl_dev/brightness;; esac
#!/bin/sh step=5 case $1 in -) amixer set Master $step-;; +) amixer set Master $step+;; esac
… and make these files executable with
sudo chmod 755 /etc/acpi/handlers/*.
Note that the
vol handler require
amixer which is part of the
That’s about it. There’s always more to be done, from customizing your wifi to auto-connect, to setting up external displays, to installing an configuring a window manager, but after following these steps, all of your hardware should be up and running properly.