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

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

== Installation ==

== Installation ==

+

This laptop supports [[Unified_Extensible_Firmware_Interface|UEFI]] as well as the traditional BIOS.

This laptop supports [[Unified_Extensible_Firmware_Interface|UEFI]] as well as the traditional BIOS.

There are no issues with installing Arch Linux with the latest [https://www.archlinux.org/download/ Archiso].

There are no issues with installing Arch Linux with the latest [https://www.archlinux.org/download/ Archiso].

−

The rest of the installation process can be followed with the [[Official_Arch_Linux_Install_Guide|official install guide]].

+

The rest of the installation process can be followed with the [[Installation Guide]].

== Hardware ==

== Hardware ==

−

All hardware not listed below works out-of-the-box.

−

=== Webcam ===

+

All hardware works out of the box except the following:

−

The integrated [[Webcam_Setup|webcam]] uses the {{ic|uvcvideo}} module which should load automatically. If not, add it to the {{ic|MODULES}} array in {{ic|/etc/[[rc.conf]]}}.

−

=== FingerPrint Reader ===

+

=== Fingerprint reader ===

−

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

+

+

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

See [[Fprint#Setup_fingerprint-gui]] for more information.

See [[Fprint#Setup_fingerprint-gui]] for more information.

+

+

=== Some Media keys ===

+

+

* See [[#Media Keys|Media Keys]]

=== Untested ===

=== Untested ===

−

* eSATA

+

* Firewire

* Firewire

−

== Laptop Settings ==

+

==Laptop Settings==

−

=== ACPI ===

+

+

===ACPI===

+

[[ACPI_modules|ACPI]] is well supported here. No obvious troubleshoots.

[[ACPI_modules|ACPI]] is well supported here. No obvious troubleshoots.

=== Tp_smapi ===

=== Tp_smapi ===

+

Unfortunately, [[Tp_smapi|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.

Unfortunately, [[Tp_smapi|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 {{AUR|tpacpi-bat}} from the [[Arch User Repository|AUR]].

+

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 {{AUR|tpacpi-bat}} from the [[AUR]].

Insert the {{ic|acpi_call}} kernel module by running

Insert the {{ic|acpi_call}} kernel module by running

modprobe acpi_call

modprobe acpi_call

−

or by adding it to the {{ic|MODULES}} array in {{ic|/etc/[[rc.conf]]}}.

The example values 40 and 80 given here are in percent of the full battery capacity. Adjust them to your own needs. You may also want to add these lines to {{ic|/etc/rc.local}} to set them at startup. While these values should be permanent, they will be reset any time the battery is removed.

+

The example values 40 and 80 given here are in percent of the full battery capacity. Adjust them to your own needs. You may also want to write a simple {{ic|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.

You can add or remove services by editing the {{ic|DAEMONS}} array in your /etc/[[rc.conf]] file. It will initially look something like this:

+

Enable [[systemd]] [[daemon]] '''thinkfan'''.

−

DAEMONS=(...@thinkfan...)

=== Laptop Mode Tools ===

=== Laptop Mode Tools ===

+

No significant issues were found using [[Laptop Mode Tools]].

No significant issues were found using [[Laptop Mode Tools]].

−

=== PM-Utils ===

+

Possible bug with [[#Shutdown on Battery]]

−

Suspending and hibernating with [[Pm-utils|pm-utils]] works as intended.

+

+

{{AUR|tlp}} From the [[AUR]] is an alternative tool that can replace {{Pkg|laptop-mode-tools}}.

=== Synaptics ===

=== Synaptics ===

+

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, [[pacman|install]] the {{Pkg|xf86-input-synaptics}} package and add the following two files to your {{ic|/etc/X11/xorg.conf.d/}} directory:

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, [[pacman|install]] the {{Pkg|xf86-input-synaptics}} package and add the following two files to your {{ic|/etc/X11/xorg.conf.d/}} directory:

Line 96:

Line 119:

</nowiki>}}

</nowiki>}}

−

Adjust to your own needs. Read [[Touchpad_Synaptics]] for more information.

+

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

−

To adjust the speed/sensitivity of the TrackPoint add these lines in your {{ic|/etc/rc.local}}:

+

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

−

{{hc|/etc/rc.local|<nowiki>

+

{{hc|/etc/tmpfiles.d/local.conf|

−

TPDEV=/sys/devices/platform/i8042/serio1

+

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

−

echo 180 > $TPDEV/speed

+

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

−

echo 200 > $TPDEV/sensitivity

+

}}

−

</nowiki>}}

−

Possible range of values are 1-255

+

Possible range of values are 1-255.

=== NVIDIA Optimus ===

=== NVIDIA Optimus ===

+

[[Bumblebee|Bumblebee]] works as intended on models with NVIDIA Optimus

[[Bumblebee|Bumblebee]] works as intended on models with NVIDIA Optimus

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

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

=== Rebind Forward and Back keys ===

=== Rebind Forward and Back keys ===

+

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

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

Line 147:

Line 178:

keysym XF86AudioPrev = Home

keysym XF86AudioPrev = Home

−

{{Note|You have to log out for the changes to take effect.}}

+

{{Note|

+

* You have to log out for the changes to take effect.

+

* The keys should work out of the box, at least on [[KDE]].

+

}}

−

{{Note|The keys should work out of the box, at least on [[KDE]].}}

+

=== Turn touchpad on and off ===

−

=== Shutdown on Battery ===

+

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

−

One user has reported that his T420 was rebooting on shutdown on battery power. This was fixed by disabling the module {{ic|ehci_hcd}}. See [[Kernel_modules#Blacklisting]] for more information.

+

+

# Toggle the Touchpad on|off

+

"synclient TouchpadOff=$(synclient -l | grep -ce TouchpadOff.*0)"

+

m:0x0 + c:199

+

XF86TouchpadToggle

+

+

=== Volume up/down not changing volume ===

+

+

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

+

+

#increase volume

+

"amixer set Master playback 1+"

+

m:0x0 + c:123

+

XF86AudioRaiseVolume

+

+

#decrase volume

+

"amixer set Master playback 1-"

+

m:0x0 + c:122

+

XF86AudioLowerVolume

+

+

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

+

+

# Toggle mute

+

"amixer set Master toggle"

+

m:0x0 + c:121

+

XF86AudioMute

+

+

=== 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 {{ic|ehci_hcd}}. See [[Kernel_modules#Blacklisting]] for more information.

+

+

Or try disable Laptop-mode.

+

Add {{Ic|!laptop-mode}} to the {{Ic|DAEMONS}} array in {{ic|/etc/rc.conf}}:

+

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

+

+

[https://bbs.archlinux.org/viewtopic.php?pid=1106437#p1106437 This forum post] details another way to have your computer not reboot on shutdown. Turning off the {{ic|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 ===

−

=== Hang on Reboot ===

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 ===

+

=== 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:

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:

Some Media keys

Untested

Laptop Settings

ACPI

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-batAUR from the AUR.

The example values 40 and 80 given here are in percent of the full battery capacity. 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.

Laptop Mode Tools

Synaptics

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:

Turn touchpad on and off

For some, the (Template:Keypress) 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 Template:Keypress to 'toggle the touchpad on and off'. (Tested in i3wm and xfce4, where normal Template:Keypress does not toggle the touchpad)

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.

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: