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.
[TOC]
Install yaourt for AUR integration
Just execute the following as root:
echo " [archlinuxfr] # The French Arch Linux communities packages. Server = http://repo.archlinux.fr/$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:
#%PAM-1.0 auth required pam_env.so auth sufficient pam_fprintd.so auth sufficient pam_unix.so nullok try_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet auth required pam_deny.so
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 ' #!/bin/sh if [[ `whoami` != "root" ]] ; then envfile="${HOME}/.gnupg/gpg-agent.env" if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then eval "$(cat "$envfile")" else eval "$(gpg-agent --daemon --write-env-file "$envfile")" fi export GPG_AGENT_INFO # the env file does not contain the export statement fi ' > /etc/profile.d/gpg-agent.sh
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 https://extensions.gnome.org/.
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”
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?
yea it can be done, did it already 🙂
but what about the power consumption with latest BIOS and archlinux updates?
With the stock 6 cell battery, I’m getting about 9 hours (ca 7 W) of idle running time or 6 hours (ca 9.5 W) of regular wireless Internet usage with medium brightness. However, you should be very wary of (unwillingly) stressing the CPU; with the i7 unter full CPU and GPU load, the notebook consumes up to 65 W, which only lets it run for some 50 minutes… But under normal circumstances, any CPU-intensive tasks get done rather quickly, so the i7 sleeps most of the time.
Do you have everything updated? can you post a screenshot of your powertop please? (overview, device stats and tunables.)
could you also post your machine’s specs please?
What is your machine and what are your results?
Mine is a 4290W4H with the newest BIOS and SSD firmware + a fully up-to-date Arch on it. I’m using laptop-mode-tools and thinkfan. I’ll insert the screenshots into the post.
lol exactly same model, just out of curiosity, did you buy it from Germany? will list my results soon.
Yes. Why? 🙂
Do you live in Munich?
posted the links of the results, but cannot see them here for some reason.
Please contact me: http://www.trsk.org/about/
http://ompldr.org/vZXN2dQ
http://ompldr.org/vZXN2dg
http://ompldr.org/vZXN2dw