T420 under Debian


Due to a relocation, I switched from one Desktop PC to a laptop. As an old thinkpad user and fan of these laptops, I bought a T420. And as a Debian user, I installed this distro on my laptop ! The thing is that by the time, I became lasy and use automatic configuration that does not really fit my needs.

So, installing my new machine from scratch was a good opportunity to make a proper set up and make a minimalist installation that really meet my expectations !

Packages to install

  • thinkfan
  • rfkill
  • tp-smapi-dkms
  • acpi
  • firmware-iwlwifi
  • wicd
  • wicd-daemon
  • wicd-gtk
  • awesome
  • awesome-extra
  • laptop-mode-tools
  • acpitool
  • acpi-support

Thinkfan configuration

Edit the /etc/modprobe.d/thinkpad-acpi.conf file and makes sure it contains the following lines:

   options thinkpad_acpi fan_control=1

Then, reload the thinkfan_acpi module:

   #modprobe -r thinkpad_acpi ; modprobe thinkpad_acpi

Then, to enable thinfan, edit the /etc/default/thinkfan file and make sure it contains the following line:


Finally, change the /etc/thinkfan.conffile and add the following line to specify which pseudo-file is used to get the sensor temperature:

   sensor /sys/devices/virtual/thermal/thermal_zone0/temp

Finally, restart the thinkfan service:

   #service thinkfan restart


The wireless device is supported out of the box but you have to enable the non-free and contrib repository from APT. Once they are set up, you have to install the firmware-iwlwifi. Also, to make sure you can enable/disable wireless devices, make sure you have installed the rfkill package.

Finally, to manage different locations for the wireless device, I use wicd. It is a very lightweight software that is able to manage different wireless network. Once installed, you can connect to wireless network using the wicd-client program.

Suspend after closing LID

First of all, you have to install the acpi-support and pm-utils packages and edit the /etc/default/acpi-support and make sure the following line is uncommented.


Awesome configuration

For the Window Manager, I use awesome. This is a very powerful WM that can be adapted to very specific needs. So, it avoids any resource consumption overhead, it saves battery life and any trendy graphical effect that consumes useless resources.

External drive (hard drive, usb sticks, etc …) mount

Usually, we like that external devices (usb sticks, external hard drives, etc.) are mounted automatically. I do not. I prefer to mount it myself but I do not like to mount it as root and want to mount them using my regular user account. In addition, avoiding all nasty software that polls for incoming devices can save your battery life and your sanity.

So, I just add some lines in the /etc/fstab file to give the ability to mount external drives on fixed mountpoint. Also, to have a per-device mount-point (and not rely on /dev/sdXX file, I used the UUID of the file. You can get this identifier by issuing the following command:

   $ls -l /dev/disk/by-uuid

Then, just add lines like this in your /etc/fstab file:

   UUID=43d85fa4-3ca7-4525-b358-8b718b3c6089 /mnt/data   ext4 user,noauto     0       0

   UUID=933D-90F7                            /mnt/lacie  auto user,noauto     0       0

In this particular setup, it also means that the mountpoint (/mnt/data, /mnt/lacie, etc.) is owned by the user that is supposed to mount the device.


Once done, you can issue the following command after having plugged the drive:

   $mount /mnt/lacie

Adapting X11 configuration files

There are different things to adapt in order to have a proper X that works:

  • Having a screen that blanks after 10 minutes of inactivity
  • Use the international layout of the keyboard to have accent working

These two things can be done by modifying the ~/.xinitrc config file. Mine looks like this:

xmodmap ~/.Xmodmap
xset s blank
xset s 600
setxkbmap -model pc105 -layout us_intl
exec /usr/bin/awesome

This file requires a particular ~/.Xmodmap, the content is the following:

keysym XF86Back = Page_Up
keysym XF86Forward = Page_Down
keysym XF86AudioNext = End
keysym XF86AudioPrev = Home

Links and resources

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s