https://bugs.kde.org/show_bug.cgi?id=506567
--- Comment #12 from Caballo Juan <[email protected]> --- aaaalright, so I compiled the _allegedly_ buggy component (kscreenlocker - plasma 6.4.5.x), ran it in debug mode and I believe I found what appears to be causing the issue. I don't know if this is hardware-dependent. 1. When the computer (laptop) goes to sleep, the BIOS sometimes likes to reset the fingerprint device, and it's enumerated again by fprintd upon wake up (and registered as a new fprint "Device") 2. This usually happens when closing the lid; and not when manually suspending the computer (be it with KDE taskbar menu, Plasma Search's shortcuts or systemd's utilities). I suspect this is caused by either the BIOS or a bug in fprintd. 3. When the computer wakes up, kscreenlocker tries to "talk" again to the previous old device, but it miserably fails because at this point fprintd has already registered another device (this can be seen with `busctl tree net.reactivated.Fprint` - there should ideally be just 1 device, not 2) 4. The old fprintd device will simply stop working and even commands such as `fprintd-verify` will fail 5. Whenever this happens, the kscreenlock process will hang for a few secs before it finally exists. I don't thinks causes the bug, but it _might_ cause a bug if I lock/unlock my computer very quickly. I suspect this happens because kscreenlocker is waiting for the useless fprint "Device" to respond successfully or something. I worked this around doing the following: 1. Edit fprintd's systemd unit file and add `TimeoutStopSec=1` to immediately kill the (now useless) fprintd service after startup 2. Create an udev rule that automatically restarts the useless fprintd daemon whenever my *VERY SPECIFIC* fingerprint device is enumerated again: `/etc/udev/rules.d/99-fprintd.rules`: "ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="06cb", ATTR{idProduct}=="00fc", RUN+="/bin/systemctl restart fprintd" My suggestion: have KDE/Plasma automatically restart the fprintd service if it returns an invalid error code (9), or at the very least indicate this on the lockscreen, e.g. something such as "fingerprint sensor disabled due to buggy driver". fprintd logs: ``` Sep 24 14:09:49 xxx fprintd[12371]: Authorization denied to :1.337 to call method 'Claim' for device 'Synaptics Sensors': Device was already claimed Sep 24 14:10:06 xxx fprintd[12371]: Authorization denied to :1.341 to call method 'Claim' for device 'Synaptics Sensors': Device was already claimed Sep 24 14:10:17 xxx fprintd[12371]: Authorization denied to :1.344 to call method 'Claim' for device 'Synaptics Sensors': Device was already claimed Sep 24 14:11:13 xxx systemd[1]: fprintd.service: State 'stop-sigterm' timed out. Killing. ``` `fprintd-verify` output: ``` Using device /net/reactivated/Fprint/Device/1 failed to claim device: GDBus.Error:net.reactivated.Fprint.Error.AlreadyInUse: Device was already claimed ``` kscreenlocker (I added a few debug messages to the source), but you can see it fails to talk to fprintd, and hence it disables the fingerprint option. I am still able to manually unlock and that's why `Unlocked` is printed at the end: ``` kscreenlocker_greet: Greeter is starting up. kscreenlocker_greet: Greeter is running in testing mode kscreenlocker_greet: Testing mode enabled: true kscreenlocker_greet: [PAM worker kde-smartcard] start: successfully started kscreenlocker_greet: [PAM worker kde-fingerprint] start: successfully started kscreenlocker_greet: [PAM worker kde] start: successfully started Locked at 1758743384 kscreenlocker_greet: PamAuthenticators: starting authenticators kscreenlocker_greet: PamAuthenticators: state changing from PamAuthenticators::Idle to PamAuthenticators::Authenticating kscreenlocker_greet: [PAM worker kde-smartcard] Authenticate: Starting authentication kscreenlocker_greet: [PAM worker kde] Authenticate: Starting authentication kscreenlocker_greet: [PAM worker kde-fingerprint] Authenticate: Starting authentication kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-smartcard true kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-fingerprint true kscreenlocker_greet: PamAuthenticators: Delay started on login failure for non-interactive authenticator kde-smartcard duration: 2017873 kscreenlocker_greet: [PAM worker kde] Message: Echo-off prompt: Password: kscreenlocker_greet: [PAM worker kde] Starting nested event loop to await response kscreenlocker_greet: PamAuthenticators: Secret prompt from interactive authenticator kde kscreenlocker_greet: PamAuthenticators: Delay started on login failure for non-interactive authenticator kde-fingerprint duration: 1326118 kscreenlocker_greet: [PAM worker kde-fingerprint] Authenticate: Authentication done, result code: 9 (Authentication service cannot retrieve authentication info) kscreenlocker_greet: [PAM worker] UNAVAIL/UNKNOWN m_unavailable= true kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-fingerprint false kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-fingerprint false kscreenlocker_greet: [PAM worker kde-smartcard] Authenticate: Authentication done, result code: 28 (Module is unknown) kscreenlocker_greet: [PAM worker] UNAVAIL/UNKNOWN m_unavailable= true kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-smartcard false kscreenlocker_greet: PamAuthenticators: Availability changed for non-interactive authenticator kde-smartcard false kscreenlocker_greet: PamAuthenticators: responding to interactive authenticator kscreenlocker_greet: [PAM worker kde] Received response, exiting nested event loop kscreenlocker_greet: PamAuthenticators: Interactive authenticator kde changed business kscreenlocker_greet: [PAM worker] Fail delay function was called, but authentication result was a success! kscreenlocker_greet: [PAM worker kde] Authenticate: Authentication done, result code: 0 (Success) kscreenlocker_greet: PamAuthenticators: Interactive authenticator kde changed business < ... HANGS for some 5-10s before finally exiting ... > kscreenlocker_greet: [PAM worker] PAM_SUCCESS m_unavailable= false kscreenlocker_greet: PamAuthenticators: Success from interactive authenticator kde Unlocked ``` -- You are receiving this mail because: You are watching all bug changes.
