Difference between revisions of "Lenovo ThinkPad T420"

From ArchWiki
Jump to: navigation, search
m (shorter udev rule)
(No backlight controls: merged to HCL/Laptops/Lenovo)
Line 248: Line 248:
This is a problem on many laptops and can be fixed by [[Kernel modules#Blacklisting|blacklisting]] the {{ic|e1000e}} kernel module.
This is a problem on many laptops and can be fixed by [[Kernel modules#Blacklisting|blacklisting]] the {{ic|e1000e}} kernel module.
=== No backlight controls ===
One user has reported that the brightness controls (fn+home, fn+end) did not work in some desktop environments. This could be fixed by adding the following kernel options:
acpi_backlight=vendor acpi_osi=Linux
Also try to adjust the display in the console and not in X windows.  If you don't have the keybindings correct in X, it will cause a problem.  This can be bypassed if you use a virtual console to adjust the brightness.
== See also ==
== See also ==

Revision as of 11:31, 23 November 2014

zh-CN:Lenovo ThinkPad T420 This article covers the installation and configuration of Arch Linux on a Lenovo T420 laptop.


This laptop supports UEFI as well as the traditional BIOS.

There are no issues with installing Arch Linux with the latest Archiso.

The rest of the installation process can be followed with the Installation guide.


All hardware works out of the box except the following:

Fingerprint reader

Fingerprint reader works great with fprint and PAM (installation of fingerprint-gui recommended).

See Fprint#Setup_fingerprint-gui for more information.

Some Media keys


  • Firewire

Laptop Settings


ACPI is well supported here. No obvious troubleshoots.


Unfortunately, tp_smapi is only partially supported on the Thinkpad T420. A number of features work since version 0.41. For example, the hard drive protection mechanism HDAPS now works well. See the linked wiki entry.

Some features like setting the starting threshold for charging the battery do not yet work. To control the battery charging thresholds, install the Perl script tpacpi-batAUR from the AUR.

Insert the acpi_call kernel module by running

modprobe acpi_call

Manually set the thresholds by calling

/usr/bin/perl /usr/bin/tpacpi-bat -v -s SP 0 80 
/usr/bin/perl /usr/bin/tpacpi-bat -v -s ST 0 40

The example values 40 and 80 given here represent the percentage of full battery capacity remaining. Adjust them to your own needs. You may also want to write a simple set-battery.service and enable it to set them at startup. While these values should be permanent, they will be reset any time the battery is removed.

Description=Set battery capacity

ExecStart=/usr/bin/perl /usr/bin/tpacpi-bat -v -s SP 0 80
ExecStart=/usr/bin/perl /usr/bin/tpacpi-bat -v -s ST 0 40


Also, if you are dual booting with Windows, you can still control the battery charging thresholds with Lenovo's Power Manager which communicates directly to the battery controller.

When using systemd, you may want to blacklist the tp_smapi module if your systemd-modules-load.service fails, as new ThinkPads handle everything over acpi.

CPU frequency scaling

CPU frequency scaling is fully supported with all of the available processor models with this laptop.


Install thinkfanAUR from the AUR. It will automatically create the necessary acpi configuration file in "/usr/lib/modprobe.d/thinkpad_acpi.conf".

Copy the example sensor settings file from "/usr/share/doc/thinkfan/examples/thinkfan.conf.simple" to "/etc/thinkfan.conf".

sudo cp /usr/share/doc/thinkfan/examples/thinkfan.conf.simple /etc/thinkfan.conf

Aftwards replace the default sensor in the settings file /etc/thinkfan.conf with the following.

sudo nano /etc/thinkfan.conf
sensor /sys/devices/virtual/thermal/thermal_zone0/temp

Alternatively, sensors can be generated using following command. Add sensor before the sensor lines.

find /sys/devices -type f -name "temp*_input"

In the same configuration file replace the default fan level settings with your needs (the last lines of the file). Useful values are

(0,	0,	42)
(1,	40,	47)
(2,	45,	52)
(3,	50,	57)
(4,	55,	62)
(5,	60,	67)
(6,	65,	72)
(7,	70,	77)
(127,	75,	32767)

Finally enable systemd daemon thinkfan.

sudo systemctl enable thinkfan

Laptop Mode Tools

No significant issues were found using Laptop Mode Tools.

Possible bug with #Shutdown on Battery

tlp From the AUR is an alternative tool that can replace laptop-mode-toolsAUR.


TouchPad and TrackPoint do work out of the box, but the TouchPad is way too sensitive (i.e. fast) to be usable, since it is recognized as a mouse. To fix this, install the xf86-input-synaptics package and add the following two files to your /etc/X11/xorg.conf.d/ directory:

 Section "InputClass"
        Identifier      "ThinkPad TrackPoint"
        MatchProduct    "TPPS/2 IBM TrackPoint"
        MatchDevicePath "/dev/input/event*"
        Option          "EmulateWheel"          "true"
        Option          "EmulateWheelButton"    "2"
        Option          "XAxisMapping"          "6 7"
        Option          "YAxisMapping"          "4 5"
 Section "InputClass"
        Identifier      "two finger scrolling"
        Driver          "synaptics"
        MatchProduct    "SynPS/2 Synaptics TouchPad"
        MatchDevicePath "/dev/input/event*"
        Option          "VertTwoFingerScroll"   "on"
        Option          "HorizTwoFingerScroll"  "on"
        Option          "EmulateTwoFingerMinW"  "8"
        Option          "EmulateTwoFingerMinZ"  "40"
        Option          "TapButton1"            "1"

Adjust to your own needs. Read Touchpad Synaptics for more information.

To adjust the speed/sensitivity of the TrackPoint add these lines in a systemd tmpfile:

w /sys/devices/platform/i8042/serio1/speed - - - - 180
w /sys/devices/platform/i8042/serio1/sensitivity - - - - 200

Possible range of values are 1-255.

Or add an udev rule:

SUBSYSTEM=="serio", DRIVERS=="psmouse", WAIT_FOR="speed", WAIT_FOR="sensitivity", \
ATTR{sensitivity}="200", ATTR{speed}="180"

NVIDIA Optimus

Bumblebee works as intended on models with NVIDIA Optimus

Optional kernel boot arguments

Using the following kernel boot parameters reduces battery drain:



Media Keys

Media keys that work out of the box:

  • Wireless On/Off
  • Backlight Brightness settings
  • Thinklight
  • Mute

Media Keys that Do Not work out of the box:

  • Volume keys (Works out-of-the-box in Gnome)
  • Microphone mute (Requires a custom kernel patch)

You must find a workaround and bind the keys yourself for the rest of them.

Rebind Forward and Back keys

Keys forward and back (next to cursor keys) can be easily remapped to PageDown/PageUp.

Install xmodmap with the package xorg-server-utils

Create a ~/.Xmodmap file with content:

keysym XF86Back = Page_Up
keysym XF86Forward = Page_Down

Add this line to your ~/.xinitrc to make it work:

xmodmap ~/.Xmodmap

You can also re-map AudioPrev (Fn+Left) and AudioNext (Fn+Right) to Home/End:

keysym XF86AudioNext = End
keysym XF86AudioPrev = Home
  • You have to log out for the changes to take effect.
  • The keys should work out of the box, at least on KDE.

Turn touchpad on and off

For some, the (Fn+F8) key does not switch the touchpad on and off. Here is a simple keybind to add to your ~/.xbindkeysrc for keys to quickly change your touchpad state. For these to take effect, run xbindkeysrc. This binds Fn+F8 to 'toggle the touchpad on and off'. (Tested in i3wm and xfce4, where normal Fn+F8 does not toggle the touchpad)

# Toggle the Touchpad on|off
"synclient TouchpadOff=$(synclient -l | grep -ce TouchpadOff.*0)"
   m:0x0 + c:199

Volume up/down not changing volume

Another quick keybind for ~/.xbindkeysrc to change the volume (which does not work on some DEs). Again, run xbindkeys for these to take effect. Taken from Xbindkeys

#increase volume
"amixer set Master playback 1+"
   m:0x0 + c:123
#decrase volume
"amixer set Master playback 1-"
   m:0x0 + c:122

Also, while the mute button works, I rebound it to interface with ALSA.

# Toggle mute
"amixer set Master toggle"
   m:0x0 + c:121

Shutdown on battery

Some users have reported that the T420 was rebooting on shutdown on battery power. There have been quite a few attempts to fix this. Three are detailed here.

One way is to disable the module ehci_hcd. See Kernel_modules#Blacklisting for more information.

Or try disable Laptop-mode. Add !laptop-mode to the DAEMONS array in /etc/rc.conf:


This forum post details another way to have your computer not reboot on shutdown. Turning off the laptop-mode daemon causes battery life to suffer, so when on the move and in need of a simple way to shutdown, this seems to work better.

Hang on reboot

This is a problem on many laptops and can be fixed by blacklisting the e1000e kernel module.

See also