Skip to content

Stop fprintd before suspend to protect the reader mid-sleep - #10656

Closed
surim0n wants to merge 1 commit into
omacom:quattrofrom
surim0n:fix/fprintd-sleep-release
Closed

Stop fprintd before suspend to protect the reader mid-sleep#10656
surim0n wants to merge 1 commit into
omacom:quattrofrom
surim0n:fix/fprintd-sleep-release

Conversation

@surim0n

@surim0n surim0n commented Sep 7, 2026

Copy link
Copy Markdown

Summary

pam_fprintd D-Bus-activates fprintd after PrepareForSleep(true), when logind has already stopped accepting new delay inhibitors. The fingerprint reader can then be cut mid-transaction during suspend. Add a pre sleep hook that stops fprintd before the kernel sleeps.

Fixes #10252.

Change

  • Add default/systemd/system-sleep/50-fprintd-release, a pre hook that stops fprintd.service only if active.
  • Add migrations/1788797303.sh to copy the hook to /usr/lib/systemd/system-sleep/ on existing installs.
  • Update bin/omarchy-setup-security-fingerprint to install the hook when fingerprint auth is set up.
  • Add test/shell.d/fprintd-sleep-release-test.sh to cover the hook, migration, and setup wiring.

Notes

  • fprintd is Type=dbus, so it re-activates on the next unlock attempt and does not need a post hook.
  • The hook uses || true on systemctl stop so a stuck fprintd cannot abort a suspend.

Test plan

  • bash test/shell.d/fprintd-sleep-release-test.sh passes
  • bash test/shell.d/systemd-test.sh still passes
  • git diff --check clean
  • Real suspend/resume with fingerprint on a laptop (needs hardware)

Generated with Devin

…reader mid-transition.

pam_fprintd D-Bus-activates fprintd after PrepareForSleep(true), when
logind has already stopped accepting new delay inhibitors. The reader can
then be cut mid-transaction during suspend. Add a pre-sleep hook that stops
fprintd so the lock screen cannot open it, and install it from both new
fingerprint setups and a one-time migration. fprintd is Type=dbus and
re-activates on the next touch.

- default/systemd/system-sleep/50-fprintd-release: the pre-sleep hook
- migrations/1788797303.sh: copy the hook to /usr/lib/systemd/system-sleep
- bin/omarchy-setup-security-fingerprint: install the hook during setup
- test/shell.d/fprintd-sleep-release-test.sh: static coverage

Fixes omacom#10252.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@surim0n

surim0n commented Sep 8, 2026

Copy link
Copy Markdown
Author

Withdrawing this implementation after a closer review. The is-active gate skips fprintd while it is activating, and a one-time stop does not establish the claimed barrier against subsequent D-Bus activation or prove safe device quiescence. The corrected workaround in #10252 is explicitly unverified. #9919 and #8531 address fingerprint activation around sleep more directly; I would rather help validate that work than add an unverified competing hook. This does not mean the underlying issue is resolved.

@surim0n surim0n closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock-on-suspend runs after PrepareForSleep(true), so pam_fprintd can never install fprintd's sleep delay inhibitor

1 participant