Skip to content

Flash the lock screen fingerprint icon when a read is rejected - #11162

Open
PapeThePope wants to merge 2 commits into
omacom:quattrofrom
PapeThePope:lock-fingerprint-failure-feedback
Open

PapeThePope wants to merge 2 commits into
omacom:quattrofrom
PapeThePope:lock-fingerprint-failure-feedback

Conversation

@PapeThePope

@PapeThePope PapeThePope commented Sep 10, 2026 •

Copy link
Copy Markdown

Problem

The lock screen gives no feedback when a fingerprint read is rejected. The hint icon sits static while pam_fprintd relays Failed to match fingerprint and the PAM conversation keeps running, so a rejected touch looks the same as a sensor that isn't reading at all.

Fix

Give the fingerprint hint icon a brief rejection flash:

  • Service.qml bumps fingerprintFailureTick whenever the fingerprint PamContext relays a message with messageIsError, and passes the counter to the view.
  • LockView.qml flips the icon to Color.lock.textError and dims it to 0.2 opacity for a second, then a timer returns it to the hint color.

Only rejected reads flash: silent verify timeouts and PAM service errors relay no error message, so the icon is left alone.

The opacity dim matters because the flash must not rely on the theme's error color being distinct. A survey of the 22 stock themes (generating each shell.toml with omarchy-theme-set-templates) found two where a color-only flash is invisible:

  • tokyo-night ships themes/tokyo-night/shell.lock.toml with every [lock] color — including text-error and border-active — set to the foreground (#a9b1d6), so error and idle states are identical. That also means failed-password error coloring never shows on tokyo-night.
  • vantablack has text-error = #a4a4a4 against placeholder = #a8a8a8, which is imperceptible.

The remaining 20 stock themes get distinct error colors from default/themed/shell.toml.tpl. Dimming in addition to recoloring keeps the feedback visible regardless of the theme palette.

Deliberately scoped to the visual feedback. The display blank/wake behavior during a fingerprint verify is separate work (see #10653), and the "reader unavailable" state belongs to #7158.

Tests

  • New test/shell.d/lock-fingerprint-feedback-test.sh covers the service wiring: an error message bumps the tick, the tick reaches the view, the flash clears on its timer, and the icon binds to the error color and dims.
  • test/shell.d/lock-fingerprint-indicator-test.sh now also asserts the icon enters its error state, uses the error color, and dims on a rejected read.
  • All lock shell tests pass: apply-lock, lock-blank-fingerprint, lock-fingerprint-feedback, lock-fingerprint-indicator, lock-password-overflow, lock-stranded-recovery, sleep-lock, system-lock, update-lock, hyprland-session-locked.

Verification on hardware

With a Broadcom sensor and fprintd, a rejected read flashes the icon in the error color and dims it, then it returns to the hint color a second later; a valid read still unlocks unchanged. Also verified live on the tokyo-night theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants