Skip to content

libfprint-git: Touch ID follow-ups from the #1332 review - #1342

Merged
ryanrhughes merged 1 commit into
omacom:masterfrom
aurora-silicon:touchid-review-followups
Oct 20, 2026
Merged

ryanrhughes merged 1 commit into
omacom:masterfrom
aurora-silicon:touchid-review-followups

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1332, addressing @maralcbr's review. aarch64 only; x86_64 is unchanged. pkgrel is bumped to 5.

1. fprintd can open /dev/sep-bio. Confirmed: Arch's fprintd 1.94.5-2 unit allows only char-usb_device, char-spi, char-hidraw and /dev/cros_fp. linux-aurora registers /dev/sep-bio with misc_register (MISC_DYNAMIC_MINOR, bio_shim.c) at both 168dc64 and 44d5afc79da7, so fprintd could not open it. The drop-in now has DeviceAllow=/dev/sep-bio rw, and it is renamed 50-libfprint-aurora-touchid.conf. This package owns the allowance, since libfprint is what opens the node. #1335 (aurora-sep), which shipped the same line, is closed in favour of this, so nothing in omarchy-pkgs repeats it. omacom/omarchy-mac-pkgs#12 (draft) has a broader DeviceAllow=char-misc rw in its own drop-in. The file names differ, so the two simply stack; that PR could narrow its line, or drop it, once this lands.

2. Tests. You were right: lid-switch skips all three of its subtests in a container. They have now run for real. There are also new unit tests for the FpContext side.

  • New test-lid-covered (7 tests). It drives FpContext with a detached lid switch and the fake driver, so it runs anywhere. The cases:

    • close and open;
    • matched while closed;
    • closed during probe;
    • opened while the removed instance is still claimed;
    • released while closed;
    • closed during a verify;
    • context gone during a probe.

    The shared library hides FpContext's private functions, so this one test links the library statically.

  • makepkg as aarch64 (CARCH override, Arch container on x86_64): meson reports 132/132 OK. Inside that, lid-switch runs 0 of 3 subtests; all 3 skip for lack of /dev/uinput. lid-covered passes 7/7.

  • KVM VM (Arch, kernel 7.2.9, systemd-udevd, writable /dev/uinput, logind told to ignore the lid), same patched tree:

    • lid-switch passes 3/3, with real uinput lid switches and no skips;
    • lid-covered passes 7/7;
    • the full suite is 132/132 serially. In parallel it was 131/132: the one failure was egis_etu905, a umockdev replay test that is just as flaky on unpatched 6f9479c in the same VM (5 of 10 runs failed there).
  • Still for hardware:

    • closing the lid during a verify (the driver-side enclave cancel);
    • closing the lid during suspend;
    • opening the lid while the removed instance is still claimed, on real fprintd;
    • docked clamshell.

3. Docked clamshell latency. This is real. The Omarchy lock backs off on fingerprint misses: 1, 2, 4, 8, 16 and 32 s, then 40 s (ERROR_RETRY_CAP_MS). Only a resume, a successful attempt or a new lock resets that. Opening the lid without a resume never told the lock, so Touch ID could take up to about 40 s to come back. A fix is ready on aurora-silicon/omarchy lock-touchid-lid-open-rearm: the lid-open binding tells the lock, which re-arms the way a resume does. It has not been opened as a PR yet, and it is not part of this one.

4. The enrolment retry is dormant. Only the verify retry is live on our kernels. At both 168dc64 and the merged 44d5afc79da7:

  • enrol_poll fills status only for a terminal failure;
  • ENROL_STATUS_RETRY (5) is used only for verify outcomes;
  • there is no status 7 (REJECTED).

So enroll-retry-scan never fires yet. The code stays, so it works once the kernel reports them.

5. char-input stays, now documented. It is a deliberate widening: fprintd can read every evdev node, keyboards included, read-only. A path allowance for the lid switch alone is fragile. systemd resolves the path once, when fprintd starts, and fprintd may run with --no-timeout. So a lid switch whose driver (macsmc-input) loads later, or comes back as a new node, would stay blocked. libfprint itself opens only devices that udev reports as switches, and keeps those with SW_LID. The drop-in comment says all this.

6. Nit fixed. lid_input_ready_cb now takes an input only when its fd matches.

🤖 Generated with Claude Code

- fprintd's sandbox now allows /dev/sep-bio. Arch's fprintd unit allows
  only USB, SPI, hidraw and /dev/cros_fp, so fprintd could not open the
  Touch ID reader. The drop-in is renamed to
  50-libfprint-aurora-touchid.conf, since it is no longer lid-only.
- The char-input allowance stays, and the drop-in now says why: a path
  allowance for the lid switch would be resolved only when fprintd
  starts.
- lid_input_ready_cb looks its input up by fd; the iterator could leave
  a stale entry behind when nothing matched.
- New test-lid-covered covers FpContext hiding and re-probing a
  lid-covered reader, with a detached lid switch and the fake driver.

pkgrel 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanrhughes
ryanrhughes enabled auto-merge (squash) October 20, 2026 02:08
@ryanrhughes
ryanrhughes merged commit dd8988f into omacom:master Oct 20, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: libfprint-git (x86_64, PR artifact); libfprint-git (aarch64, PR artifact)

  • edge/x86_64: libfprint-git-1:1.94.100.r10.g6f9479c-5-x86_64
  • edge/aarch64: libfprint-git-1:1.94.100.r10.g6f9479c-5-aarch64

Commit dd8988f · run

scottjones added a commit to omacom/omarchy-mac-pkgs that referenced this pull request Oct 22, 2026
diag/touchid alone reads "ready" while the sensor is uncalibrated, the
enrolled fingerprints are unproven, or the xART guard blocks a match (a
cold-booting M1-family Mac), and the invitation that follows comes once.
The activation unit now runs lib/touchid-activate, which opens /dev/sep-bio
once and then writes /run/omarchy-mac/touchid: "ready" only when touchid,
sensor_attach, restore and matching all say Touch ID can enrol and match,
as the driver's ABI document asks, and the reason otherwise.
fingerprint-readers names that file, since the runtime's format matches one
value per line. The script waits until 45 s after it starts for the
attach's later retry, so the unit's 60 s timeout leaves room to record why,
and a missing attribute ends it at once. An update re-runs it: since
touchid follows every later bring-up, which can fall short and recover, a
"ready" from earlier in the boot stands unless failed, unproven or blocked
appears. The unit now runs before fprintd.

fprintd's allowance for /dev/sep-bio belongs to libfprint-git's drop-in
(omacom/omarchy-pkgs#1342), which systemd resolves when fprintd starts.
So this drop-in no longer allows the whole misc class: it orders fprintd
after omarchy-mac-touchid-wait.service, the wait for the node moved out of
ExecStartPre, which ran after the cgroup was built.

The sleep hook goes: the kernel ends a capture before suspend, and on a
MacBook Neo the lock screen took the finger on the first touch after
resume. The README takes the identity, calibration-name and consent
wording agreed in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide
RyanTheTide deleted the touchid-review-followups branch November 7, 2026 11:29
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.

2 participants