指纹一直没怎么用. 主要手上容易有汗. 心血来潮装了下驱动. 发现全网都没有T470P的. 只有x270和t460p的
查看型号, validity 这个就是指纹sensor
首先安装指纹识别
apt-get install fprint-demo fprintd
发现no device, 说明没有驱动.
lsusb
Bus 001 Device 003: ID 138a:0097 Validity Sensors, Inc.
搜了下驱动, freedesktop 有个, 说不支持t470p
https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices
不死心, 找到魔改的
https://github.com/3v1n0/libfprint
git clone 下来, 安装meson和ninja, 下面是依赖流水帐
#lsusbBus 001 Device 003: ID 138a:0097 Validity Sensors, Inc.
#git clone https://github.com/3v1n0/libfprint.gitlibfprint/libfprint/fprint-list-udev-rules.c
libfprint/drivers/vfs0090/vfs0090.c#apt-get install meson#meson libfprint libfprint/_buildDependency gusb found: NO (tried pkgconfig and cmake)meson.build:83:0: ERROR: Dependency "gusb" not found, tried pkgconfig and cmake#apt-get install libgusb-devependency nss found: NO (tried pkgconfig and cmake)
meson.build:152:12: ERROR: Problem encountered: NSS is required for the Validity VFS009x drivers查看依赖
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Reference/NSS_Certificate_Functions
#apt install libnss3-devlibfprint/meson.build:318:4: ERROR: Program(s) ['g-ir-scanner'] not found or not executable
#apt-get install gobject-introspectionProgram gdb found: NOProgram valgrind found: NOBuild targets in project: 22#apt-get install gdb valgrind重新编译, 提示错误, cd libfprint, cat .gitignore 发现了忽略_build
#rm -rf _build#meson libfprint libfprint/_build成功
#ninja -C libfprint/_build installCouldn't find include 'Gio-2.0.gir' (search path: '['gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0']')
#apt-get install libgirepository1.0-devFileNotFoundError: [Errno 2] No such file or directory: 'gtkdoc-scan': 'gtkdoc-scan'
#apt-get install -y gtk-doc-toolsWarning: multiple "IDs" for constraint linkend: FpImage.In gtk-doc.xsl: For acronym (transfer full) no value found!In gtk-doc.xsl: For acronym (type) no value found!In gtk-doc.xsl: For acronym (element-type) no value found!In gtk-doc.xsl: For acronym (transfer container) no value found!In gtk-doc.xsl: For acronym (nullable) no value found!In gtk-doc.xsl: For acronym (type) no value found!In gtk-doc.xsl: For acronym (nullable) no value found!In gtk-doc.xsl: For acronym (type) no value found!In gtk-doc.xsl: For acronym (transfer floating) no value found!
...
html/libfprint-2-FpContext.html:159: warning: no link for: "GPtrArray" -> (<span class="type">GPtrArray</span>).
html/libfprint-2-FpContext.html:159: warning: no link for: "GUsbDevice" -> (<span class="type">GUsbDevice</span>).
html/libfprint-2-FpDevice.html:406: warning: no link for: "GError" -> (<span class="type">GError</span>).
html/libfprint-2-FpDevice.html:439: warning: no link for: "NULL:CAPS" -> (<code class="literal">NULL</code>).
html/libfprint-2-FpDevice.html:730: warning: no link for: "GCancellable" -> (<span class="type">GCancellable</span>).
html/libfprint-2-FpDevice.html:731: warning: no link for: "GAsyncReadyCallback" -> (<span class="type">GAsyncReadyCallback</span>).
html/libfprint-2-FpDevice.html:824: warning: no link for: "GDestroyNotify" -> (<span class="type">GDestroyNotify</span>).
html/libfprint-2-FpDevice.html:1188: warning: no link for: "GAsyncResult" -> (<span class="type">GAsyncResult</span>).
html/libfprint-2-FpDevice.html:1221: warning: no link for: "FALSE:CAPS" -> (<code class="literal">FALSE</code>).
html/libfprint-2-FpDevice.html:1221: warning: no link for: "TRUE:CAPS" -> (<code class="literal">TRUE</code>).
html/libfprint-2-FpDevice.html:2115: warning: no link for: "G-IO-ERROR:CAPS" -> (<span class="type">G_IO_ERROR</span>).
html/libfprint-2-FpDevice.html:2115: warning: no link for: "G-USB-DEVICE-ERROR:CAPS" -> (<span class="type">G_USB_DEVICE_ERROR</span>).
html/libfprint-2-FpPrint.html:475: warning: no link for: "GDate" -> (<span class="type">GDate</span>).
html/libfprint-2-Image-frame-assembly.html:105: warning: no link for: "GSList" -> (<span class="type">GSList</span>).
html/libfprint-2-Internal-FpDevice.html:846: warning: no link for: "GSource" -> (<span class="type">GSource</span>).
html/libfprint-2-Internal-FpImageDevice.html:391: warning: no link for: "change-state" -> (<code class="function">change_state()</code>).
html/libfprint-2-Logging.html:128: warning: no link for: "g-debug" -> (<code class="function">g_debug()</code>).
html/libfprint-2-Logging.html:142: warning: no link for: "g-warning" -> (<code class="function">g_warning()</code>).
html/libfprint-2-Logging.html:149: warning: no link for: "g-critical" -> (<code class="function">g_critical()</code>).
html/libfprint-2-Logging.html:150: warning: no link for: "g-assert" -> (<code class="function">g_assert()</code>).
html/libfprint-2-Sequential-state-machine.html:761: warning: no link for: "fpi-ssm-set-ssm-data" -> (<code class="function">fpi_ssm_set_ssm_data()</code>).
html/libfprint-2-USB-transfer-helpers.html:366: warning: no link for: "GUsbDeviceDirection" -> (<span class="type">GUsbDeviceDirection</span>).
html/libfprint-2-USB-transfer-helpers.html:367: warning: no link for: "GUsbDeviceRequestType" -> (<span class="type">GUsbDeviceRequestType</span>).
html/libfprint-2-USB-transfer-helpers.html:368: warning: no link for: "GUsbDeviceRecipient" -> (<span class="type">GUsbDeviceRecipient</span>).
html/libfprint-2-fpi-context.html:64: warning: no link for: "GArray" -> (<span class="type">GArray</span>).只是一些警告,
如果想要屏蔽掉文档错误, meson build的时候加个参数
#meson libfprint libfprint/_build -Ddoc=false
#ninja -C libfprint/_build install检查下meson的loglibfprint/_build/meson-logs/cat install-log.txt# List of files installed by Meson# Does not contain files installed by custom scripts./usr/local/include/libfprint-2/fp-enums.h/usr/local/lib/x86_64-linux-gnu/libfprint-2.so.2.0.0/usr/local/lib/x86_64-linux-gnu/libfprint-2.so.2/usr/local/lib/x86_64-linux-gnu/libfprint-2.so/lib/udev/rules.d/60-libfprint-2-autosuspend.rules/usr/local/share/gir-1.0/FPrint-2.0.gir/usr/local/lib/x86_64-linux-gnu/girepository-1.0/FPrint-2.0.typelib/usr/local/include/libfprint-2/fprint.h/usr/local/include/libfprint-2/fp-context.h/usr/local/include/libfprint-2/fp-device.h/usr/local/include/libfprint-2/fp-image-device.h/usr/local/include/libfprint-2/fp-image.h/usr/local/include/libfprint-2/fp-print.h/usr/local/lib/x86_64-linux-gnu/pkgconfig/libfprint-2.pc
说明安装成功了
测试下
#su - tom
$fprintd-enroll