Repository navigation
Description
Hi,
I have this working on a lenovo Thinkpad T470s.
However, if I reboot or suspend it stops working.
I have applied "fix 3" from the other thread, and while that successfully restarts the two services, it looks like python3-validity isn't picking up the fingerprint reader (guess to be honest).
if I manually restart the python3-validity.service it starts working again.
Any ideas? Service status info below.
Thanks
Darren.
AFTER REBOOT OR RESUME:
sudo systemctl status python3-validity
● python3-validity.service - python-validity driver dbus service
Loaded: loaded (/usr/lib/systemd/system/python3-validity.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-08 16:19:35 BST; 16min ago
Main PID: 5281 (dbus-service)
Tasks: 3 (limit: 28526)
Memory: 18.3M
CPU: 291ms
CGroup: /system.slice/python3-validity.service
└─ 5281 /usr/bin/python3 /usr/lib/python-validity/dbus-service --debug
Jun 08 16:32:46 tenjin-fedora dbus-service[5281]: DEBUG:root:<tls< 17: 0000
Jun 08 16:32:46 tenjin-fedora dbus-service[5281]: DEBUG:root:VerifyStatus
Jun 08 16:35:36 tenjin-fedora dbus-service[5281]: DEBUG:root:In ListEnrolledFingers darren
Jun 08 16:35:36 tenjin-fedora dbus-service[5281]: DEBUG:root:>tls> 17: 4b00000b0053746757696e64736f7200
Jun 08 16:35:36 tenjin-fedora dbus-service[5281]: DEBUG:root:>cmd> 17030300503e80b754213aa2167c70a36a2e25ee59b2ee35ddb4a037f288b6f88b559969356fbcffacb5721b5bd3>
Jun 08 16:35:36 tenjin-fedora dbus-service[5281]: DEBUG:root:<cmd< 0404
Jun 08 16:35:44 tenjin-fedora dbus-service[5281]: DEBUG:root:In ListEnrolledFingers darren
Jun 08 16:35:44 tenjin-fedora dbus-service[5281]: DEBUG:root:>tls> 17: 4b00000b0053746757696e64736f7200
Jun 08 16:35:44 tenjin-fedora dbus-service[5281]: DEBUG:root:>cmd> 1703030050ee5b92bffba9e3307f8c4d280bcfcd2370d8d0f83ad5e836ec885b39a868370b6292d4c7a08e2c0379>
Jun 08 16:35:44 tenjin-fedora dbus-service[5281]: DEBUG:root:<cmd< 0404
AFTER restarting the service again:
[darren@tenjin-fedora system]$ sudo systemctl restart python3-validity
[darren@tenjin-fedora system]$ sudo systemctl status python3-validity
● python3-validity.service - python-validity driver dbus service
Loaded: loaded (/usr/lib/systemd/system/python3-validity.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-08 16:37:09 BST; 2s ago
Main PID: 6153 (dbus-service)
Tasks: 3 (limit: 28526)
Memory: 17.8M
CPU: 186ms
CGroup: /system.slice/python3-validity.service
└─ 6153 /usr/bin/python3 /usr/lib/python-validity/dbus-service --debug
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:>tls> 17: 40060100004450000000100000
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:>cmd> 17030300407c3ee4f1d75bea2be6b4f85974d68bfff7ad4a439929add7e4d1605a92ebfd0c5c1713d2c74c33cceb>
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:<cmd< 1703031040c1725a201f26ccfe86a4f6794314a643b41761c345614c9a0a534f0d6a42b10053e4d7cfc57165cd80>
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:<tls< 17: 00000010000000007e888884858183807c7d7f7c7e7b7d7b777870767d8385807870767d81827f80777a7c7a>
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:>tls> 17: 4b00000b0053746757696e64736f7200
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:>cmd> 17030300505d359c36dd17200b0031e0411e104af859d89cf336ebd793a43becab629ea44dcb73f47c29405e91f2>
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:<cmd< 1703030050a9b9669d2edc77845677d9f17dd91f92c9b15b94c493fc414a14a8573508c9a0ec2194fc71b948d62f>
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:<tls< 17: 0000030001000b00000004004c0053746757696e64736f7200
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:atexit registered
Jun 08 16:37:10 tenjin-fedora dbus-service[6153]: DEBUG:root:Manager is back online, registering
Activity
uunicorn commentedon Jun 8, 2022
Hi, can you share the
systemctl statusforopen-fprintd-suspend.serviceandopen-fprintd-resume.serviceservices?tenjinsoftware commentedon Jun 8, 2022
Hi,
Thanks for the reply. Here is the additional information:
[darren@tenjin-fedora ~]$ sudo systemctl status open-fprintd-suspend.service
[sudo] password for darren:
○ open-fprintd-suspend.service - Restart devices after resume
Loaded: loaded (/usr/lib/systemd/system/open-fprintd-suspend.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[darren@tenjin-fedora ~]$
[darren@tenjin-fedora ~]$ sudo systemctl status open-fprintd-resume.service
○ open-fprintd-resume.service - Restart devices after resume
Loaded: loaded (/usr/lib/systemd/system/open-fprintd-resume.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[darren@tenjin-fedora ~]$
When I reboot or resume, manually restarting either open-fprintd-resume.service or python3-validity.service restores the fingerprint reader to working.
I'm quite new to this stuff, so might be a silly question, but there are two additional services that seem to do the same thing: open-fprintd-restart-after-resume.service and python3-validity-restart-after-resume.service, is it possible there is a clash as it looks like the services are being restarted twice?
D.
uunicorn commentedon Jun 8, 2022
I don't know where
open-fprintd-restart-after-resume.serviceandpython3-validity-restart-after-resume.servicecame from.open-fprintd-suspend.serviceandopen-fprintd-resume.serviceon the other hand are supposed to be a part ofopen-fprintdpackage. They are not designed to restart anything, rather they are there to notify the driver service (python3-validity) that computer went to sleep and the device needs to be re-initialized when it comes back.From what I can see, both
open-fprintd-suspend.serviceandopen-fprintd-resume.serviceare disabled on your computer for some reason. Can you try to enable them and remove all these "restart-after-resume" services? Make sure you are using the latestpython-validityversion, as there was a fix related to suspend/resume recently. I'm not sure who's maintaining Fedora packaging for this project, but it would be nice to incorporate this fix. Also, find out whyopen-fprintd-{suspend,resume}.serviceare disabled on Fedora by default.I'm not very familiar with the Fedora packaging system and I don't have anywhere to test, so I'm hoping someone with more experience can pick this up.
tenjinsoftware commentedon Jun 9, 2022
Thanks again for your help.
It's all working now. In case anyone finds this thread I thought I'd add some info.
Bit of context: I'm just getting back into Linux after many years (I first played with Linux in the Red Hat days c. 2000...). I'm pretty rusty. I'm running a Fedora 36 installation on a Lenovo Thinkpad T470s now.
For "ease" I tried to install the libprintf code (https://github.com/3v1n0/libfprint/) via Snap as the README said it was "for any distro". That failed at one of the steps.
I then installed this code as per the Fedora instructions and enrolled my fingerprint, and that initially seemed to work fine.
However, as soon as I went into suspend or rebooted everything stopped working.
How it was fixed:
i. sudo systemctl disable open-fprintd-restart-after-resume.service
ii. sudo systemctl disable python3-validity-restart-after-resume.service
i. sudo systemctl daemon-reload
ii. sudo systemctl enable open-fprintd-suspend.service
iii. sudo systemctl enable open-fprintd-resume.service
iv. sudo systemctl enable python3-validity.service
v. sudo systemctl restart open-fprintd-suspend.service
vi. sudo systemctl restart open-fprintd-resume.service
vii. sudo systemctl restart python3-validity.service
viii. I then ran "sudo systemctl status " on all the services above to check they are running.
I'm still learning, so there might be quicker ways to do some of this, but all I can say is that this worked for me.
Darren.
uunicorn commentedon Jun 9, 2022
Hi Darren,
This is not a fix, it's a workaround. As someone mentioned, it is not how things supposed to work and should no longer be required with the latest version of python-validity.
tenjinsoftware commentedon Jun 9, 2022
Hi,
Thanks for the catch, you are right, I have updated my comments to reflect the correction.
D.
maru-sama commentedon Nov 16, 2022
Hello,
I just updated from Ubuntu 22.04 to 22.10 and I a facing the same issues with my Lenovo t470s. After a suspend/resume cycle the reader is no longer available.
I tried to figure out the differences between the two running the same kernel and found out the following.
When you suspend under 22.04 and then resume the USB connected fingerprint reader gets "RESET".
If you do the same with 22.10 then the reader is not "RESET" but it gets removed and then added again as a new device. As a result it is no longer available under the old location since it is per definition a new device.
Since this is happening with the same kernel it has be the a change in the runtime services but with 1500 updates this is difficult to pinpoint.
The workaround with restarting the service of course works in this case, but I wonder if a reconnect of the sensor can be handled as well without the need to restart everything.
maru-sama commentedon Nov 16, 2022
Hi,
A small update on this while looking at differences, between the two versions I saw that the "power/persist" flag is set to "0" for the newer distribution. As a result the device gets reconnected on resume. I changed the config to always set persist to 1 and now it behaves correctly and works without any workarounds.
maru-sama commentedon Nov 17, 2022
I found out why the persist is set to 0 in the first place. Recent udev releases have an updated hwdb which lists (at least) my fingerprint sensor as unsupported and sets the flag to 0. I manually put in an exception for my sensor and set this to 0. So now the sensor works as before. To check if this is happening for your sensor as well take a look at /lib/udev/hwdb.d/60-autosuspend-fingerprint-reader.hwdb and check if our sensor is listed there.
4rc0s commentedon Feb 20, 2023
In that file on my system (Mint 21.1) everything is set to
ID_AUTOSUSPEND=1. You said, " I manually put in an exception for my sensor and set this to 0."lsusblists my sensor as06cb:009awhich is apparently included in the "known unsupported devices" asusb:v06CBp009A*Do I comment out it's listing in the unsupported section and add a new entry with
ID_AUTOSUSPEND=0?maru-sama commentedon Feb 23, 2023
Hello I wrote a small howto some time ago of how to fix the issue https://mike.it-loops.com/item/32 This was more for myself so I do not forget how I fixed it.
ChonkaLoo commentedon Nov 11, 2023
Worked for me as well on a X270, had the same fingerprint reader as you @maru-sama but on Debian 12. The override file and update to systemd-hwdb worked like a charm. Thank you for nice tutorial on your site! God I love the open-source community🥰
YovanggaAnandhika commentedon Oct 25, 2024
@tenjinsoftware .i have recomendation for if finger not working after resume/suspend/reboot
I looked at the resume and suspend scripts crashing. because the open-fprintd and python3 validity services are not running perfectly. so when I Tried With Sequence
they must be running so that libusb does not error
Create Costum Script Bash
create a file /usr/local/bin/open-fprintd-resume.sh
allow execution +x /usr/local/bin/open-fprintd-resume.sh
create a file /usr/local/bin/open-fprintd-suspend.sh
allow execution +x /usr/local/bin/open-fprintd-suspend.sh
Modify Systemd Suspend / Resume
open and modify suspend
in file /usr/lib/systemd/system/open-fprintd-suspend.service
open and modify resume
in file /usr/lib/systemd/system/open-fprintd-resume.service
Run Refresh Service
Refresh Daemon
sudo systemctl daemon-reloadEnable All Service :
and try reboot.