Arch Linux on TP X220

I’ve decided to give Arch Linux a try and went on to install it on the Lenovo (IBM) Thinkpad X220 (Sandy Bridge i7). I have, once again, used LVM over LUKS (over the Crucial M4 SSD) and Gnome Shell. Here is a short summary of what I have found to be quite practical.

I recommend reading my post regarding the X200 with Fedora 16 for some nice powersaving features and the ThinkLight in Pidgin.



Install yaourt for AUR integration

Just execute the following as root:

echo "
# The French Arch Linux communities packages.
Server =$arch" >> /etc/pacman.conf

pacman -Syy
pacman -S yaourt

From now on, you can use yaourt just as if it were pacman (it has the same parameters etc.) and you can thus download, compile and install packages from the AUR seamlessly.

More information on yaourt, user repositories and AUR.


Enable pacman colouring, even using sudo

Execute as root:

pacman -S pacman-color

Execute as the user who runs pacman (probably root or yourself with sudo):

echo "
alias sudo='sudo '
alias pacman='pacman-color'" >> ~/.bashrc


Enable fingerprint authentification

Install fprintd:

pacman -S fprintd

Reboot, go into Settings -> User Accounts and activate Fingerprint Login, enrolling your finger. This allows you to authenticate with the fingerprint reader in GDM (at login). I’ve also modified /etc/pam.d/gnome-screensaver to:

auth        required
auth        sufficient
auth        sufficient nullok try_first_pass
auth        requisite uid >= 1000 quiet
auth        required

This allows you to unlock the screen (gnome-screensaver) by swiping your finger.


Setup GnuPG and gpg-agent for password caching

Execute as root:

pacman -S gnupg

echo '

if [[ `whoami` != "root" ]] ; then
        if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
            eval "$(cat "$envfile")"
            eval "$(gpg-agent --daemon --write-env-file "$envfile")"
        export GPG_AGENT_INFO  # the env file does not contain the export statement
' > /etc/profile.d/

Using your local user’s .bash_profile doesn’t seem to work. This is based on the Arch wiki page for GnuPG.

Afterwards, execute as yourself (the daily user):

echo "
use-agent" >> ~/.gnupg/gpg.conf

echo "default-cache-ttl 3600
max-cache-ttl 7200" >> ~/.gnupg/gpg-agent.conf

This allows the gpg-agent to cache your password for 1 h of inactivity and 2 h in total.

All you need to do now is importing your PGP keys with gpg --import and configuring your software (e. g. Enigmail for Thunderbird, which also allows you to create new keys).


Get some nice Gnome Shell extensions

These are some Gnome 3 extensions that I’m using with the X220:

  • alternate-tab
  • alternative-status-menu
  • battery-remaining-time
  • brightness_control
  • desktop-scroller
  • gcalc-search
  • gTile
  • LeftMessageTray
  • lgbutton
  • multi-volume
  • music-integration
  • overlay-icons
  • pidgin-conversation-integration
  • pidgin-persistent-notification
  • presentationmode
  • quitbutton
  • removeaccesibility
  • temperature
  • WindowIconList
  • workspaceNavigator
  • xrandr-indicator

You can easily get them at


Bonus: Powertop Screenshots

This section has been added to show X220’s powertop status in idle (see comments below).


12 responses to “Arch Linux on TP X220”

  1. Hey, I wondering whether it is possible to use fingerprint at the login prompt on console. Other than this, how much power does your device consume with the latest updates?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.