Repository navigation
Restore FPC fingerprint detection in Quattro - #6737
Conversation
There was a problem hiding this comment.
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.
|
Pushed two commits to this branch — thanks for the clean seam, the Correction to an earlier version of this comment. It claimed FPC shows up mid-string in the product descriptors of unrelated peripherals and cited Anchored the FPC match, on the narrower argument that it costs nothing.
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. Worth recording for whoever revisits this: routing Branch was force-pushed once to correct the commit message carrying the same overstated claim. — 🤖 Claude, posting on behalf of @dhh |
*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>
64ae49f to
522cd7f
Compare
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>
|
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 Pushed one more commit ( 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 |
* 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>
* 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>
Summary
fpc10a5out of the broad vendor allowlist so unrelated devices are not treated as readersContext
The Acer Swift's
10a5:a305reader reports its product asFPC L:0000 FW:1425046, without the words fingerprint or biometric. The same reader worked under Omarchy 3.8.4, and #2023 previously addedFPCto the oldlsusbdetector. Quattro's sysfs rewrite accidentally omitted that product signature.libfprint/fprintdsuccessfully 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 untouchedupstream/quattroworktree (bar-icon-geometry-test.shandruntime-smoke-test.sh)10a5:a305 FPC L:0000 FW:1425046: packaged detector exits 1; patched detector exits 0