Lenovo ThinkPad T470

From ArchWiki
Jump to navigation Jump to search

Tango-edit-clear.pngThis article or section does not follow the Laptop page guidelines.Tango-edit-clear.png

Reason: lspci/lsusb dumps do not belong into laptop pages. Some specific sub-models need function key and hardware tables. (Discuss in Talk:Lenovo ThinkPad T470#)

This article covers the installation and configuration of Arch Linux on a Lenovo T470 laptop. There are several sub-models of this laptop, see below for details.

For a general overview of laptop-related articles and recommendations, see Laptop.

Firmware (e.g. bios and peripherals)

The T470 is one of the models supported officially by Lenovo through the fwupd firmware update program.

If you are using a UEFI boot scheme, this is probably the easiest and most officially supported way to keep all the firmware programs updated.

Note: Users have observed a BIOS requirement of "UEFI/Legacy Boot" set to "UEFI Only" and enable Windows UEFI Firmware Update under UEFI BIOS Update Options when using fwupd.

If it does not work for you or if you prefer these methods, it is still possible to do the BIOS update by booting on a specially crafted disk or USB stick. By visiting the downloads section (T470) an ISO can be downloaded and burned to disk which will perform the update from Lenovo. Or extracted and copied on a USB Stick.

Another option that works if you got a CD-ISO from Lenovo is to follow this guide and convert the ISO to an IMG prior to dd-ing it to a USB stick.

Kernel and hardware support

Hardware video acceleration with Kaby Lake seems to work fine via va-api.

As noted in Intel graphics, the xf86-video-intel driver seems to cause more issue than the builtin modesetting Xorg driver. Works fine without the intel driver (on a Skylake configuration).

suspend-resume results in the fan holding at 100% without ever spinning down. This is being tracked on the kernel bugtracker. The issue seems to be resolved by BIOS 1.43.

Fingerprint reader

As of writing this, the fingerprint reader is still under prototype development, but looks like working fine on the T470.

To get the sensor working, it first must be initialized with data. This currently only works with Windows (this is no longer true, see note below). So if you had used the reader before installing Arch, this should work fine. Otherwise install a Windows version in a virtualbox, connect the Validity Sensor over USB(USB 2.0), install the drivers and use it a few times.

Note: This is not yet in the upstream version of libfprint2, but there is a method for enrolling fingerprint data into the Validity Sensors 138a:0097 device only using Linux. The way to do so is here:

https://gitlab.freedesktop.org/3v1n0/libfprint/-/tree/vfs0090-libfprint2

This uses the package validity-sensors-tools-gitAUR. Now, this may not work, as the fingerprint device may return a data structure that does not match the expected size/length when loading the driver. If the above libfprint driver does not work for you, and you see errors about a length mismatch in the journal, the following fork of the above project has a fix for this:

https://github.com/piotrekzurek/libfprint

With either of these drivers loaded, Windows should no longer be necessary to initialize the Validity Sensors fingerprint reader. Users may want to set up Pacman#Hooks to rebuild this driver whenever the kernel is upgraded.

As soon as this step is completed, the sensor can be used under Linux. Install fprintd and libfprint-vfs009x-gitAUR, then reboot. You can now enroll your fingers with fprintd-enroll.

After setting up the fingerprint sensor is complete, one can use it to login or authenticate for sudo or su.

For login, edit /etc/pam.d/login by adding pam_fprintd.so as sufficient to the top of the auth section:

/etc/pam.d/login
auth sufficient pam_fprintd.so
...

Do the same for sudo with /etc/pam.d/sudo or su with /etc/pam.d/su

For more information visit libfprint and adapt for the vfs0097 package.

Screen backlight

Without the intel driver (xf86-video-intel), neither xbacklight or xrandr brightness control are working. It is possible that, with the good acpi_* kernel parameters, the backlight related keys do their job.

Other workaround exists, such as described on this post or in the wiki acpid#Enabling backlight control. Using the acpilight package as a xbacklight replacement works well. You can also check this repository as a base to add the ACPI rules to call xbacklight when backlight keys are pressed.

Note: The acpilight package is known to allow controlling the ThinkPad keyboard backlight. Similar ACPI rules should allow to toggle it when the keyboard backlight key is pressed.

Thunderbolt 3

With the latest kernel (4.12.12 as of writing), the Alpine Ridge thunderbolt 3 controller is recognized without any additional configuration. Using a generic thunderbolt 3 to HDMI + USB3 hub works out of the box (the HDMI output is recognized by xrandr as DP-1 output).

UEFI boot

After configuring the BIOS setup to allow UEFI boot (either UEFI only or both), it works flawlessly.

For booting directly with EFISTUB the kernel executable (e.g. vmlinuz-linux) may need to be renamed with a .efi extension (e.g. vmlinuz-linux.efi) otherwise it will fail to load.

BIOS GPT boot

Note: I was unable to boot with a GPT + BIOS configuration, and therefore switch to GPT + EFI. However, until another confirmation, it is quite probable that was caused by some bad configuration from my side.

I can confirm that issue. Even with a recent bios (1.52), it does not work.

I had to trick my ThinkPad into UEFI (because my bios is locked, found that method by pure luck). It works by installing the syslinux bootloader on your freshly installed arch (be sure to follow the GPT specific instructions at Syslinux#GUID partition table) and the boot that syslinux with the arch install iso ('Boot existing OS' -> press TAB -> replace hd0 0 with hd1 0). Syslinux should show you an option to boot the ArchLinux installation in UEFI mode. Mount you Arch installation, arch-chroot into it and install GRUB (or your favorite bootloader) for UEFI. That did the trick for me.

You have to create a proper UEFI partition. Have a look at partitioning.

Special buttons

Some special buttons are not supported by X server due to keycode number limit.

Key combination Scancode Keycode
Fn+F11 0x49 374 KEY_KEYBOARD
Fn+F12 0x45 364 KEY_FAVORITES

You can remap unsupported keys using udev hwdb:

/etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb
evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
 KEYBOARD_KEY_45=prog1
 KEYBOARD_KEY_49=prog2

Update hwdb after editing the rule.

# udevadm hwdb --update
# udevadm trigger --sysname-match="event*"

Sub-models

20K7 (aka ThinkPad 25th Anniversary Edition)

Very specific model, released in 2017 as a celebration of the entire IBM/Lenovo ThinkPad line. Comes with a dual-core Intel Core i7-7500U CPU @ 2.70GHz.

Function keys

Special Key Visible?1 Marked?2 Effect
Fn Yes Yes XF86WakeUp
Fn+F1 No No No Effect
Fn+F2 Yes Yes XF86ScreenSaver
Fn+F3 Yes Yes XF86Battery
Fn+F4 Yes Yes XF86Sleep
Fn+F5 Yes Yes XF86TouchpadToggle
Fn+F6 Yes Yes XF86WebCam
Fn+F7 Yes Yes XF86Display
Fn+F8 Yes Yes XF86WLAN
Fn+F9 Yes Yes XF86Tools
Fn+F10 Yes Yes XF86Bluetooth
Fn+F11 No Yes No Effect
Fn+F12 Yes Yes XF86Favorites
Fn+Home No Yes XF86MonBrightnessUp
Fn+End No Yes XF86MonBrightnessDown
Fn+PgUp No Yes Cycle Keyboard Backlight
Mute Speaker Yes Yes XF86AudioMute
Volume Down Yes Yes XF86AudioLowerVolume
Volume Up Yes Yes XF86AudioRaiseVolume
Mute Microphone Yes Yes XF86AudioMicMute
Fn+Left Yes Yes XF86AudioPrev
Fn+Up Yes Yes XF86AudioStop
Fn+Down Yes Yes XF86AudioPlay
Fn+Right Yes Yes XF86AudioNext
Menu Yes Yes Menu
Back Yes Yes XF86Back
Forward Yes Yes XF86Forward
  1. The key is visible to xev and similar tools
  2. The physical key has a symbol on it, which describes its function

Hardware

All hardware working with stock Arch linux kernel 5.11.10-arch1-1

Device PCI/USB ID Working?
Intel graphics 8086:5916 Yes
NVIDIA graphics 10de:134d Yes
Wireless 8086:24fd Yes
Bluetooth 8087:0a2b Yes
Webcam 5986:111c Yes
IR Camera 5986:111d Yes
TrackPoint Yes
Touchpad Yes
Touchscreen 2386:310e Yes
Fingerprint Reader 138a:0097 Yes

20HD

Kernel '4.10.13-1-ARCH'

lspci

00:00.0 Host bridge: Intel Corporation Device 5904 (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #7 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation Device 9d1a (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device 9d58 (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-V (rev 21)
04:00.0 Network controller: Intel Corporation Device 24fd (rev 78)
3e:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a804

lsusb

Bus 002 Device 007: ID 0bda:0316 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 138a:0097 Validity Sensors, Inc. 
Bus 001 Device 005: ID 5986:111c Acer, Inc 
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

20JN

Quite specific model, comes with a 6th generation Intel processor (Skylake) instead of a Kaby Lake like most T470 models. Output of lspci and lsusb with kernel 4.12.12-1.

lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #7 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation Device 9d1a (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection I219-LM (rev 21)
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
05:00.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
06:00.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
06:01.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
06:02.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
3d:00.0 USB controller: Intel Corporation Device 15c1 (rev 01)

lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

20HD,20HE(Campus model)

lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #7 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation Device 9d1a (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-V (rev 21)
04:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
3e:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

lsusb

Bus 002 Device 003: ID 0bda:0316 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 138a:0097 Validity Sensors, Inc. 
Bus 001 Device 003: ID 5986:111c Acer, Inc 
Bus 001 Device 002: ID 8087:0a2b Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

See also