Skip to content

Restore FPC fingerprint detection in Quattro - #6737

Merged
dhh merged 4 commits into
omacom:quattrofrom
Vtorrealba:fix/fpc-fingerprint-detection
Aug 12, 2026
Merged

dhh merged 4 commits into
omacom:quattrofrom
Vtorrealba:fix/fpc-fingerprint-detection

Conversation

@Vtorrealba

Copy link
Copy Markdown
Contributor

Summary

  • restore fingerprint detection for normalized USB product strings containing fpc
  • keep 10a5 out of the broad vendor allowlist so unrelated devices are not treated as readers
  • make the USB sysfs root injectable for focused hardware tests
  • cover FPC, existing product/vendor matches, kernel-driver rejection, and no-match behavior

Context

The Acer Swift's 10a5:a305 reader reports its product as FPC L:0000 FW:1425046, without the words fingerprint or biometric. The same reader worked under Omarchy 3.8.4, and #2023 previously added FPC to the old lsusb detector. Quattro's sysfs rewrite accidentally omitted that product signature.

libfprint/fprintd successfully enroll and authenticate this reader, including for sudo. On the real hardware, the current packaged detector exits 1 while this patched detector exits 0.

Verification

  • bash test/shell.d/hw-fingerprint-test.sh
  • ./test/all — the fingerprint test and CLI suite pass; two unrelated live-QML tests fail identically on an untouched upstream/quattro worktree (bar-icon-geometry-test.sh and runtime-smoke-test.sh)
  • Acer Swift SFG14-73T with 10a5:a305 FPC L:0000 FW:1425046: packaged detector exits 1; patched detector exits 0

Copilot AI balanced review requested due to automatic review settings August 12, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores sysfs-based FPC fingerprint-reader detection while preserving safeguards against unrelated 10a5 devices.

Changes:

  • Adds case-insensitive FPC product matching.
  • Makes the USB sysfs path injectable for tests.
  • Adds focused detection and rejection coverage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-hw-fingerprint Adds FPC detection and injectable USB device path.
test/shell.d/hw-fingerprint-test.sh Tests product, vendor, driver, and no-match behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 12, 2026 10:49
@dhh

dhh commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Pushed two commits to this branch — thanks for the clean seam, the OMARCHY_USB_DEVICES_PATH injection matches what omarchy-hw-nvidia and omarchy-hw-display already do, so it dropped straight in.

Correction to an earlier version of this comment. It claimed FPC shows up mid-string in the product descriptors of unrelated peripherals and cited USB2.0 FPC Camera as if that were an observed device. It isn't — I constructed it as a test fixture and should not have presented it as evidence. There is no known device that collides here. Apologies for the noise.

Anchored the FPC match, on the narrower argument that it costs nothing. *fpc* is three letters on the one branch that's trusted outright, with none of the kernel-driver checking the vendor guess gets. Every FPC reader on record leads with the token:

Device Product string
10a5:a305 (yours) FPC L:0000 FW:1425046
10a5:9800 FPC Sensor Controller L:0002 FW:25.26.23.14
10a5:0007, 10a5:e340, 10a5:9200 FPC Sensor Controller

So requiring the prefix loses no coverage, and there's now a case pinning the sensor-controller string too. If you know of a reader that reports FPC anywhere other than the front, say so and this should go back to a bare token.

Fixed a latent trap in the test helper. ${remainder#*:} returns the string unchanged when there's no second colon, so '27c6:1234' would have written 1234 out as the product string. Your call sites all passed a trailing colon so the suite was right, but the next person adding a no-product case would have got a quietly wrong test.

Worth recording for whoever revisits this: routing 10a5 through fingerprint_vendors looks tidier, and every FPC device above is that vendor with no driver bound. The concern is that while fprintd holds the reader the interface's driver symlink points at usbfs, which would make has_kernel_driver reject a working machine — but I have not confirmed that on hardware, and if it holds it's a pre-existing issue for the Goodix entries too, not something this PR introduces.

Branch was force-pushed once to correct the commit message carrying the same overstated claim.

— 🤖 Claude, posting on behalf of @dhh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

dhh and others added 2 commits August 12, 2026 04:27
*fpc* is an unanchored three-letter token on the one branch that is
trusted outright, with none of the kernel-driver checking the vendor
guess gets. Every FPC reader on record leads with it — "FPC Sensor
Controller", "FPC Sensor Controller L:0002 FW:25.26.23.14", and this
branch's "FPC L:0000 FW:1425046" — so requiring the prefix costs no
coverage while keeping three letters from matching mid-string, where
FPC abbreviates unrelated things like flexible printed circuit.

Also restore the note about why Elan is kept out of the vendor list, so
the two signatures read as the same deliberate exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
${remainder#*:} returns the string unchanged when there is no second
colon, so a spec meant to describe a device with no product descriptor
wrote the product id out as its product string instead. Every call site
happened to pass a trailing colon, so the suite was right by accident.

Guard the split and drop the trailing colons, so the two vendor-match
cases exercise the path they were written for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 11:27
@dhh
dhh force-pushed the fix/fpc-fingerprint-detection branch from 64ae49f to 522cd7f Compare August 12, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

Touching a bare `driver` file asserts that any driver at all disqualifies
a vendor guess, which is more than the detector should promise: libusb
claims an interface through a synthetic `usbfs` driver, so a reader in
active use looks bound by that rule.

Link the interface at a named driver directory instead, the way sysfs
does. The case still covers what it was written for — a Synaptics bridge
or a camera on a fingerprint vendor ID — without fixing the shape of the
answer for drivers it was never about.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 11:42
@dhh

dhh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Two follow-ups after a Codex review of this branch.

Softening something I wrote above. I said the prefix covers "every FPC reader on record." That's stronger than what I checked — libfprint lists ten 10a5 product IDs and I'd seen descriptors for four. All four lead with FPC , and no counterexample turned up, but that's the honest limit of it. If you know a reader that reports FPC anywhere but the front, this should go back to a bare token.

Pushed one more commit (fe89ed2b), replacing the bare touch driver in the kernel-driver fixture with a link to a named driver directory, the way sysfs does it. The old fixture asserted that any driver disqualifies a vendor guess, which turns out to be too strong: libusb claims interfaces through a synthetic usbfs driver, so a reader binds one while it's being enrolled or verified against. The case still covers what it was written for — a bridge or a camera on a fingerprint vendor ID — without pinning behaviour it was never about.

That's a pre-existing bug rather than anything this PR introduced, and it's #6744, stacked on this branch. Nothing needed here for it.

— 🤖 Claude, posting on behalf of @dhh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

@dhh
dhh merged commit a9c159a into omacom:quattro Aug 12, 2026
sgruendel pushed a commit to sgruendel/omarchy that referenced this pull request Aug 13, 2026
* Restore FPC fingerprint detection

* Anchor the FPC product match to a prefix

*fpc* is an unanchored three-letter token on the one branch that is
trusted outright, with none of the kernel-driver checking the vendor
guess gets. Every FPC reader on record leads with it — "FPC Sensor
Controller", "FPC Sensor Controller L:0002 FW:25.26.23.14", and this
branch's "FPC L:0000 FW:1425046" — so requiring the prefix costs no
coverage while keeping three letters from matching mid-string, where
FPC abbreviates unrelated things like flexible printed circuit.

Also restore the note about why Elan is kept out of the vendor list, so
the two signatures read as the same deliberate exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Write no product descriptor for a two-field device spec

${remainder#*:} returns the string unchanged when there is no second
colon, so a spec meant to describe a device with no product descriptor
wrote the product id out as its product string instead. Every call site
happened to pass a trailing colon, so the suite was right by accident.

Guard the split and drop the trailing colons, so the two vendor-match
cases exercise the path they were written for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Bind a named driver in the kernel-driver fixture

Touching a bare `driver` file asserts that any driver at all disqualifies
a vendor guess, which is more than the detector should promise: libusb
claims an interface through a synthetic `usbfs` driver, so a reader in
active use looks bound by that rule.

Link the interface at a named driver directory instead, the way sysfs
does. The case still covers what it was written for — a Synaptics bridge
or a camera on a fingerprint vendor ID — without fixing the shape of the
answer for drivers it was never about.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
* Restore FPC fingerprint detection

* Anchor the FPC product match to a prefix

*fpc* is an unanchored three-letter token on the one branch that is
trusted outright, with none of the kernel-driver checking the vendor
guess gets. Every FPC reader on record leads with it — "FPC Sensor
Controller", "FPC Sensor Controller L:0002 FW:25.26.23.14", and this
branch's "FPC L:0000 FW:1425046" — so requiring the prefix costs no
coverage while keeping three letters from matching mid-string, where
FPC abbreviates unrelated things like flexible printed circuit.

Also restore the note about why Elan is kept out of the vendor list, so
the two signatures read as the same deliberate exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Write no product descriptor for a two-field device spec

${remainder#*:} returns the string unchanged when there is no second
colon, so a spec meant to describe a device with no product descriptor
wrote the product id out as its product string instead. Every call site
happened to pass a trailing colon, so the suite was right by accident.

Guard the split and drop the trailing colons, so the two vendor-match
cases exercise the path they were written for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Bind a named driver in the kernel-driver fixture

Touching a bare `driver` file asserts that any driver at all disqualifies
a vendor guess, which is more than the detector should promise: libusb
claims an interface through a synthetic `usbfs` driver, so a reader in
active use looks bound by that rule.

Link the interface at a named driver directory instead, the way sysfs
does. The case still covers what it was written for — a Synaptics bridge
or a camera on a fingerprint vendor ID — without fixing the shape of the
answer for drivers it was never about.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants