Important
This has been tested on 2016 ThinkPad X270.
Made for the ID 138a:0097 Validity Sensors, Inc.
scanner.
https://www.youtube.com/watch?v=oYyE5cBVhgk
~ lsusb
Bus 001 Device 007: ID 138a:0097 Validity Sensors, Inc.
(It might work with a different scanner, you can try it.)
Install python-validity:
yay -S python-validity
Note
You might need to install libfprint-vfs009x-git
in addition if it doesn't work alone, I am not sure yet
fprintd-enroll
fprintd-verify
Normally, the reader stops working after suspending your laptop, so here is a fix:
sudo nano /etc/systemd/system/restart_fprintd_after_sleep.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
sudo systemctl enable --now restart_fprintd_after_sleep.service
Now, to activate the reader after running sudo, add this on top of /etc/pam.d/system-auth
:
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_fprintd.so
You can enable fingerprint login in swaylock, by adding the same code into /etc/pam.d/swaylock
.
Or on your login screen (ly, etc.) (/etc/pam.d/system-login
), SDDM (/etc/pam.d/sddm
), ...
From python-validity
If fprintd-enroll
returns with
list_devices failed:
or
GDBus.Error:net.reactivated.Fprint.error.NoSuchDevice
you can check the logs of the python3-validity
daemon using
sudo systemctl status python3-validity
If it's not running, you can enable and/or start it by substituting status
with enable
or start
.
If systemctl status python3-validity
complains about errors on startup, you may need to factory-reset the fingerprint chip. Do that like so:
sudo systemctl stop python3-validity
sudo validity-sensors-firmware
sudo python3 /usr/share/python-validity/playground/factory-reset.py
sudo systemctl start python3-validity
fprintd-enroll
At some of the above points you may get a Device busy
error, depending on how systemctl plays along. Kill offending processes if necessary, or re-run systemctl stop python3-validity
, in case it has automatically been restarted.