I finally got my hands on a second hand ThinkPad at a good price. It turned out to be in as-new condition, including a battery that had only had a few charge cycles and was in 100% health.
I’m using this machine as my only PC now, with a USB-C dock at home for monitor, mouse and keyboard and so the ThinkPad is often continuously plugged in to power.
Gnome power settings has a nice toggle, for “maximise charging” or “preserve battery health” but the default state of charge thresholds option are set a little too high for my understanding of battery chemistry. You can adjust them to keep the battery charge between 40% and 50% by making the following changes:
Create a file /etc/udev/hwdb.d/61-battery-local.hwdb containing:
battery:*:*:dmi:*
CHARGE_LIMIT=40,50
Then make the changes active:
$ systemd-hwdb update
$ udevadm trigger -v
$ systemctl daemon-reload
$ systemctl restart upower
You can check the current settings by looking at the contents of the files /sys/class/power_supply/BAT0/charge_start_threshold and /sys/class/power_supply/BAT0/charge_stop_threshold