These are my installation-tricks and notes for running Linux on a 2021 Thinkpad
P14s Gen2 with AMD Ryzen 7 5850U. It should also be suitable for the Thinkpad T14 Gen2 AMD as they are technically the same modell.
Meanwhile there is also a good test on youtube and an entry in the arch-wiki, which also comments some points mentioned here.
- Host: 21A1S00D.00 ThinkPad P14s Gen 2a
- Resolution: 1920x1080
- CPU: AMD Ryzen 7 PRO 5850U
- GPU: integrated Vega 8
- Memory: 16 GB
- SSD: 1 TB (Samsung)
- additional 16 GB RAM (Crucial 3200 MHz SO-DIMM)
- Intel AX210 WiFi 6E
At first I used Fedora 34, which worked good. But with the upgrade to kernel 5.14 the ethernet interface stopped working, which drove me mad. So I decided to checkout the fresh Ubuntu 21.10 on kernel 5.13. After release of Fedora 35 (with which the ethernet interface works again) I switched back to Fedora again, because of personal preferences. Meanwhile there is Kernel 5.16 in Fedora 35 which added a lot of improvements.
I strongly recommend to use a Distribution with a recent kernel instead of a LTS-version as they will support this laptop better with every release.
I used the automatic partitioning of the GUI-fedora-Installer with Btrfs. Everything else was also set to default.
There were some really annoying problems with this laptop on kernels <5.16, which are now almost gone:
The most obvious problem after installation is the non-existence of the Wifi-interface, so I had to use a LAN-cable first. The problem is the Realtek chip 8852AE, which is built in the AMD-version of this laptop. The drivers for this card are not in the linux-kernel yet (kernel 5.13 and 5.14). The best way out in my opinion is to change the card to a well supported Intel one. Since Kernel 5.16 the realtek-card is officially supported, so the following steps are obsolete.
Because I got nerved by the fact that I had to install the kernel module for the Realtek card with every (little) kernel-update, I bought the Intel AX210 M.2-Module for 13€ and placed it in the slot of the Realtek module. Works out of the box, is fast and supports Wifi6E (only tested Wifi6). This should also work with the Intel AX200, as some guy on reddit said.
AX201 and AX211 should not work because of the wrong card format. Congratulations to Intel for the great driver support. With the AX210 I get theoretical Wifi speed of 1400 MBit/s with my Wifi6 Access Point (Unifi 6 LR).
There is a github-repo (https://github.com/lwfinger/rtw89), where you can find the suitable driver, with these commands:
sudo dnf install make automake gcc git gcc-c++ kernel-devel
git clone https://github.com/lwfinger/rtw89.git -b v5
cd rtw89
make
sudo make install
sudo modprobe rtw89pci
If you get an error on make
you may have to restart the machine and try it again.
After finishing you should be able to use Wifi as desired.
When you update to a newer kernel (and reboot), you have to activate this modul again with the following steps:
cd rtw89
make clean
make
sudo make install
sudo modprobe rtw89pci
It sounds like this driver is on a good way to get into the kernel. (But I could not wait longer when I heard that you can easily change the card). According to the arch-wiki the driver for the realtek-card will be added in kernel 5.16.
Kernels <5.16 did not support S0ix-sleep with the AMD CPU, but the fix is easy: Go to BIOS-Settings - Config - Energy-Optimization - select Linux instead of Windows 10. This will use S3-sleep instead of S0ix.
Since 5.16 you can use also S0ix (Windows-setting in BIOS), which also consumes less energy than S3 as @evanslify mentioned in the comments below. With S0ix the Laptop will take about ten seconds to startup after sleep, you can resolve this by adding iommu=pt
to your kernel parameters (e.g. with grubby):
sudo grubby --args="iommu=pt" --update-kernel=ALL
This will make waking up as fast as with S3.
Thanks to evanslify@
The following is broken on Firefox 98, so I use chromium at the moment...
The fan tends to get loud when you stream videos in firefox, especially in higher resolutions. FullHD videos even started stuttering. At first I installed optional video codecs for Fedora:
[activate RPMfusion free and nonfree]
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
[enable codecs]
sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf groupupdate sound-and-video
I also had to manually activate the cisco H.264-plugin in firefox. Open about:addons
and activate the OpenH264-Plugin. This made the noise and the stuttering better but it did not go away.
The trick did hardware-acceleration in Firefox:
[RPMfusion needed]
sudo dnf install ffmpeg libva libva-utils
In about:config
you have to set two parameters to true and restart firefox:
gfx.webrender.enabled = True
media.ffmpeg.vaapi.enabled = True
This did the trick, videos are played smooth up to 4K and the fan stays quiet.
With Gnome 40/41 energy-saving-functions are integrated which are not compatible with tlp. So you can either use tlp or the new feature of gnome 41. I checked both and it feels like the battery lasts longer on the standard-gnome-feature and not tlp. I did not really test it, it's only my personal feeling.
To install TLP for battery tuning:
dnf install tlp tlp-rdw
After that you can start tlp with sudo tlp start
, it recommended me to install two other tools for more optimizations:
[RPMfusion needed]
sudo dnf install http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm
sudo dnf install akmod-acpi_call smartmontools
With this tool you can set loading treshholds, recalibrate the battery and much more...
Since kernel 5.17 you can manually activate the p-state support for the Ryzen CPU. This will allow your CPU to lower the clock down to 400 MHz instead of 2.2 GHz. The activation can easily be done by activating the p-state kernel module and deactivating the legacy module. It is described here. The effect is not that ground-breaking as I hoped.
I did not get to work thinkfan, but the fan is really quiet after hw-acceleration in firefox is activated.
I am still fighting to get my bluetooth-headphones to work correctly. For Ubuntu I installed pipewire instead of pulseaudio, which is already standard in Fedora. In Fedora you also need a special package for aptX-support:
[RPMfusion free needed]
sudo dnf install pipewire-codec-aptx
But it still does not work perfectly, I will add new tricks, if I find something. After a few weeks I think the problem is multidevice-bluetooth and Linux. With Apple- and Windwos-Devices this works better, with Linux I often need to disconnect all other devices.
Works well on Linux, I'm excited to newer kernels for even better support. Battery life could really be better. I hope it will get better with better kernel support of the AMD 5000 APUs.
Comment useful tricks and thanks for all those hacks :)
- 02.04.2022: update to kernel 5.16-improvements and add battery-measurements of @evanslify
- 17.06.2022: integrate 5.17 p-state improvements
I sold my Thinkpad, because I was really annoyed of the battery-life and other problems popping in. In favor I now bought a ARM-based machine with another UNIX based system. Thanks to everyone for help and tips. I will let this piece online for further help ;)
don´t forget: this ist the BIOS update for the Intel T14/P14s