Lenovo ThinkPad T420 - ArchWiki

Jump to content

This article or section is a candidate for merging with Laptop/Lenovo#T series.

Notes: Not updated since flagged. (Discuss in Talk:Lenovo ThinkPad T420)

This article or section does not follow the Laptop page guidelines.

Reason: Needs a hardware table and a function keys section (Discuss in Talk:Lenovo ThinkPad T420)

This article or section is out of date.

Reason: This page is ancient (e.g. still references `rc.conf`). (Discuss in Talk:Laptop#Old laptop pages)

Related articles

- Lenovo ThinkPad T420s
- Lenovo ThinkPad T520

This article covers the installation and configuration of Arch Linux on a Lenovo T420 laptop.

## Installation

This laptop supports UEFI as well as the traditional BIOS. If you use Legacy Boot (traditional BIOS) or UEFI/Legacy Boot, choose an MBR partition table when partitioning the disk, because those modes are not compatible with GPT partition tables on the T420.

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.

## Hardware

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 Fingerprint-gui for more information.

### Some Media keys

- See Media Keys

### Untested

- Firewire

### Dock

See dockd.

## Laptop Settings

### ACPI

ACPI is well supported here. No obvious troubleshoots.

### Tp_smapi

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-bat.

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.

    [Unit]
    Description=Set battery capacity

    [Service]
    Type=oneshot
    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

    [Install]
    WantedBy=multi-user.target

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.

### Fans

Before installing programs and editing all these config files, try out zcfanAUR which aims to be a zero-configuration fan control program for Thinkpads. It also installs itself to systemd without intervention unlike thinkfan.

As per this Thinkfan install guide for the T420, you can get the fans of your system running optimally.

Install the package thinkfanAUR, tp_smapi or tp_smapi-dkmsAUR, read-edid, and i2c-tools.

Next, run the following command:

    $ cat /proc/acpi/ibm/fan

If you have not modified any settings previously, it should show your level as `auto`.

Find your sensors' location by running and taking note of the output:

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

Now you may edit your `/etc/thinkfan.conf` file. Below is an example configuration file, based off of a T420 with NVIDIA Optimius:

    /etc/thinkfan.conf

    tp_fan /proc/acpi/ibm/fan
    hwmon /sys/devices/virtual/thermal/thermal_zone0/temp
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp3_input
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon4/temp2_input
    hwmon /sys/devices/virtual/thermal/thermal_zone0/hwmon1/temp1_input

    (0,     0,      42)
    (1,     40,     47)
    (2,     45,     52)
    (3,     50,     57)
    (4,     55,     62)
    (5,     60,     77)
    (7,     73,     93)
    (127,   85,     32767)

Next modprobe the `thinkpad_acpi` module:

    # modprobe -rv thinkpad_acpi
    # modprobe -v thinkpad_acpi

If you encounter an error involving `thinkpad_acpi`, a quick reboot of your system should solve it.

Now start thinkfan, and check your fan levels.

    # thinkfan -q
    $ cat /proc/acpi/ibm/fan

If your level is no longer `auto`, you have successfully gotten your fan's levels to be accurate to Windows' drivers.

### Laptop Mode Tools

No significant issues were found using Laptop Mode Tools.

Possible bug with #Shutdown on battery.

The package tlp is an alternative tool that can replace laptop-mode-toolsAUR.

### NVIDIA Optimus

Installing nvidia-390xx-dkmsAUR, nvidia-390xx-utilsAUR and optimus-managerAUR allows the user to use their Quadro NVS 4200M card easily and seemlessly, only requiring a logout for switching the cards.

### Optional kernel boot arguments

Using the following kernel boot parameters reduces battery drain:

    i915.enable_rc6=1
    i915.enable_fbc=1
    i915.lvds_downclock=1
    i915.semaphores=1

### VT-Switching hangs

If your system hangs for some 10 seconds occasionally when switching virtual terminals with Ctrl+Alt+Fx with the following dmesg line

    [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:36:pipe A] flip_done timed out

it is often suggested to add

    video=SVIDEO-1:d

to kernel boot parameters, if that does not work, uninstall the `xf86-video-intel` package.

## Troubleshooting

### Media Keys

Media keys that (should) work out of the box:

- Wireless On/Off
- Backlight Brightness settings
- Thinklight
- Mute
- Microphone mute

Media Keys that Do Not work out of the box:

- Volume keys (Works out-of-the-box in GNOME and KDE Plasma)

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

xbindkeys and xbindkeys_config-gtk2AUR can be a solution for media keys that are not working. This solution also allows you to rebind the ThinkVantage button and certain FN layer shortcuts (the blue logos on the keyboard).

### 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-xmodmap

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

Note:

- 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. See Touchpad Synaptics#Software toggle for a workaround.

### Volume up/down not changing volume

See Xbindkeys.

### 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`:

    DAEMONS=(...!laptop-mode...)

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

- Arch Linux on ThinkPad T420i

Category:

- Lenovo

Hidden categories:

- Pages or sections flagged with Template:Merge
- Pages or sections flagged with Template:Laptop style
- Pages or sections flagged with Template:Out of date