From 958672badd797da90cf97b0a4f4f049f136fe99b Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 21 Jul 2026 17:53:58 -0400 Subject: [PATCH] lock/pam: attempt to fix fprintd retry spam after resume --- quickshell/Modules/Lock/LockScreenContent.qml | 2 +- quickshell/Modules/Lock/Pam.qml | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/quickshell/Modules/Lock/LockScreenContent.qml b/quickshell/Modules/Lock/LockScreenContent.qml index f64e94a8f..1791ebd7d 100644 --- a/quickshell/Modules/Lock/LockScreenContent.qml +++ b/quickshell/Modules/Lock/LockScreenContent.qml @@ -779,7 +779,7 @@ Item { return "passkey"; if (pam.fprint.tries >= SettingsData.maxFprintTries) return "fingerprint_off"; - if (pam.fprint.active) + if (pam.fprint.active || pam.fprint.retrying) return "fingerprint"; if (pam.u2f.active) return "passkey"; diff --git a/quickshell/Modules/Lock/Pam.qml b/quickshell/Modules/Lock/Pam.qml index 84f8f096b..6a07d5567 100644 --- a/quickshell/Modules/Lock/Pam.qml +++ b/quickshell/Modules/Lock/Pam.qml @@ -262,9 +262,11 @@ Scope { property bool available: SettingsData.lockFingerprintReady property int tries property int errorTries + property bool retrying: false function checkAvail(): void { if (!available || !SettingsData.enableFprint || !root.lockSecured || root.fprintSuppressedByPrimaryPam) { + retrying = false; abort(); return; } @@ -273,6 +275,7 @@ Scope { tries = 0; errorTries = 0; + retrying = false; start(); } @@ -285,6 +288,7 @@ Scope { switch (res) { case PamResult.Success: + retrying = false; if (!root.unlockInProgress) { passwd.abort(); root.proceedAfterPrimaryAuth(); @@ -293,13 +297,16 @@ Scope { case PamResult.Error: errorTries++; if (errorTries < 200) { + retrying = true; abort(); errorRetry.restart(); return; } + retrying = false; abort(); return; case PamResult.MaxTries: + retrying = false; tries++; if (tries < SettingsData.maxFprintTries) { root.fprintState = "fail"; @@ -418,7 +425,7 @@ Scope { Timer { id: errorRetry - interval: 1500 + interval: Math.min(1500 * Math.pow(2, Math.max(0, fprint.errorTries - 1)), 30000) onTriggered: fprint.start() }