Stop fprintd before suspend to protect the reader mid-sleep - #10656
Closed
surim0n wants to merge 1 commit into
Closed
Stop fprintd before suspend to protect the reader mid-sleep#10656surim0n wants to merge 1 commit into
surim0n wants to merge 1 commit into
Conversation
…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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pam_fprintdD-Bus-activatesfprintdafterPrepareForSleep(true), when logind has already stopped accepting new delay inhibitors. The fingerprint reader can then be cut mid-transaction during suspend. Add apresleep hook that stopsfprintdbefore the kernel sleeps.Fixes #10252.
Change
default/systemd/system-sleep/50-fprintd-release, aprehook that stopsfprintd.serviceonly if active.migrations/1788797303.shto copy the hook to/usr/lib/systemd/system-sleep/on existing installs.bin/omarchy-setup-security-fingerprintto install the hook when fingerprint auth is set up.test/shell.d/fprintd-sleep-release-test.shto cover the hook, migration, and setup wiring.Notes
fprintdisType=dbus, so it re-activates on the next unlock attempt and does not need aposthook.|| trueonsystemctl stopso a stuck fprintd cannot abort a suspend.Test plan
bash test/shell.d/fprintd-sleep-release-test.shpassesbash test/shell.d/systemd-test.shstill passesgit diff --checkcleanGenerated with Devin