ArchiLinux on Thinkpad P16 Gen2
Table of Contents
Introduction
Nearly everything works out of the box.
The following is the list of things which took me a bit more to configure.
Before installation
One of the NVMe disks was not using the optimal block size and, following https://wiki.archlinux.org/title/Advanced_Format, I reformatted it.
Fingerprint
- Install
fprintd
Sound
- Install
sof-firmware
Webcam
- Install
libuvc
.
Fan Control
This took me a bit more time, since the instructions on the ArchWiki do not work if you follow the “nominal” flow.
The main issue is fan control needs to be explicitly enabled in
thinkpad_acpi
at boot.
There are two options:
zcfan
thinkfan
Enable fancontrol at runtime
(Re)load the thinkpad_acpi
module enabling fancontrol
:
echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkfan.conf sudo modprobe -rv thinkpad_acpi sudo modprobe -v thinkpad_acpi
(Snippet adapted from https://github.com/vmatare/thinkfan/issues/45#issuecomment-658830584.)
Enable fancontrol at boot
thinkpad_acpi
is early loaded and fancontrol=1
must be set as a kernel
parameter.
Set thinkpad_acpi.fan_control=1
in /etc/default/grub
and rebuild the
configuration (https://wiki.archlinux.org/title/Kernel_parameters).
Test fans can be controlled
Test that fans can be controlled:
cat /proc/acpi/ibm/fan echo level 1 > /proc/acpi/ibm/fan
zcfan
zcfan is a zero-configuration fan control system. Install it, enable it and you should be ready to go.
thinkfan
Install thinkfan
from the AUR
yaah thinkfan cd thinkfan makepkg -si
Fancontrol requires a bit of configuration, an example is provided by the Gentoo Wiki. This is also suggested in the ArchWiki — https://wiki.gentoo.org/wiki/Fan_speed_control/thinkfan#Configuration):
cat > /etc/thinkfan.conf sensors: - tpacpi: /proc/acpi/ibm/thermal indices: [0] fans: - tpacpi: /proc/acpi/ibm/fan levels: - [0, 0, 41] - [1, 38, 51] - [2, 45, 56] - [3, 51, 61] - [4, 55, 64] - [5, 60, 66] - [6, 63, 68] - [7, 65, 74] - [127, 70, 32767]
Another possibility is having a look at the following resources:
- Thinkfan setup, which also provides some hints on how to view temperatures
man 5 thinkfan.conf
Enable the thinkfan
service and reboot:
systemctl enable thinkfan.service reboot -h now
Hibernation
When trying to hibernate, the system would immediately deactivate
and journalctl
would report the following:
Nov 15 10:03:01 coridan systemd[1]: Starting Hibernate... Nov 15 10:03:01 coridan systemd-sleep[3726]: Entering sleep state 'hibernate'... Nov 15 10:03:11 coridan systemd-sleep[3726]: System returned from sleep state. Nov 15 10:03:11 coridan systemd[1]: systemd-hibernate.service: Deactivated successfully. Nov 15 10:03:11 coridan systemd[1]: Finished Hibernate. Nov 15 10:03:11 coridan systemd[1]: systemd-hibernate.service: Consumed 1.667s CPU time.
The solution, which is in the ArchWiki (and also at this link:
https://forum.manjaro.org/t/thinkpad-p16-sleep-and-hibernation-problems/134682/8),
consists in setting the hibernation mode to shutdown
:
cat > /etc/systemd/sleep.conf.d/hibernate_mode.conf [Sleep] HibernateMode=shutdown