diff --git a/README.md b/README.md index d581e65..3babd25 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ sudo dnf install touchpad-hold-tap sudo dnf install plasma-always-show-unlock sudo dnf install plasma-task-group-shortcuts sudo dnf install plasma-fingerprint-workaround +sudo dnf install fingerprint-resume-recovery sudo dnf install fedora-tools-settings sudo dnf install plasma-panel-actions ``` @@ -58,6 +59,13 @@ The `touchpad-hold-tap` package requires libinput 1.30 or newer and a compositor that enables libinput plugins. Log out and back in after installation or an update so the compositor reloads the plugin. +### Fingerprint resume recovery + +The `fingerprint-resume-recovery` package restores fingerprint unlocking after +sleep by restarting the reader service before the desktop resumes. It requires +Plasma 6.8 or newer and leaves Fedora's KScreenLocker package unchanged. +Installing enables it; removing disables it. + ### Always-visible Plasma unlock prompt The `plasma-always-show-unlock` package keeps Plasma's password and fingerprint @@ -117,6 +125,8 @@ plasma-task-group-shortcuts --restore-shortcuts ### Plasma fingerprint workaround +For Plasma 6.8 and newer, use fingerprint resume recovery above for this issue. + Experimental and unaudited. The `plasma-fingerprint-workaround` package is an inert controller for installing a patched Fedora KScreenLocker build that recovers fingerprint authentication after suspend. It makes no lock-screen diff --git a/fingerprint-resume-recovery/README.md b/fingerprint-resume-recovery/README.md new file mode 100644 index 0000000..cc28ebd --- /dev/null +++ b/fingerprint-resume-recovery/README.md @@ -0,0 +1,20 @@ +# Fingerprint resume recovery + +Restores fingerprint unlocking when the reader stops working after sleep on +KDE Plasma 6.8. Tested with Fedora 45 and the Framework Laptop 13 Pro's Goodix +reader. + +```bash +sudo dnf install fingerprint-resume-recovery +``` + +The package restarts an active `fprintd` service after wake, before the desktop +continues authentication. It leaves Fedora's login software unchanged and runs +only during resume. No reboot or configuration is needed. + +This is a workaround for reader recovery, not an upstream fix. Remove the +package to disable it: + +```bash +sudo dnf remove fingerprint-resume-recovery +``` diff --git a/fingerprint-resume-recovery/fingerprint-resume-recovery b/fingerprint-resume-recovery/fingerprint-resume-recovery new file mode 100755 index 0000000..a5e3a9a --- /dev/null +++ b/fingerprint-resume-recovery/fingerprint-resume-recovery @@ -0,0 +1,7 @@ +#!/bin/sh +# SPDX-License-Identifier: MIT + +[ "$1" = post ] || exit 0 + +# Finish before systemd thaws user sessions and the lock screen retries. +exec /usr/bin/timeout 10s /usr/bin/systemctl try-restart fprintd.service diff --git a/fingerprint-resume-recovery/fingerprint-resume-recovery.spec b/fingerprint-resume-recovery/fingerprint-resume-recovery.spec new file mode 100644 index 0000000..c5fdcf9 --- /dev/null +++ b/fingerprint-resume-recovery/fingerprint-resume-recovery.spec @@ -0,0 +1,45 @@ +Name: fingerprint-resume-recovery +Version: 0.1.0 +Release: 1%{?dist} +Summary: Restore fingerprint unlocking after sleep +License: MIT +URL: https://git.ajpanton.se/ajp_anton/fedora-tools +Source0: fingerprint-resume-recovery +Source1: LICENSE +Source2: README.md +BuildArch: noarch +BuildRequires: bash +Requires: coreutils +Requires: fprintd +Requires: systemd +Requires: kscreenlocker >= 6.8 +Requires: plasma-desktop >= 6.8 +Provides: fedora-tools-tool + +%description +Restarts an active fingerprint service after resume, before the lock screen +retries authentication. This works around fingerprint failures after sleeping +with an active scan. Installing the package enables recovery; removing it +restores the default behaviour. Fedora's KScreenLocker package is kept intact. + +%prep + +%build + +%check +sh -n %{SOURCE0} + +%install +install -Dpm 0755 %{SOURCE0} \ + %{buildroot}%{_prefix}/lib/systemd/system-sleep/fingerprint-resume-recovery +install -Dpm 0644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE +install -Dpm 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.md + +%files +%license %{_licensedir}/%{name}/LICENSE +%doc %{_docdir}/%{name}/README.md +%{_prefix}/lib/systemd/system-sleep/fingerprint-resume-recovery + +%changelog +* Sat Nov 14 2026 fedora-tools contributors - 0.1.0-1 +- Recover the fingerprint service before user sessions resume diff --git a/scripts/build-fingerprint-resume-recovery-rpm b/scripts/build-fingerprint-resume-recovery-rpm new file mode 100755 index 0000000..38bf1c8 --- /dev/null +++ b/scripts/build-fingerprint-resume-recovery-rpm @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) +tool_dir="$repo_root/fingerprint-resume-recovery" +topdir="$repo_root/rpmbuild" +mkdir -p "$topdir"/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} +install -m 0755 "$tool_dir/fingerprint-resume-recovery" "$topdir/SOURCES/fingerprint-resume-recovery" +install -m 0644 "$repo_root/LICENSE" "$topdir/SOURCES/LICENSE" +install -m 0644 "$tool_dir/README.md" "$topdir/SOURCES/README.md" +rpmbuild --define "_topdir $topdir" -bb "$tool_dir/fingerprint-resume-recovery.spec" diff --git a/scripts/test-all b/scripts/test-all index 9d54bcd..0c51936 100755 --- a/scripts/test-all +++ b/scripts/test-all @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: MIT -# Requires the Fedora build dependencies for all seven tools; never installs them. +# Requires the Fedora build dependencies for these tools; never installs them. set -euo pipefail repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) build_dir=${FEDORA_TOOLS_TEST_BUILD_DIR:-"$repo_root/local/test-build"} @@ -9,6 +9,7 @@ for script in scripts/*; do if [[ -f $script ]]; then bash -n "$script"; fi done bash scripts/tests/test-source-archives +sh -n fingerprint-resume-recovery/fingerprint-resume-recovery plugin=touchpad-hold-tap/90-touchpad-hold-tap.lua lua touchpad-hold-tap/tests/test-touchpad-hold-tap.lua "$plugin"