Configure Lenovo Thinkpad T480s fingerprint reader on Debian Bullseye

fingerprint

The fingerprint sensor on Lenovo Thinkpad T480s is not supported by libfprint, so you can’t use it out of the box. Thankfully, there’s a project called python-validity based on open-fprintd that’s easy to set up in, like, 5 minutes.

Setup

python-validity is available from open-fprintd PPA. I found that you can use Ubuntu Kinetic packages on Debian Bullseye without issues.

To add the PPA repository and install the necessary utilities, run the following commands:

sudo wget 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2937db010da51096cd4277ff8d4c774ba6d18f90' -O /etc/apt/trusted.gpg.d/uunicorn.asc

echo -e 'deb [signed-by=/etc/apt/trusted.gpg.d/uunicorn.asc] https://ppa.launchpadcontent.net/uunicorn/open-fprintd/ubuntu kinetic main\n#deb-src [signed-by=/etc/apt/trusted.gpg.d/uunicorn.asc] https://ppa.launchpadcontent.net/uunicorn/open-fprintd/ubuntu kinetic main' | sudo tee /etc/apt/sources.list.d/uunicorn-open-fprintd.list

sudo apt update && sudo apt install -V open-fprintd fprintd-clients python3-validity

Afterward, run the fprintd-enroll command and scan your fingerprint multiple times. For accurate fingerprint detection, it helps to scan your fingerprint at slightly different angle each time.

fprintd-enroll

Finally, enable the sudo authentication with the fingerprint method:

sudo pam-auth-update

Suspend/hibernate fingerprint sensor fix

I had a problem with the fingerprint sensor not working when the laptop was resuming from suspend and hibernate. In my case, enabling open-fprintd-resume and open-fprintd-suspend didn’t help, but a custom one-shot Systemd unit (as suggested on the Arch wiki did the trick.

This one-shot simply restarts open-fprintd and python3-validity services when resuming from suspend/hibernate. To install it, simply run:

cat << EOF | sudo tee /etc/systemd/system/fingerprint-restart.service
[Unit]
Description=Restart services to fix fingerprint integration
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

[Service]
Type=oneshot
ExecStart=systemctl restart open-fprintd.service python3-validity.service

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable fingerprint-restart.service

Oh, would you look at the time! Exactly 5 minutes 🙂