Skip to content

Keep a TOD-provided libfprint when enabling fingerprint auth - #12833

Merged
dhh merged 3 commits into
omacom:quattrofrom
pelifix:fix-latitude-9440-fingerprint
Nov 21, 2026
Merged

dhh merged 3 commits into
omacom:quattrofrom
pelifix:fix-latitude-9440-fingerprint

Conversation

@pelifix

@pelifix pelifix commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Reopening #11846 narrowed, as the duplicate check invited. That PR bundled two fixes; the reader-detection half is dropped here in favour of #9524, which does the same detection with better tests. GitHub would not let me reopen #11846 itself after the branch was force-pushed, hence a new one.

What remains is the half #9524 does not cover — it touches only bin/omarchy-hw-fingerprint.

The bug

omarchy-setup-security-fingerprint installs libfprint-git with --ask 4. That flag was added so the conflict with stock libfprint resolves inside a single transaction, but it accepts any replacement pacman proposes.

Readers libfprint cannot drive at all run on a TOD stack instead — a libfprint fork plus a vendor blob — and that fork provides libfprint-2.so.2 itself. On those machines the transaction removes the only working driver, with no prompt.

The fix

Ask which package owns the library, and skip libfprint-git unless it is stock libfprint or libfprint-git already:

libfprint_owner=$(pacman -Qqo /usr/lib/libfprint-2.so.2 2>/dev/null || true)

The owner is the reliable signal: TOD packages are named differently per vendor, so a hardcoded list of package names would go stale.

Why this matters alongside #9524

The two need each other. #9524 makes omarchy detect these readers, so it starts offering fingerprint setup to exactly the users whose driver that setup then removes. Merged on its own, it turns a reader omarchy ignored into one it breaks.

Testing

test/shell.d/fingerprint-package-test.sh gains four cases: a TOD-provided libfprint is kept and libfprint-git skipped; a fully installed TOD machine touches pacman not at all; stock libfprint is still replaced as before; an existing libfprint-git still completes the package set. Nine assertions pass.

Verified on a Dell Latitude 9440 (Broadcom ControlVault 3), where libfprint-tod plus the vendor blob is the only stack that drives the reader.

🤖 Generated with Claude Code

Fixes #11899

@llstrk

llstrk commented Sep 21, 2026

Copy link
Copy Markdown

Verified: No production issue found in the package-selection scope at 9141da7848be. Nonstock library owners skip libfprint-git; stock, fresh and existing-git installation behavior is preserved.

Real pacman transactions with synthetic packages produced this baseline/head comparison:

Starting TOD state Baseline This PR
No package depends on the TOD fork Removes the fork noninteractively Keeps the fork; installs fprintd usbutils
Vendor package depends on libfprint-tod Refuses removal and aborts setup Keeps both packages; installs missing tools
Same stack with both tools installed Attempts the conflicting transaction Skips installation; reaches enrollment

Thus the baseline symptom can be either driver removal or a dependency-check failure, depending on the installed vendor package.

The nine package tests pass, and the updated suite rejects baseline code at the first TOD case. Optional test improvement: All nine also pass a diagnostic mutation replacing ownership lookup with a hardcoded libfprint-tod presence check. Adding a case with LIBFPRINT_OWNER=libfprint-tod-git and INSTALLED=libfprint-tod-git, checked with assert_keeps_driver, passes on this PR and rejects that mutation, protecting the intended package-name independence.


Review information

Test scope: Production setup and package helper, isolated real pacman queries/transactions with synthetic packages, and stubbed hardware/enrollment calls. No real driver binaries, reader detection, successful enrollment or PAM authentication tested.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Initial Astra inspection, independent Fable 5.1 and separate Astra reviews, followed by coordinator verification of claims against targeted source and saved test evidence.

@pelifix
pelifix force-pushed the fix-latitude-9440-fingerprint branch 2 times, most recently from 94fed35 to 47eb312 Compare September 23, 2026 18:41
@llstrk

llstrk commented Sep 23, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Verified: Follow-up to the earlier review, rechecked at 47eb31205df7 (the rebased single commit). No issue found in the package-selection scope. Both earlier points are settled:

Earlier point (at 9141da7848be) Status at 47eb31205df7
Nonstock library owners skip libfprint-git; fresh, stock and existing-git installs unchanged Still verified
Optional test improvement: add a libfprint-tod-git owner case Resolved

Verified (package selection): The ownership check is unchanged since the earlier review. The only production difference is the base branch's -- before the package targets, which pacman 7.1.0 accepts. Real pacman transactions with synthetic packages, parent d3cfd53b997f against this PR:

Starting TOD state Parent This PR
libfprint-tod only Removes the fork noninteractively, installs libfprint-git Keeps the fork; installs fprintd usbutils
libfprint-tod + vendor package Refuses removal; setup aborts before enrollment Keeps both; installs the tools
Same stack with both tools installed Attempts the conflicting transaction; aborts No transaction; reaches enrollment
libfprint-tod-git + vendor package Refuses removal; setup aborts Keeps both; installs the tools

Fresh, stock libfprint and existing libfprint-git states still install libfprint-git fprintd usbutils in one transaction, with no transaction when libfprint-git and both tools are already installed.

Verified (tests): All 10 package tests pass, and the head tests reject the parent's code at the first TOD case. The hardcoded libfprint-tod mutation described in the earlier review now fails at the new case. That detection relies on the test's exact-name pacman stub: real pacman -Q libfprint-tod also matches packages that provide that name, which both AUR TOD forks do. The new case therefore pins the owner-based rule at the unit-test level.

Optional test improvement: The stub's -Qqo branch returns LIBFPRINT_OWNER without checking the queried path. A diagnostic mutation querying /usr/lib/libfprint-2.so.1 passes all 10 cases, although on a system where that path is not package-owned the lookup would return no owner and bring back the libfprint-git replacement. Making the stub answer only for /usr/lib/libfprint-2.so.2 (and exit 1 otherwise) would let the suite reject that mutation (suggested, not run).


Review information

Test scope: Current-head setup script, package helper and package test; isolated test runs and diagnostic mutations; isolated real pacman 7.1.0 transactions against a private package root with synthetic packages mirroring Arch, omarchy-pkgs and AUR provides/conflicts/depends; pacman and packaging source. Hardware detection, sudo and enrollment were stubbed. The real pacman transactions come from one of the two technical assessments; the other confirmed the package selection from pacman and packaging source plus the package test. No real driver binaries, reader detection, successful enrollment or PAM authentication tested.

AI process: Fresh follow-up round: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments with a targeted cross-check of the optional test note, and an Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@pelifix
pelifix force-pushed the fix-latitude-9440-fingerprint branch from 47eb312 to 739e3d3 Compare September 24, 2026 09:08
@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! verified Omarchy Triage has verified that this issue is ready for final review labels Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 739e3d31 against quattro (d3cfd53b). The fix holds, and nothing needs changing.

Reproduced with real pacman on a disposable Omarchy worker. I built a synthetic fork package that ships /usr/lib/libfprint-2.so.2 and declares provides=(libfprint libfprint-2.so) and conflicts=(libfprint), the way TOD forks and libfprint-goodix53x5 do, and installed it. Then I ran the setup with only the hardware check stubbed. On the base script, the --ask 4 transaction removed the fork without a prompt, and libfprint-git ended up owning the library. On this head, the fork was kept and only fprintd and usbutils were installed. A fresh machine still gets libfprint-git, and stock libfprint is still replaced by it, both checked the same way.

Tests on the worker: fingerprint-package-test.sh passes all 10 cases at the head and fails at the first TOD case with the script change reverted. ./test/cli passes. In ./test/shell, 3333 assertions pass. Four files fail (ascii-test.sh, branding-about-animation-test.sh, kernel-headers-migration-test.sh, omarchy-kernel-migration-test.sh), and they fail the same way on the base commit, so they are not caused by this change.

Review: read in full by Claude Opus 5.5. The ownership query handles an unowned or missing library: it falls back to installing libfprint-git, as before. It also covers a fork that does not declare provides=libfprint. No second opinion ran on this item: the configured reviewer, Codex Medium, had used up its daily review allowance. This review is one model's reasoning, and it still needs that second review.

Related: this fixes #11899 (a working libfprint-goodix53x5 fork evicted by setup) and is now linked to it. #12110 fixes the same bug a different way (a provides-aware pacman -Qq libfprint libfprint-2 libfprint-git), but it also changes the sudo/polkit PAM gate polarity and adds a migration. This pull request is the narrower of the two. Choosing between them is the maintainer's call. #11840 touches the same lines for a different case (fprintd-clients), so whichever lands second needs a small rebase.

Waiting on the second opinion, then on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 4, 2026
@pelifix
pelifix force-pushed the fix-latitude-9440-fingerprint branch from 739e3d3 to 770194d Compare October 5, 2026 08:16
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Keeps an existing vendor-provided fingerprint driver when enabling fingerprint authentication.

  • Fingerprint setup keeps vendor-provided libfprint drivers.

Reviews (5) · Last reviewed commit: "Merge quattro into fix-latitude-9440-fin..." · Reviewed by Greptile

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 7, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at ec7123aa against quattro (65c0f330), after the rebase. The fix holds. I pushed one test assertion; nothing else needed changing.

Reproduced again with real pacman on a disposable Omarchy worker. I installed a synthetic libfprint-tod that ships /usr/lib/libfprint-2.so.2 and declares provides=(libfprint libfprint-2.so=2-64) and conflicts=(libfprint). Then I ran the setup with only hardware detection and enrollment stubbed. On the base script, the --ask 4 transaction removed libfprint-tod without a prompt, and libfprint-git ended up owning the library. On this head, the fork was kept and only fprintd was added. Stock libfprint is still replaced by libfprint-git, and a fresh machine or one that already has libfprint-git ends the same way on both.

Pushed: ec7123aa adds one assertion to test/shell.d/fingerprint-package-test.sh. The case "a TOD machine with everything installed goes straight to enrollment" only checked that pacman was left alone. run_setup accepts any failing exit, so a setup that quit before enrolling would still have passed. The case now checks that enrollment ran.

Tests on the worker: fingerprint-package-test.sh passes all 12 assertions at the head. With the script change reverted, it fails at the first TOD case. ./test/cli passes. In ./test/shell, 4518 assertions pass and 4 fail: the ASCII logo width, the block-art logo animation, the browser launcher focus and a pre_remove status test. All four fail the same way on the base commit, so this change does not cause them, but they keep the suite from being green.

Review: read in full by Claude Opus 5.5, then by Codex Medium as a second opinion over two rounds. Codex found no runtime defect and confirmed that the base transaction removes a conflicting fork. It found the missing enrollment check, which is the commit above. Its second round found nothing open at this head. Independence between the two reviews is not guaranteed.

Related: this fixes #11899 and is linked to it. #12110 fixes the same bug with a provides-aware pacman -Qq, bundled with a change to the PAM gate polarity and a migration. Both models judged this pull request the one to bring forward, because its ownership check is the earlier commit of the two. Neither found a defect in #12110's approach. #12110 does add one thing this pull request lacks: systemctl try-restart fprintd.service after a package change, so enrollment does not run against a library that is still mapped in memory after it was replaced. That is worth having on its own. #11840 (keeping fprintd-clients) touches the same lines for a separate case and does not conflict in behaviour. Whichever lands second needs to keep both exclusions when it rebases.

Waiting on the four failing shell tests on quattro, and then on the maintainer.

@iwillnotbecomeu

Copy link
Copy Markdown

Confirmed on Omarchy 4.0.4-1 with libfprint-tod 1.95.2+tod1-1 and libfprint-2-tod1-broadcom-cv3plus 6.4.062.0-1. The built-in fingerprint setup requests libfprint-git; pacman aborts because removing libfprint-tod would break the Broadcom package dependency. fprintd and usbutils were already installed. The failed transaction left packages unchanged.

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 34acadca against quattro (65c0f330). I pushed one commit that brings across the improvement from #15324, with @arrow255 credited as co-author. Nothing else changed.

Pushed: 34acadca adds exit 1 after "Verification failed" in bin/omarchy-setup-security-fingerprint. Before this, a failed fprintd-verify printed its message and the script exited 0. Both the menu entry and the first-run invitation run setup through omarchy-launch-floating-terminal-with-presentation, which passes the exit code to omarchy-show-done. So the user saw "Done!" for a setup that stopped before it configured PAM or the lock screen. They now see "Failed!", as they already do when enrollment fails. A new case in test/shell.d/fingerprint-package-test.sh runs a failed verification and checks three things: the setup exits nonzero, it verifies after enrolling, and it leaves PAM and the lock screen untouched.

Tests on a disposable Omarchy worker: fingerprint-package-test.sh passes all 13 cases at this head. It fails at the new case against the base script, and it fails again with the exit 1 removed. ./test/cli passes. In ./test/shell, 7 of 305 files fail. They are the ASCII logo width, the block-art logo animation, the two network QML fixtures, passwordless-grant-lifecycle, runtime-smoke and screenshot-sanity. All 7 fail the same way on the base commit, so this change does not cause them, but they keep the suite from being green. The package-selection fix itself is unchanged since the earlier real-pacman reproduction.

Review: Claude Opus 5.5 read the change. Codex Medium reviewed it as a second opinion and found no defect. It checked both callers and confirmed that a nonzero exit only changes what the presentation wrapper shows. It also agreed that the new test cannot pass without the fix. It found nothing else in #15324 that this pull request still needs, because the ownership check already covers both named TOD packages. Independence between the two reviews is not guaranteed.

This is waiting on the failing shell tests on quattro, and then on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 21, 2026
pelifix and others added 2 commits October 21, 2026 14:13
omarchy-setup-security-fingerprint installs libfprint-git with --ask 4,
which accepts whatever replacement pacman proposes, not only the stock
libfprint the flag was added for. Readers libfprint cannot drive at all
run on a TOD stack instead -- a libfprint fork plus a vendor blob -- and
that fork provides libfprint-2.so.2 itself, so the transaction removes
the only driver the machine has and does it without asking.

Check which package owns the library and skip libfprint-git unless it is
stock libfprint or libfprint-git already. The TOD packages are named
differently per vendor, so the owner of the library is the reliable
signal rather than a list of package names.

Detecting these readers is a separate concern and is covered by omacom#9524;
this touches only the setup path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The case was named for going straight to enrollment but only asserted that pacman was left alone, and run_setup accepts any failing exit, so a setup that bailed out before enrolling on a TOD stack still passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@pelifix
pelifix force-pushed the fix-latitude-9440-fingerprint branch from 34acadc to 9ca1d6a Compare October 21, 2026 12:58
@pelifix

pelifix commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current quattro. Dropped 34acadc: upstream now exits 1 on a failed verification and tests it ("a failed verify fails setup, leaving PAM and the lock screen alone"), so after the rebase that commit only added a second copy of the test. The test conflict was additions on both sides, so both sets are kept. fingerprint-package-test.sh passes all 23 cases and ./test/cli passes.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 21, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 9ca1d6ac against quattro (087f73d8), after the rebase. The fix holds, and nothing needs changing. Dropping the exit 1 commit was right: quattro already exits 1 after "Verification failed" (line 236 here), and the rebase left the package-selection change byte-for-byte as it was.

Reproduced again with real pacman on a disposable Omarchy worker. I built a synthetic libfprint-tod that ships /usr/lib/libfprint-2.so.2 with provides=(libfprint libfprint-2.so=2-64) and conflicts=(libfprint), installed it, and ran the setup with only hardware detection stubbed. On the base script, the --ask 4 transaction removed libfprint-tod without a prompt and libfprint-git ended up owning the library. On this head, the fork was kept and only fprintd and usbutils were installed. With stock libfprint installed, this head still replaces it with libfprint-git.

Tests on the worker: fingerprint-package-test.sh passes all 23 cases at this head. It fails at "a TOD-provided libfprint is kept" against the base script, and again with only the packages=(fprintd usbutils) line removed. ./test/cli passes. In ./test/shell, 6608 assertions pass. Eight files fail the same way on the base commit (ascii, background-instant-reload, background-intro-clone, branding-about-animation, hyprland-startup-cursor-cold, i18n, runtime-smoke, screenshot-sanity). background-intro-lifecycle and lock-appear-budget are timing tests that fail intermittently on both. None of them touch fingerprint setup, but they keep the suite from being green.

Review: Claude Opus 5.5 read the change, and Codex Medium reviewed it as a second opinion. Codex found no defect and agreed the change is proportionate. It noted two layouts the ownership check does not cover, both outside this bug: an unowned libfprint-2.so.2 symlink pointing at a fork's library, and a fork that conflicts with libfprint without providing it, where installing fprintd would pull stock libfprint back in. Neither is a regression, since the base script already replaces both. Independence between the two reviews is not guaranteed.

Related: this fixes #11899 and is linked to it. #12110 and #15324 fix the same bug differently. Both models judged this one the fix to bring forward: its ownership check began in #11846, before either, and it covers forks under any package name, where #12110 looks for the names libfprint, libfprint-2 and libfprint-git and #15324 for the two TOD names. #12110 also changes the PAM gate polarity. It adds one thing worth having on its own: restarting fprintd after a package change, so enrollment does not run against a library still mapped in memory. #15324's verification-failure exit is now in quattro.

Waiting on the failing shell tests on quattro, and then on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 31, 2026
quattro removed the per-result enroll and verify checks (omacom#16334) where this branch appended its TOD cases; keep the removal and the TOD cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

quattro had moved on and this no longer merged, so I merged quattro into the branch (1063085b, a merge commit, no rebase or force push). The only conflict was in test/shell.d/fingerprint-package-test.sh: #16334 deleted the per-result enroll and verify checks right where this branch had appended its TOD cases after them. The resolution keeps that deletion and all five of your TOD cases. The change to bin/omarchy-setup-security-fingerprint merged cleanly and is unchanged, and it runs before the new platform enable hook and authenticate() step that quattro added, so neither affects which packages are installed.

Re-verified on a disposable Omarchy worker at 1063085b against quattro (7eedd173): fingerprint-package-test.sh passes all 24 cases. With quattro's script in place it fails at "a TOD-provided libfprint is kept", and it fails at the same case with only the packages=(fprintd usbutils) line removed. ./test/cli passes. In ./test/shell, 7224 assertions pass. Four files fail, and each fails the same way on plain quattro: ascii, branding-about-animation, first-run and runtime-smoke. None of them involve fingerprint setup, but they keep the suite from being green.

Review: Claude Opus 5.5 did the merge and the review. Codex Medium and muse-wonder via pi (thinking high) each reviewed the merge as a second opinion. Both found no defect, said nothing from either side was lost in the resolution, and agreed that the TOD cases still test package selection with the new dispatch stubs in place. Independence from the first review is not guaranteed.

Related: this still fixes #11899, and #12110 and #15324 are still competing fixes for it, as in the last comment. The description says this and #9524 need each other, so the maintainer should land this one before or together with #9524.

Waiting on the failing shell tests on quattro, and then on the maintainer.

@sinannar

sinannar commented Nov 6, 2026

Copy link
Copy Markdown

Additional isolated validation: Goodix 27c6:5395 package preservation

I tested this PR's package-selection behavior in a separate checkout on the Dell XPS 15 7590 used for the additional evidence on #11899. These were isolated fixture tests, not a live run of the wizard against the laptop's authentication setup.

Tested revisions:

  • PR head: 1063085b766a589135a61bbd3c1a1224369cb2ae.
  • Recorded PR base: 7eedd1736d63cd7882c6479b19e1ff31f4b77c21, not the latest quattro head.
Check PR head Base control
bash test/shell.d/fingerprint-package-test.sh 24 passed, no failures or skips; exit 0 PR-head harness against base code: 19 passed, then expected failure at nonstock-library preservation; exit 1
Exact owner/package libfprint-goodix53x5, daemon/tools missing Passed: only fprintd and usbutils requested Expected failure at retaining the Goodix library; exit 1
Exact owner/package libfprint-goodix53x5, all tools installed Passed: no package transaction, simulated enrollment reached Not reached because the preceding Goodix control case stops on failure

The supplemental Goodix cases reused the upstream test's fixture setup/assertions and supplied LIBFPRINT_OWNER=libfprint-goodix53x5, with either just that installed package or that package plus fprintd/usbutils. The missing-tools case on the PR logged:

pacman -S --needed --noconfirm --ask 4 -- fprintd usbutils

It did not request libfprint-git. The expected base failures were:

not ok - a TOD-provided libfprint is kept instead of being replaced
not ok - the Goodix library is retained when daemon/tools are missing

Containment and limits

Tests ran as UID 1000 in bubblewrap with a read-only host filesystem, private temporary/runtime/device trees, and isolated network/PID namespaces. Host D-Bus sockets and USB nodes were unavailable. Before/after protected PAM/library hashes and installed Goodix/fprintd package versions were unchanged. Temporary fixtures and the base worktree were removed; no tracked PR sources or permanent tests were edited.

The real wizard and package-presence helper ran, but package operations, sudo, D-Bus, hardware detection, enrollment/verification, and lock setup were fixtures. This supports the nonstock-owner package-selection fix; it does not establish real pacman transactions, physical sensor operation, live PAM authentication, reboot/suspend behavior, or a full hardware test of this PR.

This also does not verify the stale-daemon half of #11899: the inspected PR does not add a fprintd refresh boundary. That remains separate from the preservation behavior tested here.

@pelifix

pelifix commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@sinannar Thanks for testing on the XPS 15 7590, and for spelling out what the fixture tests do and don't cover. The libfprint-goodix53x5 cases are a useful second example of a non-stock owner beyond TOD.

On the stale-daemon half of #11899, you're right that this PR doesn't address it. That's deliberate. This PR only changes which packages get installed. Restarting or refreshing fprintd after the library changes is a separate fix and should go in its own PR.

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

Labels

bug Something isn't working compatibility Make Omarchy work better on everything! verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy setup security fingerprint silently evicts a working libfprint fork, then "succeeds" against the stale daemon

7 participants