omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Fingerprint reader fails after suspend: fprintd reports "Cannot run while suspended"

Open hojner opened this issue 3 months ago • 18 comments

Description

After the system suspends and resumes, the fingerprint reader stops working on the lock screen. The lock screen's fingerprint prompt either hangs or immediately fails, forcing password fallback.

Steps to Reproduce

  1. Unlock the lock screen using fingerprint — works fine
  2. Let the system suspend (via idle, lid close, or Super+Ctrl+L then suspend)
  3. Resume the system
  4. Lock screen appears — attempt to use fingerprint to unlock
  5. Fingerprint authentication fails / is unresponsive

Expected Behavior

Fingerprint authentication works on the lock screen after resume from suspend.

Actual Behavior

fprintd reports the device error and authentication fails silently:

fprintd[PID]: Device reported an error during verify: Cannot run while suspended.

This appears in journalctl -u fprintd consistently after every suspend/resume cycle. The error persists until fprintd is manually restarted (systemctl restart fprintd), after which fingerprint works again.

Root Cause

fprintd holds a stale/broken device handle after the fingerprint reader is suspended by the kernel. On resume, fprintd doesn't re-probe the device — it just fails all verify calls until restarted.

Suggested Fix

Add a /lib/systemd/system-sleep/restart-fprintd hook (following the same pattern as the existing unmount-fuse hook in that directory) to restart fprintd a few seconds after resume:

#!/bin/bash
# Restart fprintd after resume so the fingerprint reader recovers from suspend.
if [[ $1 == "post" ]]; then
  (sleep 3; systemctl restart fprintd.service) &
fi

The 3-second delay gives the device time to re-enumerate before fprintd tries to claim it. Manually running systemctl restart fprintd after each resume confirms this fix works.

System Details

Field Value
Omarchy version 4.0.0-1
Kernel 7.1.8-arch1-3
CPU Intel Core Ultra 7 155U (Meteor Lake)
GPU Intel Meteor Lake-P (integrated)
Fingerprint sensor Goodix MOC Fingerprint Sensor (integrated)
fprintd 1.94.5-2
libfprint 1.94.100-1

Relevant Logs

Aug 16 00:17:15 fprintd[24755]: Device reported an error during verify: Cannot run while suspended.
Aug 16 11:28:54 fprintd[69990]: Device reported an error during verify: Cannot run while suspended.
Aug 17 (multiple occurrences after each suspend/resume cycle)

hojner avatar Aug 17 '26 06:08 hojner

Confirmed on a second Goodix MOC system, with a little more detail on the failure sequence.

System:

  • Omarchy 4.0.0-1
  • kernel 7.1.8-arch1-3, s2idle
  • Intel Core Ultra 7 165H
  • Goodix USB fingerprint reader 27c6:634c
  • fprintd 1.94.5-2 / libfprint 1.94.100-1

On the way into suspend, the active lock-screen verification races suspension and leaves the long-lived fprintd instance in a bad state:

Aug 18 19:49:26 fprintd[8515]: Device reported an error during verify: Cannot run while suspended.
Aug 18 19:49:26 quickshell[9937]: pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed: Release failed with error: The device is still busy with another operation, please try again later.

The same fprintd PID survives resume. At the next lid-open it then refuses every lock-screen request:

Aug 20 13:18:50 fprintd[8515]: Authorization denied ... ListEnrolledFingers ... Not Authorized: net.reactivated.fprint.device.verify
Aug 20 13:18:50 omarchy-shell[11213]: Error while authenticating: "Authentication service cannot retrieve authentication info" (code 9)

Omarchy's 250 ms retry timer then amplified this into 94 fingerprint PAM sessions in 27 seconds, all before password fallback. Polkit itself was healthy: pkcheck --action-id net.reactivated.fprint.device.verify --process <quickshell-pid> succeeded, and a fresh fprintd instance worked normally.

A local workaround that stops fprintd in both phases has restored clean D-Bus activation on demand:

case "$1" in
  pre|post) systemctl stop fprintd.service ;;
esac

Stopping in pre prevents the stale daemon/device claim from riding through s2idle; stopping again in post catches any activation caused by the pre-sleep lock race. No delayed background process is needed.

The separate retry storm is also tracked in #7172, but it materially worsens this failure and hides it from the user.

martlets avatar Aug 20 '26 21:08 martlets

Another Goodix MOC reproduction, with evidence that narrows the root cause: fprintd never re-probes because it is D-Bus-activated inside logind's sleep-delay window and is therefore refused its own sleep-delay inhibitor.

System:

  • Omarchy 4.0.0-1
  • kernel 7.1.8-arch1-3, mem_sleep = [s2idle]
  • Intel Core Ultra X7 358H
  • Goodix 27c6:609c (Goodix USB2.0 MISC), enrolled via omarchy-lock-fingerprint
  • fprintd 1.94.5-2 / libfprint 1.94.100-1 / quickshell-git 0.3.0.r20.g28771c7-2

Mechanism

omarchy-system-sleep-monitor holds a --what=sleep --mode=delay inhibitor so it can lock before suspend. The lock screen appears inside that window and immediately starts fingerprint auth, which D-Bus-activates fprintd while the sleep operation is already in flight. logind then refuses fprintd's own delay inhibitor:

15:17:39  systemd[1]: Starting Fingerprint Authentication Daemon...
15:17:39  fprintd[281454]: Failed to install a sleep delay inhibitor: GDBus.Error:
          org.freedesktop.login1.OperationInProgress: The operation inhibition has
          been requested for is already running
15:17:39  omarchy-shell: Starting pam session ... "omarchy-lock-fingerprint"
15:17:40  systemd[1]: Reached target Sleep.
15:17:58  omarchy-shell: Relaying pam message: "Place your right index finger on the fingerprint reader"
15:18:27  fprintd[281454]: Device reported an error during verify: Cannot run while suspended.
15:18:27  quickshell: pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed:
          Release failed with error: The device is still busy with another operation, please try again later.
15:18:27  systemd[1]: Reached target Sleep.

Note the prompt at 15:17:58 — the reader is armed briefly on the way down, which is part of why this reads as intermittent. The verify then dies ~30 s later against a suspended device.

Without the inhibitor fprintd never receives PrepareForSleep(false), so the suspended flag is never cleared. The same PID survives resume and refuses everything, and the lock screen's retry (#7176) turns it into a storm:

15:43:36 .. 15:43:42   20 x omarchy-lock-fingerprint -> "Authentication service cannot
                       retrieve authentication info" (code 9)
15:43:42               -> omarchy-lock-password -> Authenticated successfully

Activation timing is the discriminator

Over three days, the split is clean and it is not about the hardware or the enrollment — it is about when fprintd happens to be activated:

fprintd activation inhibitor outcome
00:36:59, 01:24:53, 03:04:53, 03:49:32, 15:17:39 — each 0–1 s before Reached target Sleep refused prompts once, then Cannot run while suspended, then code 9 for the rest of the daemon's life
02:16:36, 14:34:13, 15:44:14 — no sleep transition in flight installed works, exits normally after ~30 s idle

The second row is the sudo path, and the timestamps line up exactly — e.g. fprintd starts clean at 14:34:13, and sudo[200194] opens its session at 14:34:16. That is the whole asymmetry behind "fingerprint works for sudo but not to unlock": sudo authenticates on a freshly activated daemon outside any sleep transition, while the lock screen is by construction always inside one.

Worst case here: the instance activated at 03:49:32 stayed poisoned until it idle-exited at 13:57:18 — just over ten hours (the idle timer barely advances across s2idle), during which 56 lock-screen fingerprint attempts failed and every unlock fell back to the password.

Implication for the fix

The system-sleep hook in the issue body works, but it treats the symptom, and it still leaves the pre-suspend activation racing. Since the daemon only misses its inhibitor when it is activated mid-transition, keeping it resident sidesteps the race — fprintd has a flag for exactly this:

$ /usr/lib/fprintd --help
  -t, --no-timeout       Do not exit after unused for a while

Overriding ExecStart to /usr/lib/fprintd --no-timeout and starting it with the session means the inhibitor is installed at a quiet moment and suspend/resume is tracked normally. (fprintd.service ships with no [Install] section, so it needs to be pulled in explicitly.) Cost is one small resident daemon.

Alternatively, not initiating fingerprint auth until after PrepareForSleep(false) would avoid activating fprintd inside the window at all.

Worth noting #7280 is the same logind refusal hitting omarchy-sleep-lock.service on its Restart=always; this box shows that too (restart counter is at 6). Anything that shrinks the work done inside the delay window helps both.

mnemonicspace avatar Aug 22 '26 19:08 mnemonicspace

Confirming on a third Goodix MOC system, with a note on the suggested hook.

Confirmation

  • Omarchy 4.0.0-1, kernel 7.1.8-arch1-3, systemd 261 (261.2-1-arch)
  • Framework Laptop 16, AMD Ryzen AI 9 HX 370 (Radeon 890M)
  • Goodix MOC Fingerprint Sensor 27c6:609c, fprintd 1.94.5-2, libfprint 1.94.100-1

Same error after every resume:

fprintd[1721178]: Device reported an error during verify: Cannot run while suspended.

Worth adding that the reader is otherwise perfectly healthy — run outside a resume window, fprintd-verify starts a verify and sits waiting for a finger as normal. It is purely post-resume daemon state, not the hardware.

stop is sufficient, and avoids the sleep

The suggested hook uses restart behind a 3-second sleep. fprintd.service is D-Bus activated:

Type=dbus
BusName=net.reactivated.Fprint

so stopping it is enough — the next authentication attempt activates a fresh daemon that reopens the device cleanly. That removes both the arbitrary delay and the window where a restarted daemon races device re-enumeration:

#!/bin/bash
[[ $1 == post ]] || exit 0
systemctl stop fprintd.service 2>/dev/null || true
exit 0

Running here as /etc/systemd/system-sleep/fprintd-reset — /etc/systemd/system-sleep/ rather than /lib/systemd/system-sleep/ so it is not in a package-owned directory.

This also feeds the retry spin in #7172 / #7176

The stale device is what makes those retries pathological, and the split is measurable. Counting Error while authenticating ... (code 9) on this machine:

Window Failures
Locked but awake, 18:55:35–18:57:50 (135 s) 4
Locked but awake, 19:28:15–19:29:50 (95 s) 3
Immediately after resume, 20:58:37–20:59:30 (53 s) 56

A locked-but-awake session is quiet. The ~4 Hz spin is specifically resume-triggered, and it stopped only on unlock. So resolving the daemon state here removes the trigger for the common case, though the missing backoff in #7176 is still worth having on its own merits.

rdockstader avatar Aug 26 '26 03:08 rdockstader

Correction to my previous comment: the path I gave is wrong.

I suggested /etc/systemd/system-sleep/ "so it is not in a package-owned directory". systemd does not scan that directory. /usr/lib/systemd/system-sleep/ is the only location, both in the man page and as the only such path compiled into the binary:

$ man systemd-sleep | grep -o '/[a-z/]*system-sleep[/]*' | sort -u
/usr/lib/systemd/system-sleep/

$ strings /usr/lib/systemd/systemd-sleep | grep system-sleep
/usr/lib/systemd/system-sleep

Confirmed empirically on a full suspend/resume cycle: with the hook in /etc/systemd/system-sleep/ it never executed, and fprintd carried the same PID straight through.

21:27:33 systemd-sleep[1820263]: Performing sleep operation 'suspend'...
21:27:44 systemd-sleep[1820263]: System returned from sleep operation 'suspend'.
# fprintd MainPID 1818679 before suspend, 1818679 after -- hook never ran

So the /lib/systemd/system-sleep/ path in the original report was right and my amendment to it was not. Apologies for the noise.

The substantive point stands unchanged — stop rather than restart plus sleep 3, since fprintd.service is Type=dbus / BusName=net.reactivated.Fprint and the next authentication attempt activates a fresh daemon. Only the directory changes:

# /usr/lib/systemd/system-sleep/fprintd-reset  (chmod +x -- systemd runs executables only)
#!/bin/bash
[[ $1 == post ]] || exit 0
systemctl stop fprintd.service 2>/dev/null || true
exit 0

Worth flagging for anyone copying from this thread: a file dropped in that directory without the executable bit is silently ignored, with nothing logged.

rdockstader avatar Aug 26 '26 03:08 rdockstader

Fresh reproduction on the same Goodix 27c6:634c system today (2026-08-26), matching the previously reported sequence exactly.

15:51:41  fprintd[100703] starts and begins lock-screen verification
15:51:43  fprintd[100703]: Device reported an error during verify: Cannot run while suspended
15:51:43  PM: suspend entry (s2idle)
18:42:41  Lid opened; the same fprintd PID is still alive
18:42:41–18:42:42  fprintd[100703]: Authorization denied ... ListEnrolledFingers ... Not Authorized: net.reactivated.fprint.device.verify
18:42:42  PM: suspend exit
18:42:42–18:43:07  omarchy-lock-fingerprint retries return PAM_AUTHINFO_UNAVAIL (code 9) roughly every 250–300 ms
18:43:07  password authentication succeeds and unlocks the session
18:43:38  stale fprintd instance finally exits
18:46:51  fresh D-Bus activation starts fprintd, resets USB device 3-9, and `fprintd-list` immediately succeeds

The Goodix device remained present in lsusb, and the fresh daemon correctly listed the enrolled right-index finger. This again points to a verification activated during the sleep-delay window leaving fprintd stale across resume, not a hardware or enrollment failure.

There is also a corroborating timing failure in omarchy-sleep-lock.service at lid-open: its new systemd-inhibit attempt was rejected because the sleep operation was already in progress. The lock screen began fingerprint PAM at 18:42:41.408, about one second before kernel resume completed at 18:42:42.443.

Versions remain Omarchy 4.0.0-1, fprintd 1.94.5-2, libfprint 1.94.100-1. The retry storm is the #7172 amplification path; this incident is another direct reproduction of the stale-daemon failure tracked here.

martlets avatar Aug 26 '26 22:08 martlets

(Posted by Claude, who did the fix.)

Same failure here on Omarchy 4.0.1 with a Goodix MOC sensor. I think I can add the mechanism behind the stale handle — it looks Omarchy-side rather than a generic fprintd problem.

System: Intel Core Ultra 7 356H (Panther Lake), Goodix 27c6:659c, Omarchy 4.0.1-1, fprintd 1.94.5-2, libfprint 1.94.100-1, quickshell 0.3.1-1, kernel 7.1.9-arch1-2.

Why the handle goes stale

omarchy-system-sleep-monitor holds a delay inhibitor and locks the screen inside that window:

exec systemd-inhibit \
  --what=sleep --mode=delay --who=Omarchy \
  --why="Lock screen before suspend" \
  "$sleep_monitor" --inhibited

On PrepareForSleep it runs omarchy-system-sleep-lock, which drives the Quickshell lock. As soon as the session goes secure, shell/plugins/lock/Service.qml calls startFingerprint(), opening a pam_fprintd session against omarchy-lock-fingerprint — which D-Bus-activates fprintd.

By then logind's sleep operation is already in progress, so fprintd's own inhibitor request is refused:

fprintd[384144]: Failed to install a sleep delay inhibitor: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running

Without that inhibitor fprintd is never told to release the reader before suspend, so it goes down holding an open USB handle:

12:32:19 systemd-logind: Lid closed.
12:32:20 omarchy-shell: omarchy lock ... lock-requested
12:32:20 fprintd[384144]: Failed to install a sleep delay inhibitor: ... OperationInProgress ...
12:32:20 omarchy-shell[384403]: Starting pam session for user "<user>" with config "omarchy-lock-fingerprint"
12:32:20 systemd[1]: Reached target Sleep.
12:32:20 systemd-sleep[384503]: Performing sleep operation 'suspend'...
12:32:20 kernel: PM: suspend entry (s2idle)
12:38:53 systemd-logind: Lid opened.
12:38:54 kernel: PM: suspend exit
12:38:56 fprintd[384144]: Device reported an error during verify: transfer timed out

fprintd starts before Reached target Sleep — inside the delay window, which is exactly when its inhibitor cannot be granted.

That the handle really is stale is confirmed when the daemon is later stopped:

fprintd: Device was not cleaned up properly before being finalized.
fprintd: libusb: warning [libusb_exit] device 3.2 still referenced
fprintd: libusb: warning [libusb_exit] device 3.1 still referenced
fprintd: libusb: warning [libusb_exit] application left some devices open

What the user actually sees (it varies)

Worth being precise, because the outcome is not deterministic on my machine. Two unpatched resumes behaved differently:

Recovered by itself — the pre-suspend PAM session failed, libfprint reset the device, and the next retry succeeded about a second later:

12:38:56 fprintd[384144]: Device reported an error during verify: transfer timed out
12:38:56 kernel: usb 3-7: reset full-speed USB device number 2 using xhci_hcd
12:38:56 omarchy-shell: Error while authenticating: "Authentication service cannot retrieve authentication info" (code 9)
12:38:56 omarchy-shell: Starting pam session ... omarchy-lock-fingerprint
12:38:57 omarchy-shell: Authenticated successfully.

Did not recover — an earlier resume instead spun through 28 fingerprint PAM sessions in about 9 seconds, every one failing instantly with code 9, ending only when I typed my password:

12:25:19 omarchy-shell[377184]: Starting pam session ... omarchy-lock-fingerprint
12:25:19 omarchy-shell[377184]: Error while authenticating: ... (code 9)
   ... 26 more identical cycles, ~4/s ...
12:25:28 omarchy-shell[377719]: Starting pam session ... omarchy-lock-fingerprint
12:25:28 omarchy-shell[377728]: Starting pam session ... omarchy-lock-password
12:25:28 omarchy-shell[377728]: Authenticated successfully.

That same resume is also where fprintd decided the on-device store was corrupt and tried to wipe the enrolled prints — the wipe itself timed out, which is the only reason the enrollment survived:

12:25:16 fprintd: Template storage appears to have been corrupted! Error was: transfer timed out
12:25:16 fprintd: Resetting device storage, you will need to enroll all prints again!
12:25:18 fprintd: Reset failed: transfer timed out

So this is a suspend-triggered instance of #7176: fingerprintRetryTimer (interval: 250, no backoff, no failure cap) turns a stale device handle into a ~4/s PAM storm. #7176 frames the retry loop around thermal throttling, but resume-time device errors hit the same path — that may be worth noting there.

Workaround

A /etc/systemd/system-sleep/ pre hook (suggested earlier in this thread) did not work for me: sleep hooks run after the lock has already activated fprintd. I confirmed the fprintd PID was unchanged across a suspend with the hook installed, so the stop never took effect.

Stopping fprintd on resume instead:

[Unit]
Description=Stop fprintd after resume so it drops its stale USB handle
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl stop fprintd.service

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

The retry then lands on a freshly started daemon that re-resets the device:

12:48:16 kernel: PM: suspend exit
12:48:16 systemd[1]: Starting Stop fprintd after resume...
12:48:16 fprintd[388422]: libusb: warning [libusb_exit] application left some devices open
12:48:16 systemd[1]: Stopped Fingerprint Authentication Daemon.
12:48:16 systemd[1]: Starting Fingerprint Authentication Daemon...
12:48:16 kernel: usb 3-7: reset full-speed USB device number 2 using xhci_hcd
12:48:17 omarchy-shell: Authenticated successfully.

Caveat: that is one resume cycle so far, and since the unpatched behaviour is already intermittent I can't yet claim it's deterministic — only that it removes the "daemon survives suspend with a dead handle" precondition. I'll report back if it regresses.

Suggested upstream fix

The tidier fix is probably to not start fingerprint auth while a sleep transition is in flight — e.g. defer startFingerprint() until after PrepareForSleep(false) — so fprintd is never activated inside the delay window at all. That would also stop a doomed PAM session consuming part of the 12s lock budget.

One difference from the original report: my error string is transfer timed out rather than Cannot run while suspended, likely a libfprint/sensor variation on the same condition.

tdhftw avatar Aug 27 '26 11:08 tdhftw

Another reproduction on 4.0.2-1 — and two bugs in the proposed quirk fix (commit 7397b76)

Same failure signature here, and I can also explain why the usbcore.quirks fix in fix-goodix-fingerprint-usb.sh (commit 7397b76) can't have been what fixed the Framework 13 in its test note.

System: Omarchy 4.0.2-1, kernel 7.1.9-arch1-2, 12th Gen Intel Core i5-1240P, Goodix 27c6:609c, fprintd 1.94.5-2, libfprint 1.94.100-1, quickshell 0.3.1-1, mem_sleep = [s2idle].

Reproduction: after every suspend/resume, fprintd reports:

Device reported an error during verify: Cannot run while suspended.

The lock screen then spawns 48 omarchy-lock-fingerprint PAM sessions in ~40 s (the 250 ms retry timer — #7172/#7176 amplification) before falling back to password. The moment fprintd exits idle-timeout and is D-Bus-activated again fresh, verification works immediately — the stale-handle pattern described upthread.

Bug 1: the quirk flag value is invalid — the parser never accepts hex

usbcore.quirks flags are parsed character-by-character in quirks_param_set() (drivers/usb/core/quirks.c):

case 'a': flags |= USB_QUIRK_STRING_FETCH_255; break;
case 'b': flags |= USB_QUIRK_RESET_RESUME;      break;
case 'c': flags |= USB_QUIRK_NO_SET_INTF;       break;
...

27c6:609c:0x0080 fails at the first flag char, so the entry (and quirk) is dropped. Even if hex were accepted, the value is wrong: USB_QUIRK_RESET_RESUME is BIT(1) (= 0x2), not 0x80 (include/linux/usb/quirks.h).

Correct entry: usbcore.quirks=27c6:609c:b

Bug 2: modprobe.d can't configure usbcore — it's built into the kernel

usbcore is builtin (present in modules.builtin, absent from /proc/modules), so options usbcore ... in /etc/modprobe.d/ is never read. The shipped /etc/modprobe.d/omarchy-usb-autosuspend.conf (options usbcore autosuspend=-1) proves the same dead end: it has always been ignored here — /sys/module/usbcore/parameters/autosuspend reads 2 (default) with the file in place.

For a builtin module, the quirk must go on the kernel command line. I suspect the Framework 13 "tested working" outcome was the reboot itself restarting fprintd (fresh claim, re-enumerated device), not the quirk.

Working fix (verified on this machine)

  1. Cmdline quirk via a Limine drop-in — /etc/limine-entry-tool.d/60-goodix-fprint-quirk.conf:

    KERNEL_CMDLINE[default]+=" usbcore.quirks=27c6:609c:b"
    

    then sudo limine-mkinitcpio. Confirmed present in the rebuilt UKI's .cmdline section.

  2. udev rule (the part of 7397b76 that does work) — /etc/udev/rules.d/60-goodix-fingerprint.rules:

    ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="27c6", ATTR{idProduct}=="609c", ATTR{power/control}="on"
    

    Device now reports power/control: on.

  3. Stale-daemon cleanup — /etc/systemd/system-sleep/fix-goodix-fprint.sh (mnemonicspace's local workaround upthread, validated here):

    #!/bin/bash
    case "$1" in
      pre|post) systemctl stop fprintd.service 2>/dev/null || true ;;
    esac
    

Item 1 fixes the device-level -EINVAL soft-resume failure; item 3 keeps the lock-screen race from producing a poisoned daemon regardless. Suggested upstream change: rewrite fix-goodix-fingerprint-usb.sh to write the Limine drop-in (+ limine-mkinitcpio) with the :b flag instead of the inert modprobe.d file.

h6y3 avatar Sep 03 '26 05:09 h6y3

Reviewed against quattro at f99d33a8, with an independent second opinion from codex at xhigh reasoning. Confirmed, and the Omarchy-side trigger is proven in source. Not reproduced — no VM here has a fingerprint reader — so the fprintd-internal consequence is explained rather than reproduced, resting on the four independent journals in this thread.

mnemonicspace and tdhftw have the mechanism right, and it traces cleanly through the code. omarchy-system-sleep-monitor runs itself under a --what=sleep --mode=delay inhibitor (bin/omarchy-system-sleep-monitor:56-61), watches PrepareForSleep (:22-25), and on true synchronously runs omarchy-system-sleep-lock, which requests the lock and then polls until the shell reports secure (bin/omarchy-system-sleep-lock:109-122). On the shell side, beginLock schedules refreshFingerprintStatus() (shell/plugins/lock/Service.qml:140-143), which runs fprintd-list (:380), and WlSessionLock.onSecureStateChanged calls startFingerprint() unconditionally the moment the session goes secure (:235-242). Both are fprintd calls made while the delay window that same code path is holding is still open, which is precisely when logind refuses fprintd its own delay inhibitor. So the lock screen is, by construction, the thing that activates fprintd at the worst possible moment — which is the asymmetry mnemonicspace measured between the sudo path and the lock path.

Two caveats codex raised that are worth recording. Whether a given lock actually activates fprintd cannot be established from source, since the daemon may already be resident — the journals in this thread are what show the Starting Fingerprint Authentication Daemon line landing inside the window. And the lid-close path is not synchronised with logind at all: omarchy-system-lid-close starts the lock from a Hyprland binding deliberately early (bin/omarchy-system-lid-close:7-11), so on that path the arming may precede PrepareForSleep(true) rather than fall inside the window. That matters for the fix — a gate keyed on PrepareForSleep closes the direct-suspend path but cannot close a lid-close lock that armed before the signal arrived.

On the workarounds in the thread: rdockstader's correction about the directory is right, /usr/lib/systemd/system-sleep/ is the only path systemd scans. Two open PRs ship a hook of this shape — #7158's fprintd-resume, which also bounds fprintd's stop timeout so a wedged daemon does not wait out the full SIGKILL delay, and #9868's fprintd-reset. They overlap almost entirely and only one should land. PR #9919 takes the other approach mnemonicspace and tdhftw suggested, holding fprintd calls until PrepareForSleep(false); it is complementary to the hook rather than an alternative, since it prevents the poisoning while a hook only clears it afterwards. The retry storm that amplifies this is #7172 and #7176. Waiting on the maintainer to choose among the four.

omarchybot avatar Sep 03 '26 12:09 omarchybot

Confirming this on different hardware — ThinkPad X1 Carbon Gen 11, Synaptics Prometheus 06cb:00fc (so not Goodix-specific) — with a mechanism detail that I think explains the "persists until fprintd is restarted" part of this issue, and two corrections to the suggested hook.

fprintd doesn't hold a broken handle — it holds two devices

On resume, the reader can drop off the bus entirely rather than just resetting:

kernel: usb 3-6: USB disconnect, device number 6
kernel: usb 3-6: new full-speed USB device number 7 using xhci_hcd

When that happens, fprintd registers a second device object via hotplug and keeps the wedged one. Both are then live on the bus:

$ busctl --system call net.reactivated.Fprint /net/reactivated/Fprint/Manager \
    net.reactivated.Fprint.Manager GetDevices
ao 2 "/net/reactivated/Fprint/Device/0" "/net/reactivated/Fprint/Device/2"

They are not equivalent — the old one is permanently claimed, the new one is fine:

Device/0 -> Claim: Call failed: Device was already claimed     <- ghost
Device/2 -> Claim: OK                                           <- live reader

pam_fprintd uses the default (first) device, so it always gets the ghost, and the working reader sits there unused. That is why only a restart clears it: nothing else reaps the dead object or reorders the list.

Two consequences worth noting, both of which I hit:

  • It isn't limited to the lock screen. Since omarchy-setup-security-fingerprint puts pam_fprintd first in /etc/pam.d/sudo and /etc/pam.d/polkit-1, sudo and every polkit prompt silently drop to the password too, with the lid open, so the clamshell gate isn't involved.
  • The UI still offers the finger. fingerprintConfigured only checks that enrolments and the PAM file exist, so the lock screen keeps prompting for a finger that can never be read.

It needs two conditions, which is why it looks intermittent

Four suspend cycles on one boot:

fprintd at suspend USB on resume Result
clean disconnect fine
busy reset fine — finger unlocked in 2s
busy disconnect broken
busy reset still broken (inherited the ghost)

The "busy" is this, at suspend time:

fprintd: Unexpected error while suspending device: The device is still busy with another operation, please try again later.

Neither condition alone breaks it. Note the last row: once the ghost exists it survives later clean resumes, so the failure outlives the condition that created it — which is probably why it reads as random. USB persist is already on (power/persist = 1, CONFIG_USB_DEFAULT_PERSIST=y) and doesn't prevent it.

#10252 looks like the upstream half of the "busy": the lock starts only after PrepareForSleep(true), so pam_fprintd can never install fprintd's sleep delay inhibitor and the reader is opened for a verify with nothing holding sleep off. That would explain why the device is mid-transaction when power drops.

Two corrections to the suggested hook

I ran the hook from this issue and it didn't fire, for two reasons.

1. /lib/systemd/system-sleep/ is right, but /etc/systemd/system-sleep/ is not. I initially used /etc, which systemd never reads — worth stating explicitly since it fails silently:

$ strings /usr/lib/systemd/systemd-sleep | grep system-sleep
/usr/lib/systemd/system-sleep

2. systemctl restart/stop is the wrong verb. A wedged fprintd ignores SIGTERM and only dies at the stop timeout:

systemd[1]: fprintd.service: State 'stop-sigterm' timed out. Killing.
systemd[1]: fprintd.service: Killing process 3619 (fprintd) with signal SIGKILL.

That matters because sleep hooks run with user.slice frozen and block the resume until they return, so a blocking stop adds ~10s to every resume. The backgrounded (sleep 3; systemctl restart ...) & in the suggestion avoids the delay but is unreliable for the same reason — the resume doesn't wait for it, and the lock screen is already retrying by then.

SIGKILL is safe here (enrolments live on disk in /var/lib/fprint) and fprintd is D-Bus activated, so the next Claim starts it fresh against whatever the bus actually has. No sleep needed: if it comes back before the reader has re-enumerated, hotplug adds the device when it appears — the same hotplug path that creates the second object in the first place.

# /usr/lib/systemd/system-sleep/fprintd-clear-stale-claim
[[ $1 == post ]] || exit 0
systemctl kill --signal=KILL fprintd.service 2>/dev/null || true
systemctl reset-failed fprintd.service 2>/dev/null || true

Runs in 28ms. Verified on a real resume — the hook fires in the window between resume and thaw, and the finger is accepted three seconds later:

08:22:12 systemd-sleep: System returned from sleep operation 'suspend'.
08:22:12 systemd[1]: fprintd.service: Sent signal SIGKILL to main process 37060 on client request.
08:22:12 systemd-sleep: Successfully thawed unit 'user.slice'.
08:22:13 omarchy-shell: Relaying pam message: "Place your right index finger on the fingerprint reader"
08:22:15 omarchy-shell: Authenticated successfully.

That is still a workaround. If #10252 is right that the reader is cut mid-transaction for want of an inhibitor, fixing the lock ordering — or having the lock release the reader on PrepareForSleep, which omarchy-system-sleep-monitor already watches — would stop the ghost being created at all.


Investigation, analysis and this write-up by Claude Code, working on the affected machine: it read the journals, narrowed the root cause, built and verified the hook, and drafted and posted this comment. Reviewed and authorised by me before submission.

e-jacob avatar Sep 08 '26 08:09 e-jacob

Another reproduction, but one that does not fit the sleep-delay-window mechanism described above — the inhibitor was installed and working here, and the daemon still went stale.

System: Omarchy 4.0.3-1 (newer than the 4.0.0/4.0.1 reports here), ThinkPad X13 Gen 2a, AMD Ryzen 5 5600U, Goodix MOC 27c6:6594, fprintd 1.94.5-2, libfprint-git 1:1.94.100.r10.g6f9479c-1, quickshell 0.3.1-1, kernel 7.2.3-arch1-3. Suspend type deep, not s2idle.

fprintd was activated well outside the sleep window

14:58:34  systemd[1]: Starting Fingerprint Authentication Daemon...   <- lock screen appears, fprintd[111431]
14:58:34  systemd[1]: Started Fingerprint Authentication Daemon.
          (fprintd stays resident: the lock screen re-verifies every ~30s)
15:01:05  systemd-logind[890]: Lid closed.
15:01:05  fprintd[111431]: Device reported an error during verify: Cannot run while suspended.
15:01:05  pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed:
          Release failed with error: The device is still busy with another operation, please try again later.
15:01:06  systemd[1]: Reached target Sleep.
15:01:06  kernel: PM: suspend entry (deep)
16:01:08  systemd-logind[890]: Lid opened.
16:01:08  kernel: PM: suspend exit
16:01:25  omarchy-lock-fingerprint -> PAM_AUTHINFO_UNAVAIL (code 9), repeating
16:02:13  systemd[1]: fprintd.service: Deactivated successfully.      <- same PID 111431 finally idle-exits
16:07:42  fresh activation -> "Place your right index finger on the fingerprint reader" (works)

Activation at 14:58:34 precedes Reached target Sleep by 2m32s, so it was nowhere near logind's delay window. Consistent with that:

  • There are zero Failed to install a sleep delay inhibitor / OperationInProgress messages in the entire journal.
  • fprintd suspended its device on cue at 15:01:05, one second before Reached target Sleep. It could only have done that by receiving PrepareForSleep(true) — i.e. its inhibitor was installed and functioning.

So this lands in the "inhibitor installed → works" row of the activation-timing table above, and yet PID 111431 rode through resume in the poisoned state and refused every request for ~65s until it idle-exited.

What this suggests

The common factor across my case and the inhibitor-refused ones isn't the inhibitor — it's the ReleaseDevice failure on the in-flight verify. In both paths a verify is open when the transition starts, the release fails with device is still busy, and whatever claim state that leaves behind is what survives the resume.

If that's right, then keeping fprintd resident with --no-timeout would be necessary but not sufficient: it fixes the case where the inhibitor is refused, but here the inhibitor was already granted at a quiet moment and the daemon still wedged. The system-sleep hook still works for me as a workaround, because it discards the daemon regardless of how it got poisoned.

Not initiating (or explicitly aborting) fingerprint auth on PrepareForSleep(true) — rather than holding a verify open across the transition — would address both variants at the source. That's the suggestion at the end of the second comment above, and from this data point it looks like the more complete of the two.

Happy to test a patch on deep suspend if that's useful — this thread is otherwise all s2idle, which may itself be a relevant difference.

(The resume triggers the retry storm here too — 298 PAM sessions in a single locked session — but that's already covered by #7172 and #7176, so I won't duplicate it in this thread.)

kaoten avatar Sep 09 '26 14:09 kaoten

Additional reproduction: 4.0.3-1, Dell Precision 5690, Goodix MOC — presented as a black screen that required a hard reboot

Same suspend-time fprintd poison as this issue, still present on current Omarchy. The user-visible outcome here was not “fingerprint failed, type the password”: the panel stayed dark after lid-open and the only way out was a forced power cycle.

System

Field Value
Omarchy 4.0.3-1
Kernel 7.2.3-arch1-3
Machine Dell Precision 5690
GPU Intel Arc (i915 Meteor Lake-P 7d55) + NVIDIA RTX 1000 Ada (nvidia)
Sleep s2idle
Fingerprint Goodix MOC (USB)
fprintd 1.94.5-2 (from the previous boot’s journal)

Sequence (Fri 2026-09-11, CDT)

Lid closed at 02:31:33. In-flight lock-screen verify died on the way down, same two lines as the original report:

fprintd: Device reported an error during verify: Cannot run while suspended.
pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed: The device is still busy with another operation, please try again later.

Lid opened at 07:43:26. Kernel resume was clean: PM: suspend exit, i915 GuC/HuC reloaded, Wi-Fi reassociated, hyprmoncfgd selected profile laptop with lid=open and logged waking displays. Hyprland did not crash. No OOM.

Then the lock screen’s fingerprint PAM (omarchy-lock-fingerprint) failed immediately, every ~250 ms, with:

Error while authenticating: "Authentication service cannot retrieve authentication info" (code 9)
fprintd: Authorization denied ... ListEnrolledFingers ... Not Authorized: net.reactivated.fprint.device.verify

117 of those PAM sessions in 32 seconds. None reached “Place your finger…”.

At 07:43:47 a short power-key press was logged and ignored (HandlePowerKey=ignore). At 07:43:58 the lid closed and suspend started again. Journal ends there; the machine was hard-rebooted at 07:45:26.

Why this is worth attaching here

The fprintd-across-suspend seed is already diagnosed on this issue (and #10252). The 250 ms retry storm is #9905 / #7176 / #7172. Not re-arguing those.

What this trace adds:

  1. Still broken on 4.0.3-1, on a third Goodix MOC machine (Precision 5690, hybrid Intel+NVIDIA, s2idle).
  2. The retry storm is how a suspend glitch becomes a “dead laptop.” idleBlankTimer blanks the panel 5 s after lock unless a password check is in flight (Service.qml: fingerprint PAM is explicitly not treated as a reason to keep the display up). After resume the fingerprint path is a tight fail loop, so it never calls runWake(), and there is no drawn UI to type into. That matches the laptop-only dark-panel path in #10170, compounded by this issue’s poisoned fprintd.
  3. omarchy-sleep-lock.service was also in its inhibit-already-running restart loop (counter 39 at wake) — same unit failure as #7280. Not the black screen itself, but the pre-suspend lock helper was not healthy on this boot either.

No config was changed for this report. Diagnosis was journal-only from the previous boot.

Filed by grok-4.6 via pi.

fils avatar Sep 11 '26 12:09 fils

Another reproduction on 4.0.3-1, plus a negative result for the USB-autosuspend approach.

System: Framework Laptop 13 (AMD Ryzen 5 7640U), Goodix MOC 27c6:609c, Omarchy 4.0.3-1, kernel 7.2.3-arch1-3, mem_sleep = [s2idle], systemd 261.2-1, fprintd 1.94.5-2, libfprint-git 1:1.94.100.r10.g6f9479c-1, quickshell 0.3.1-1.

Same signature over the last two weeks: six "Cannot run while suspended" errors plus repeated inhibitor refusals. A selection:

2026-08-29T09:05:40 fprintd: Device reported an error during verify: Cannot run while suspended.
2026-08-30T21:34:34 fprintd: Failed to install a sleep delay inhibitor: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
2026-09-02T08:59:43 fprintd: Device reported an error during verify: Cannot run while suspended.
2026-09-09T15:26:55 fprintd: Device reported an error during verify: Cannot run while suspended.
2026-09-10T15:39:20 fprintd: Device reported an error during verify: Cannot run while suspended.
2026-09-11T09:13:52 fprintd: libusb: warning [libusb_exit] device 1.2 still referenced

Disabling USB runtime autosuspend doesn't help. libfprint's hwdb enables autosuspend for this reader (power/control=auto). I pinned it to on with a udev rule (the same idea as the power/control part of #5130) and suspended again. The trigger still fired:

09:26:38 fprintd: Failed to install a sleep delay inhibitor: GDBus.Error:org.freedesktop.login1.OperationInProgress: ...
09:26:38 omarchy-shell: Starting pam session ... with config "omarchy-lock-fingerprint"
09:26:38 kernel: PM: suspend entry (s2idle)
09:27:34 kernel: PM: suspend exit
09:27:35 omarchy-shell: Authenticated successfully.

That resume happened to recover (the nondeterminism tdhftw described), and I briefly mistook it for a fix (#11328, now closed). Worth knowing before anyone takes the autosuspend route: it doesn't touch the sleep-window activation, and one clean resume after applying it proves nothing. The fixes aimed at the actual mechanism are still #9919 (prevent) and #7158 / #9868 (recover).

(Drafted and posted by Claude for the account owner.)

RobertStevenson avatar Sep 11 '26 14:09 RobertStevenson

Additional reproduction with a Goodix MOC Fingerprint Sensor on Omarchy 4.0.3-1.

Hardware

  • Laptop: Framework Laptop 13 (AMD Ryzen 7040 Series)
  • CPU: AMD Ryzen 5 7640U
  • GPU: integrated AMD Radeon 760M (Phoenix1)
  • Fingerprint reader: Goodix MOC Fingerprint Sensor, USB ID 27c6:609c

Environment

  • Kernel: 7.2.3-arch1-3
  • fprintd: 1.94.5-2
  • libfprint-git: 1:1.94.100.r10.g6f9479c-1
  • quickshell: 0.3.1-1
  • Lock screen: Omarchy shell, using omarchy-lock-fingerprint PAM authentication
  • Suspend mode: s2idle

Observed sequence

  1. Fingerprint unlock works.
  2. Close the laptop lid to suspend, then reopen it.
  3. Fingerprint unlock fails; password unlock still works.
  4. Restart fprintd.service; fingerprint unlock works again.

This is intermittent here: after the first restart, both a lock/unlock without sleep and a sleep/wake unlock succeeded. The failure returned after a later lid-close suspend. Restarting fprintd.service restored fingerprint unlock on both occasions. No PAM configuration changes or re-enrollment were needed for either recovery.

Relevant log messages (timestamps, hostnames, usernames, and process IDs omitted):

fprintd: Failed to install a sleep delay inhibitor: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
fprintd: Device reported an error during verify: Cannot run while suspended.
pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed: Release failed with error: The device is still busy with another operation, please try again later.
quickshell.service.pam.subprocess: Error while authenticating: "Authentication service cannot retrieve authentication info" (code 9)

The inhibitor error occurred as suspend began. After resume, the lock screen repeatedly retried fingerprint authentication, with immediate code 9 failures several times per second.

On the later recurrence, shortly after resume, there were also these messages:

fprintd: Template storage appears to have been corrupted! Error was: transfer timed out
fprintd: A known reason for this to happen is a firmware bug triggered by another storage area being initialized.
fprintd: Resetting device storage, you will need to enroll all prints again!
fprintd: Reset failed: transfer timed out

Despite those messages, after restarting the service, the enrolled fingerprints were still listed and fingerprint unlock succeeded. The storage warning therefore did not establish that enrollment data was actually lost in this case.

An automatic restart after resume has not been installed or tested here yet. These observations confirm the manual recovery, but do not establish the underlying driver/daemon failure mechanism.

This comment was written and posted by Codex.

TomLisankie avatar Sep 12 '26 03:09 TomLisankie

Tested PR #7158’s resume hook and 3s fprintd stop timeout on another affected reader: Goodix 27c6:6890, Omarchy 4.0.3, fprintd 1.94.5-2, s2idle.

After resume, fprintd was restarted and the lock screen authenticated by fingerprint about 1.3 seconds later. No password fallback was needed.

Razuer avatar Sep 17 '26 08:09 Razuer

Data point: ThinkPad X1 Carbon Gen 7 (20QD001JED), Synaptics 06cb:00bd, S3 deep. Omarchy 4.0.4-1, fprintd 1.94.5-2 / libfprint 1.94.100-1, systemd 261.2-1, no nvidia (so user.slice is frozen during sleep).

The lid-close race described here reproduces on every lid-close suspend on this machine: fprintd's inhibitor was refused with OperationInProgress on 9 of 9 over a month. Two things I haven't seen in the thread yet:

1. A verify already in flight does not recover quickly when the reader re-enumerates. #9919 leaves a running scan alone because "the old device object reports device was disconnected, the PAM verify fails, and the retry timer starts a fresh scan". Here the screen had been locked for 4 minutes (fprintd resident, inhibitor held) before a 10 s lid close. The reader re-enumerated on resume, and the stale verify did not fail fast. It hung until its own 30 s timeout:

21:08:12 kernel: usb 1-9: USB disconnect, device number 3
21:08:12 kernel: usb 1-9: new full-speed USB device number 6 using xhci_hcd
21:08:22 fprintd[52789]: Async command sending failed: USB error on device 06cb:00bd : No such device (it may have been disconnected) [-4]
21:08:22 quickshell.service.pam.subprocess: Relaying pam message: "Verification timed out"
21:08:27 (unlocked by password)

The reader was dead for about 10 s after lid-open, so in practice you type the password. Holding new PAM starts until resume won't cover this; the verify that is already running has to be ended or restarted too.

2. With user.slice frozen, a pre stop hook is not re-activated before sleep. #12705, #11412 and #9905 expect a pre-stage systemctl stop fprintd.service to be undone by the lock screen's retry during the sleep window. On this setup it isn't: the hook runs after Successfully froze unit 'user.slice', and fprintd stays down until thaw. On resume the old PAM session ends at once (fprintd name owner changed during operation!), the 250 ms retry activates a fresh fprintd, and fingerprint unlock worked 1.5-3.9 s after lid-open in three runs: the race above with fprintd idle, with fprintd still resident, and the re-enumeration case. The re-enumeration run:

23:32:47.596 systemd-sleep: Successfully froze unit 'user.slice'.
23:32:47.613 systemd: Stopping Fingerprint Authentication Daemon...   (the hook)
23:32:47.620 kernel: PM: suspend entry (deep)
23:33:59.465 kernel: usb 1-9: USB disconnect, device number 3
23:33:59.525 pam_fprintd: fprintd name owner changed during operation!
23:33:59.611 pam_fprintd: ReleaseDevice failed: Object does not exist at path "/net/reactivated/Fprint/Device/0"
23:34:00.200 (lock screen retry, fresh fprintd)
23:34:02.267 quickshell.service.pam.subprocess: Authenticated successfully.

This does not settle the concern in #10252, where the same reader's on-chip templates were wiped with this hook installed. The hook SIGTERMs fprintd with the device still open (Device was not cleaned up properly before being finalized). Without the hook, the same verify is cut by power loss a few milliseconds later instead, so neither path is clean. My prints have survived 9 unhooked races and 3 hook cuts so far, which is too few to say anything about a failure seen 3 times in 12 days there. And the freeze only holds without SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false, which nvidia-utils sets (#10796).

For searchability, two lines from the moment of resume that I haven't seen quoted elsewhere: usb 1-9: usbfs: process N (fprintd) did not claim interface 0 before use and pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed: Release failed with error: Power down failed: 101.

The clean fix still looks like the QML side, as #12705 suggests: don't arm fingerprint PAM for a sleep-triggered lock, and end or restart a verify that is already running around PrepareForSleep.

Diagnosed and written with Claude Code; the logs and tests are from my machine.

Captnjo avatar Sep 29 '26 19:09 Captnjo

The queued post-resume restart and lock recovery are consolidated in #7158 at 56e18dda54f14bd50909cdc326410aaac252bf5a. GPT-6 in Codex and Claude Opus 5.5 Medium checked the source. Real fprintd/PAM recovery after a queued restart and a four-second shell pause passed on an ISO worker with the official virtual reader; actual USB hardware and kernel suspend were not tested. The PR links this issue for closure when the maintainer merges.

omarchybot avatar Oct 04 '26 16:10 omarchybot

The queued post-resume fprintd restart and stale lock-attempt recovery have now merged in #7158; this issue was closed by the merge.

GPT-6 in Codex and Claude Opus 5.5 Medium checked the coverage against the landed source; Claude's agreement does not guarantee independence. This closure review was read-only and did not rerun runtime tests.

omarchybot avatar Oct 04 '26 17:10 omarchybot

Root cause found and a fix is up for review upstream: https://gitlab.freedesktop.org/libfprint/fprintd/-/merge_requests/259

When the lock screen's verify is cancelled by suspend, libfprint refuses the Release's close while the device is suspended, but fprintd drops its session anyway. The device stays open with no owner, and every Claim after resume fails within a millisecond until the daemon idle-exits, which is what the lock screen's retry storm was hitting. The patch makes fprintd close the orphaned device on resume (or before the next Claim), with regression tests, and the upstream pipeline is green.

Confirmed on a Framework Laptop 13 (AMD Ryzen AI 9 HX 370) with a Goodix 27c6:609c on Omarchy 4.0.4: with the patch backported onto fprintd 1.94.5, lid-close during a lock-screen verify followed by resume now unlocks on the first touch. Once that lands in Arch's fprintd package, the restart-after-resume hook from #7158 should no longer be needed.

ciaranlee avatar Oct 21 '26 19:10 ciaranlee