Lenovo ThinkPad T14 (AMD) Gen 3

From ArchWiki

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

Reason: Missing the last IDs in the hardware table and an accessibility section. (Discuss in Talk:Lenovo ThinkPad T14 (AMD) Gen 3)
Hardware PCI/USB ID Working?
GPU 1002:1681 Yes
Wireless 17cb:1103 Yes
Bluetooth 17cb:1103 Yes
Webcam 04f2:b74f Yes
TrackPoint Yes
Touchpad 06cb:00f9 Yes
Fingerprint reader Yes
Smartcard reader 058f:9540 Yes
Mobile broadband 2c7c:030a Yes

This article covers the installation and configuration of Arch Linux on a Lenovo Thinkpad T14 (AMD) Gen 3 21CFCT01WW laptop. Everything seems to work pretty much out the box with linux≥5.19.0, except the keyboard does not feel the same as the first generation and the battery life is not great.

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

Firmware

Warning:
  • If you run system firmware version 0.1.17 do not set the suspend mode in UEFI setup to Linux (S3). This sleep mode is not supported by the CPU. If you set S3 mode and upgrade the system firmware you need to do a downgrade to 0.1.17 to change it back, because the option is removed in newer firmware. If you set S3 mode nevertheless and try to suspend to mem/S3 mode the system will crash and you need to reset it by holding the power button for a few seconds. s2Idle works even in S3 mode but the power consumption is much higher with 4W instead of 0.5W and would drain the battery very fast.
  • If you already set the firmware to S3 mode and upgrade to a newer firmware, you can find the older firmware upgrade iso image on the lenovo support page for your device under bios. There you need to click on the small document symbol named "details" to see the older versions. Before you can do a downgrade you have do disable the UEFI rollback prevention under security in the UEFI setup.

fwupd

fwupd supports the UEFI BIOS, the webcam, the touchpad, the CPU/GPU, TPM and the NVMe controller.

Sleep to idle (s2idle, S0ix)

According to Lenovo staff the CPU generation in this device only supports s2idle and not S3 sleep.

See Power management/Suspend and hibernate#Changing suspend method.

Suspend/Hibernate

There is a known bug in the ath11k module that could block the resume process, freeze the graphics interface and cause loss of wireless card interface. A manual fix is to disable the ath11k_pci module before hibernate and re-enable it after resume.

This also seems to fix an intermittent issue causing the laptop to immediately wake up after suspend.

See Dell XPS 13 (9310)#Wifi for a systemd service to automate this procedure.

This can be automated via sleep hooks - if the module is unloaded before hibernating or suspending it unloads immediately with no delay, and the resume kernel bug does not happen:

/etc/systemd/system/ath11k-suspend.service
[Unit]
Description=Suspend: rmmod ath11k_pci
Before=sleep.target

[Service]
Type=simple
ExecStart=/usr/bin/rmmod ath11k_pci

[Install]
WantedBy=sleep.target
/etc/systemd/system/ath11k-resume.service
[Unit]
Description=Resume: modprobe ath11k_pci
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/bin/modprobe ath11k_pci

[Install]
WantedBy=suspend.target

You need to enable ath11k-suspend.service and ath11k-resume.service.

Disable wakeup from sleep on touchpad activity

Use the following to disable wake-up events caused by the touchpad. Note that this only applies to the touchpad itself and the integrated buttons for left/right click at its bottom, not the 3 buttons at its top or any other input.

/etc/udev/rules.d/99-disable-touchpad-wakeup.rules
KERNEL=="i2c-ELAN0678:00", SUBSYSTEM=="i2c", ATTR{power/wakeup}="disabled"
Tip: You can find the device name with grep -i touchpad -A 1 /proc/bus/input/devices.

Quectel EM05-G 4G LTE Modem

The integrated modem is supported by default, but you need a custom FCC unlock script for ModemManager. This script should be located at /usr/share/ModemManager/fcc-unlock.available.d/2c7c and has to be linked from /etc/ModemManager/fcc-unlock.d/2c7c:030a

/usr/share/ModemManager/fcc-unlock.available.d/2c7c
 #!/bin/bash

# SPDX-License-Identifier: CC0-1.0
# 2022 Leah Oswald <mail@leahoswald.de>
#
# Queltec EM05-G FCC unlock mechanism
#

# require program name and at least 2 arguments
[ $# -lt 2 ] && exit 1

# first argument is DBus path, not needed here
shift

# second and next arguments are control port names
for PORT in "$@"; do
  # match port name
  echo "$PORT" | grep -q cdc-wdm && {
    CDC_WDM_PORT=$PORT
    break
  }
done

# fail if no cdc-wdm port exposed
[ -n "$CDC_WDM_PORT" ] || exit 2

# run mbimcli operation
mbimcli --device-open-proxy --device="/dev/$CDC_WDM_PORT" --quectel-set-radio-state=on
exit $?

Then link them:

# ln -s /usr/share/ModemManager/fcc-unlock.available.d/2c7c /etc/ModemManager/fcc-unlock.d/2c7c:030a

After that everything should work normal.

There is an issue at the ModemManager Gitlab to add this script to make this obsolete in the future.

Function keys

Key Visible?1 Marked?2 Effect
Fn Yes No XF86WakeUp
Fn+Esc No Yes Toggles the Fn lock
Fn+F1 Yes Yes XF86AudioMute
Fn+F2 Yes Yes XF86AudioLowerVolume
Fn+F3 Yes Yes XF86AudioRaiseVolume
Fn+F4 Yes Yes XF86AudioMicMute
Fn+F5 Yes Yes XF86MonBrightnessDown
Fn+F6 Yes Yes XF86MonBrightnessUp
Fn+F7 Yes Yes XF86Display
Fn+F8 Yes Yes XF86WLAN
Fn+F9 Yes Yes XF86NotificationCenter
Fn+F10 Yes Yes XF86PickupPhone
Fn+F11 Yes Yes XF86HangupPhone
Fn+F12 Yes Yes XF86Favorites
Fn+End Yes No Insert
Fn+4 Yes No XF86Sleep
Fn+Tab Yes No XF86FullScreen
Fn+s Yes No Alt_L Alt_L+Sys_Req
Fn+d No No Toggles the PrivacyGuard feature
Fn+k Yes No Scroll_Lock
Fn+p Yes No Pause
Fn+b Yes No Pause
Fn+Right Shift Yes No XF86FnRightShift
Fn+Space No Yes Controls the keyboard backlight
Fn+Print Yes No XF86SelectiveScreenshot
Fn+Left Arrow Yes No Home
Fn+Right Arrow Yes No End
  1. The key is visible to xev and similar tools
  2. The physical key has a symbol on it, which describes its function

Mute Mic LED always on

There is an issue where the LED light on the mic button is always on.

udev rule

There is a scripting fix below this section, but it might be easier to just create an udev rule that sets the trigger to the audio-micmute trigger.

/etc/udev/rules.d/micmute-led.rules
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="platform::micmute" ATTR{trigger}="audio-micmute"

scripting

A quick fix is running a simple script at startup and in conjecture with a hotkey daemon.

If the integer in the file /sys/class/leds/platform\:\:micmute/brightness is 1 the light is on, if its 0 its of.

#!/bin/bash

if pactl list sources | grep -A 5 "Family 17h/19h HD Audio Controller Digital Microphone" | grep -q 'Mute: yes'; then
  echo 1 | sudo tee /sys/class/leds/platform\:\:micmute/brightness
else
  echo 0 | sudo tee /sys/class/leds/platform\:\:micmute/brightness
fi

Alternatively, it is possible to have the microphone LED work in tandem with the mute status.

# echo -n 7 > /sys/class/sound/card1/controlC1/led-mic/detach

This can be automated with a service.

/etc/systemd/system/ath11k-suspend.service
[Unit]
Description=Fix the Microphone LED to follow Mic status

[Service]
ExecStart=/usr/bin/sh -c 'echo -n 7 > /sys/class/sound/card1/controlC1/led-mic/detach'

[Install]
WantedBy=multi-user.target

Enable and start the service

Audio

Install sof-firmware.

See also