Introduction
I have installed Arch Linux on a Lenovo ThinkPad T14 Gen 4 (Intel) “work” machine. This page outlines some setup items and other issues.
Background
I wanted to get a better laptop for Linux after using it on a poorly supported Surface Book 3, which was a former work laptop that I obtained for free.
The Lenovo ThinkPad T14 Gen 4 (Intel) didn’t have a dedicated Arch Linux page when I bought it (I have since created one), but it does have Ubuntu certification, and other online reports gave me confidence that there wouldn’t be any issues.
This model of laptop was released in May 2023, with the latest release being the Gen 5. A slightly older generation laptop generally means better compatibility with the latest kernels.
This model has soldered RAM, so I made sure to buy it with 32 GB of RAM, which I anticipate will be sufficient for the near future. There aren’t many upgrade/repair options other than changing out the SSD and battery, which was fine for my needs.
In terms of price, I was looking for a cheaper refurbished or open box machine and didn’t want to spend over $1000.
Other models I considered:
Framework 13
- The amount of hardware configuration options seemed overkill for my needs
- Difficult to find refurbished
- Not as established a supplier compared to Lenovo
Lenovo ThinkPad X1 Carbon Gen 11 (December 2022)
- More expensive due to focus on lightness
- No replaceable RAM or batteries
- The lack of a replaceable battery was a dealbreaker
Lenovo ThinkPad T14S Gen 4 (May 2023)
- Would have been my preferred model as it’s slightly lighter than the T14
- Doesn’t have an ethernet port (which I don’t require)
- Less popular than the T14, so couldn’t find any with 32 GB of RAM
Lenovo ThinkPad T14 Gen 5 (May 2024)
- Strongly considered this option
- RAM is replaceable with two DDR5 SO-DIMMs
- Uses a more repair-friendly design
- Being the latest generation, cheaper models hadn’t yet hit the market
- According to a review, the soldered RAM of the Gen 4 might actually improve battery life
Installation
Installation is pretty straightforward.
Set the console font
I haven’t set this before but it seems handy since the default font is very small on modern displays.
setfont sun12x22
Make this persistent:
$ cat /etc/vconsole.conf
FONT=sun12x22
Partition layout
I delete the Windows partition and set the Swap partition the same size as the RAM to enable Hibernation.
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 2099199 2097152 1G EFI System
/dev/nvme0n1p2 2099200 71305215 69206016 33G Linux swap
/dev/nvme0n1p3 71305216 1000214527 928909312 442.9G Linux root (x86-64)
Boot loader
Previously I’ve only ever used Grub so I went with rEFInd which is more graphical and modern.
pacman -S refind
Install
refind-install
This doesn’t give you a working configuration so you need to modify the config file with the correct boot parameters.
$ cat /boot/refind_linux.conf
"Boot with standard options" "rw root=/dev/nvme0n1p3 resume=/dev/nvme0n1p2"
"Boot to single-user mode" "rw root=/dev/nvme0n1p3 single"
"Boot with minimal options" "ro root=/dev/nvme0n1p3"
Post-Installation
Network
pacman -S networkmanager
Enable
systemctl enable NetworkManager.service
Configure
nmtui
Desktop environment
pacman -S gnome
Firmware updates
pacman -S gnome-firmware
Post Post-installation
Stuff I usually do.
Avahi
Install
sudo pacman -S avahi nss-mdns
Enable and start
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
Enable hostname resolution. Modify line in /etc/nsswitch.conf
hosts: mymachines mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
Brother HL-3170CDW printer
Install CUPS
sudo pacman -S cups
systemctl enable cups.service
systemctl restart cups.service
systemctl status cups.service
Install driver
yay -S brother-hl3170cdw
Add printer via CUPS Administration http://localhost:631/admin
Hibernate
The other steps are to configure the initramfs:
- Add ‘resume’
- Regenerate initramfs
Specify the kernel parameter resume=${swap_device}
.
FROM: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation
Jetbrains Mono, Apple and Microsoft fonts
sudo pacman -S ttf-jetbrains-mono
yay -S apple-fonts ttf-ms-win11-auto
Set the default for Visual Studio Code: https://stackoverflow.com/questions/59776906/how-do-i-change-vs-code-settings-to-use-jetbrains-mono-font
SSH Agent
Add this to ~/.bashrc
# ssh-agent modified from: https://wiki.archlinux.org/title/SSH_keys#ssh-agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
Realized that the timeout is set to 1 hour with the “-t 1h” flag. I removed this since it was annoying.
Yay - AUR helper
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
# Don't build debug package. This might break if the PKGBUILD options change
sed -i 's/options=(!lto)/options=(!lto !debug)/' PKGBUILD
makepkg -si
Other packages
Some other packages I install:
sudo pacman -S bash-completion chromium code git go hugo jq rust sudo vim
yay -S freetube
Laptop specific
Battery life
This is generally “good”. It’s not amazing like a MacBook, mostly because it has a much smaller (39300 mWh) battery and is a less optimized Intel processor.
Sound
Install this package to get the sound and microphone to work.
sudo pacman -S sof-firmware
FROM: https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#ALSA_firmware
Suspend and Hibernation
This works great out of the box.
The Lenovo ThinkPad T14 Gen 4 (Intel) only supports “modern suspend” and this is the direction modern chips are going (eliminating S3 suspend).
Previously I thought this was an issue since the Surface Book 3 drains battery while on Suspend. This isn’t an issue on the ThinkPad and I realize this is because Linux is properly supported.