FIngerprint auth does not work if session is left locked for a long time
Regression?
No
Hyprlock Info and Version
Hyprlock config
# BACKGROUND
background {
monitor =
path = $HOME/Pictures/Wallpaper-Bank/wallpapers/background
blur_passes = 2
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
# GENERAL
general {
no_fade_in = false
grace = 0
disable_loading_bar = false
}
auth {
fingerprint{
enabled = true
}
}
# INPUT FIELD
input-field {
monitor =
size = 250, 60
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = rgba(0, 0, 0, 0)
inner_color = rgba(100, 114, 125, 0.4)
font_color = rgb(200, 200, 200)
fade_on_empty = false
font_family = SF Pro Display Bold
placeholder_text = <i><span foreground="##ffffff99">Enter Pass</span></i>
hide_input = false
position = 0, -225
halign = center
valign = center
}
# Time
label {
monitor =
text = cmd[update:1000] echo "<span>$(date +"%H:%M")</span>"
color = rgba(216, 222, 233, 0.70)
font_size = 130
font_family = SF Pro Display Bold
position = 0, 240
halign = center
valign = center
}
# Day-Month-Date
label {
monitor =
text = cmd[update:1000] echo -e "$(date +"%A, %d %B")"
color = rgba(216, 222, 233, 0.70)
font_size = 30
font_family = SF Pro Display Bold
position = 0, 105
halign = center
valign = center
}
# Profie-Photo
image {
monitor =
path = ~/Pictures/profile.jpg
border_color = 0xffdddddd
border_size = 0
size = 120
rounding = -1
rotate = 0
reload_time = -1
reload_cmd =
position = 0, -20
halign = center
valign = center
}
# USER
label {
monitor =
text = Hi, $USER
color = rgba(216, 222, 233, 0.70)
font_size = 25
font_family = SF Pro Display Bold
position = 0, -130
halign = center
valign = center
}
label {
monitor =
text = $FPRINTPROMPT
color = rgba(216, 222, 233, 0.70)
font_size = 14
font_family = SF Pro Display Bold
position = 0, -170
halign = center
valign = center
}
# CURRENT SONG
label {
monitor =
text = cmd[update:1000] echo "$(playerctl metadata --format '{{title}} {{artist}}')"
color = rgba(255, 255, 255, 0.7)
font_size = 18
font_family = JetBrains Mono Nerd, SF Pro Display Bold
position = 0, 60
halign = center
valign = bottom
}
Compositor Info and Version
System/Version info
Hyprland 0.47.2 built from branch at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff (version: bump to 0.47.2).
Date: Sun Feb 2 00:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
aquamarine 0.7.2
hyprlang 0.6.0
hyprutils 0.5.0
hyprcursor 0.1.11
hyprgraphics 0.1.2
no flags were set
System Information:
System name: Linux
Node name: cachyos
Release: 6.13.5-2-cachyos
Version: #1 SMP PREEMPT_DYNAMIC Thu, 27 Feb 2025 20:01:00 +0000
GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller])
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c5) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 570.124.04 Release Build (notroot@e30a0be0f9b7) Thu Feb 27 20:14:48 UTC 2025
os-release: NAME="CachyOS Linux"
PRETTY_NAME="CachyOS"
ID=cachyos
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://cachyos.org/"
DOCUMENTATION_URL="https://wiki.cachyos.org/"
SUPPORT_URL="https://discuss.cachyos.org/"
BUG_REPORT_URL="https://github.com/cachyos"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=cachyos
plugins:
Description
After locking the session with hyprlock, fingerprint works as expected for a short while. BUT if left for ~ 5 - 10 mins. fingerprint stops working (the scanner stops scanning). if i force fingerprint auth thought edits in /etc/pam.d/login i get an error (Fingerprint device disconnected)
How to reproduce
Lock the session. wait for 10 mins try to unlock using your fingerprint
Crash reports, logs, images, videos
if i call CFingerprint::claimDevice() after i get a MATCH_DISCONNECTED, will it reconnect the device and fix this?
I also experience this - hardware is a Lenovo ThinkPad T14s Gen 3 AMD and I'm on NixOS unstable.
I need to buy a usb fingerprint sensor, so that I can actually test fingerprint stuff. In the meantime - @moggiesir @rickyelopez @BlueZeeKing - tagging all of you since you contributed to the fingerprint auth. Let me know if any of you could look into this. Thanks!
What was the error you got before you added fingerprint auth to pam? Was it also disconnect or did it say something else? Also, is your laptop suspending after you lock it?
What was the error you got before you added fingerprint auth to pam? Was it also disconnect or did it say something else? Also, is your laptop suspending after you lock it?
For the second question, yes, I experience this when I have "hyprlock" in my before-sleep-cmd config in hypridle. Seeing as the original issue creator hasn't responded, what testing can I do for you?
Everything for fingerprint handling happens over dbus, so you could monitor the system bus and see if there's anything interesting in the logs.
FWIW, I went back to gnome for various reasons and for the last month or so, both my fingerprint device and usb port for my yubikey were dying somewhat randomly, and I would need to reset with commands like:
echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/unbind
sleep 5
echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/bind
That's been happening less and less so I'm guessing there was some bad code in the kernel/drivers?
experiencing this as well - after a suspend invoked by hypridle, the fingerprint sensor never comes back online until a reboot or manually resetting the device as above. the sensor works perfectly until suspend/resume.
some data points to help track down the issue:
- Thinkpad X1 Carbon Gen 12 (Intel 155U)
- Fedora 41
- vanilla fprintd
- when this occurs sensor is not usable anywhere, even outside Hyprland (GDM, Gnome, etc)
before suspend (sensor works):
Mar 19 12:08:38 fedora systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
Mar 19 12:36:22 fedora systemd[1]: fprintd.service: Deactivated successfully.
Mar 19 13:20:14 fedora systemd[1]: Starting fprintd.service - Fingerprint Authentication Daemon...
Mar 19 13:20:14 fedora systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
After suspend (sensor doesn't work):
Mar 19 14:41:48 fedora fprintd[12788]: Corrupted message received
Mar 19 14:41:48 fedora fprintd[12788]: Device reported an error during verify: The driver encountered a protocol error with the device.
Mar 19 14:42:16 fedora fprintd[12788]: Authorization denied to :1.401 to call method 'Claim' for device 'Synaptics Sensors': Device was already claimed
Mar 19 14:42:17 fedora fprintd[12788]: Got unexpected sequence number from device, 5 instead of 6
Mar 19 14:42:17 fedora fprintd[12788]: fpi_device_critical_enter: assertion 'priv->current_action != FPI_DEVICE_ACTION_NONE' failed
Mar 19 14:42:17 fedora fprintd[12788]: fpi_device_close_complete: assertion 'priv->current_action == FPI_DEVICE_ACTION_CLOSE' failed
Mar 19 14:42:17 fedora fprintd[12788]: fpi_device_critical_leave: assertion 'priv->current_action != FPI_DEVICE_ACTION_NONE' failed
Mar 19 14:42:47 fedora systemd[1]: fprintd.service: Deactivated successfully.
every time afterwards until reboot or manual reset (sensor doesn't work):
Mar 19 17:43:06 fedora systemd[1]: Starting fprintd.service - Fingerprint Authentication Daemon...
Mar 19 17:43:06 fedora fprintd[19942]: Ignoring device due to initialization error: device sent more data than requested
Mar 19 17:43:06 fedora systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
Mar 19 17:43:36 fedora systemd[1]: fprintd.service: Deactivated successfully.
potentially related: Synaptics fingerprint sensor issue w/ fprint on ThinkPad T14s (resolved by downgrading fprintd)
Can everyone try using my fork? I think I fixed the issue, but I'm going to test it myself for a bit to make sure, and I would appreciate if you tried it too
tried out the fork and am experiencing the same behavior. works fine outside hyprland (GDM). slightly different errors this time:
Apr 04 21:50:24 fedora fprintd[1881]: Authorization denied to :1.112 to call method 'Claim' for device 'Synaptics Sensors': Device was already claimed
Apr 04 21:50:25 fedora fprintd[1881]: Verification was in progress, stopping it
Apr 04 21:56:43 fedora fprintd[4010]: Authorization denied to :1.142 to call method 'Release' for device 'Synaptics Sensors': Device was not claimed before use
Apr 04 21:56:59 fedora fprintd[4010]: Authorization denied to :1.146 to call method 'Release' for device 'Synaptics Sensors': Device was not claimed before use
edit: disregard the fprintd-verify stuff, i was specifying an invalid finger name
fprintd-verify cannot use the fingerprint sensor while hyprlock is running so if I'm understanding what the first error is correctly that makes sense. Running sudo fprintd-verify tries to get the fingerprint of the root user by default so that also makes sense that there are no prints for root. Does hyprlock fail to claim when it first launches or returning from suspend? This seems like a different issue from what I fixed
it looks like 2 different things are trying to release the fingerprint sensor which explains why things are breaking. Are you accidentally launching multiple instances of hyprlock or doing something else with fprintd?
- i had a bad finger name, fprintd-verify works as expected.
- hyprlock only runs one instance using
pidof hyprlock || hyprlockin hypridle config. nothing else should be using the sensor.
thanks for working on this. FWIW it seems like the sensor only breaks when running hyprlock directly, haven't encountered the original issue while closing lid or using loginctl lock-session. have verified that hyprlock is not already running when invoking directly.
not sure if it's related but i had to build sdbus-cpp from source because hyprlock requires >= 2.0.0 and the latest packaged in fedora 41 repos is 1.5.0. maybe there's some other hypr* deps with mismatched versions causing unexpected behavior
Does the fingerprint work when running hyprlock without suspending or closing the lid?
FWIW it seems like the sensor only breaks when running hyprlock directly, haven't encountered the original issue while closing lid or using loginctl lock-session. have verified that hyprlock is not already running when invoking directly.
Check the first line of the logs for the hyprlock version to verify you are running the commit of the PR. It would be weird if it doesn't happen when launched via hypridle (loginctl).
not sure if it's related but i had to build sdbus-cpp from source because hyprlock requires >= 2.0.0 and the latest packaged in fedora 41 repos is 1.5.0. maybe there's some other hypr* deps with mismatched versions causing unexpected behavior
Not relevant i figure.
I will merge the PR, since it's probably the right thing to do. But let's keep this issue open for now.
possible duplicate https://github.com/hyprwm/hyprlock/issues/531