T480指纹识别支持

目标

通过指纹识别解锁slim-lock

环境

操作系统archlinux

桌面管理器slim

锁屏slimlock

硬件 Thinkpad T480

注: 指纹设备id, 06cb:009a

安装

测试设备 lsusb

1
2
3
4
5
6
7
8
9
10
11
12
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

# 这玩意儿应该就是指纹设备了
Bus 001 Device 005: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader

Bus 001 Device 004: ID 04f2:b604 Chicony Electronics Co., Ltd Integrated Camera (1280x720@30)
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 3044:50e0 MIIIW MW Keyboard Air Mini
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

安装libfprint-vfs009x-git (测试不通过)

yaourt -S libfprint-vfs009x-git

python-vlidity(推荐)

https://github.com/uunicorn/python-validity

安装: yaourt -S python-validity

录入指纹及解锁

fprintd-enroll

按照下述同时,录入指纹,直到completed

1
2
3
4
5
6
7
8
9
10
11
Using device /net/reactivated/Fprint/Device/1
Enrolling right-index-finger finger.
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-completed

校验指纹是否正常fprintd-verify

1
2
3
4
Using device /net/reactivated/Fprint/Device/1
Listing enrolled fingers:
- #0: WINBIO_ANSI_381_POS_RH_INDEX_FINGER
Verify result: verify-match (done)

查看当前用户指纹 fprintd-list 用户名

1
2
3
4
5
found 1 devices
Device at /net/reactivated/Fprint/Device/1
Using device /net/reactivated/Fprint/Device/1
Fingerprints for user zhaozhiwei on DBus driver (press):
- #0: WINBIO_ANSI_381_POS_RH_INDEX_FINGER

ThinkPadT480 slimlock指纹解锁

vim /etc/pam.d/system-local-login

将pam_fprintd.so添加到auth部分的顶部

auth sufficient pam_fprintd.so

重新启动计算机,会提示扫描手指以解锁登录(指纹灯亮)

slimlock认证后直接回车,不需要输入密码

问题列表

Impossible to enroll: GDBus.Error:net.reactivated.Fprint.Error.NoSuchDevice: No devices available

运行fprintd-enroll报错

https://wiki.archlinux.org/title/Lenovo_ThinkPad_T470#Fingerprint_reader

Install fprintd and libfprint-vfs009x-git AUR, then reboot. You can now
enroll your fingers with fprintd-enroll.

github下载很慢

将repository导入到gitee中,并且注意该项目有子模块,
所有需要手动增加.gitmodules

https://gitee.com/zhaozhiwei_1992/libfprint.git

https://gitee.com/zhaozhiwei_1992/libfprint-tod-vfs0090.git

libfprint/meson.build:1:0: ERROR: Unknown options: "x11-examples"

The x11-examples option seems to have been removed. It looks like it's
been replaced by "gtk-examples". I edited that in PKGBUILD and it
built successfully.

https://aur.archlinux.org/packages/libfprint-vfs009x-git

修改build文件, x11-example改成gtk-example

libfprint-vfs009x-git和fprintd >=1.92+版本冲突

安装低版本 sudo pacman -U
https://archive.archlinux.org/packages/f/fprintd/fprintd-1.90.1-1-x86_64.pkg.tar.zst

list_devices failed: No devices available

thinkpad t480 指纹id为 06cb:009a, 上述一些工具不支持,
直接使用python-validity即可