Skip to content

libfprint-git: hide Touch ID while the MacBook Neo lid is closed - #6

Closed
RyanTheTide wants to merge 7 commits into
feat/aurora-edgefrom
aurora-edge/libfprint-clamshell
Closed

RyanTheTide wants to merge 7 commits into
feat/aurora-edgefrom
aurora-edge/libfprint-clamshell

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 15, 2026 •

Copy link
Copy Markdown

Supersedes #1 (same change, which targeted master), rebased onto feat/aurora-edge. The two commits are cherry-picked unchanged. The libfprint-git recipe is identical on master and feat/aurora-edge, so the result is byte-identical to the tested pkgrel 5.

Why

The MacBook Neo's Touch ID sensor is in the power button, so a closed lid covers it. In clamshell mode, sudo, polkit and the lock screen still offered the fingerprint, and pam_fprintd waited 30 s for a finger before asking for the password. The fix is in libfprint, so it behaves the same on Omarchy and on Fedora (aurora-silicon/aurora-sep-userspace#1 carries the same patch).

What (aarch64 only, like the aurora driver)

  • aurora-lid-covered-readers.patch: libfprint follows the lid switches (every SW_LID input device, read with EVIOCGSW). While a lid is closed, it removes a reader whose driver marks it covered_by_lid, and it probes the reader again when the lid opens. The aurora driver sets the flag, cancels the enclave operation in flight when it is removed, and refuses to arm the sensor again.
  • Second commit: a reader removed while the system slept is now released properly. Before, a lid closed during sleep, followed by a wake from an external keyboard, left a stale reader that failed every request until fprintd restarted. Tests cover it: test-lid-switch with real uinput lid switches, plus a removed-while-suspended case in test-fpi-device. Both fail before the fix.
  • fprintd-lid-switch.conf is installed as fprintd.service.d/50-libfprint-lid-switch.conf (DeviceAllow=char-input r).
  • pkgrel 3 -> 5.

Verified

  • python3 tests/aurora-edge/metadata.py on this branch: 8 tests OK.
  • makepkg --verifysource with CARCH=aarch64: the b2sums of all three aarch64 sources pass.
  • makepkg on aarch64 (Arch Linux ARM under qemu-user), with the same PKGBUILD and patches byte for byte: both patches apply, the package carries the drop-in, and meson test reports 131 Ok and 0 Fail.
  • An x86_64 KVM VM ran fprintd 1.94.5, pam_fprintd, sudo, polkit and pkexec, with a uinput lid and a /dev/sep-bio test double. 41/41 checks pass, and the sleep case passes. pkgrel 3 fails 18 checks, and pkgrel 4 keeps the stale reader.

Hardware status

Verified on the MacBook Neo on 2026-10-15:

  • At 12:40 (Fedora): lid closed -> no reader, and sudo goes straight to the password. Lid opened -> the reader returns at once, and a fingerprint authenticated.
  • Attended test J, "clamshell Touch ID across sleep": PASS. The lid closed while asleep, the machine woke from the USB keyboard, then the lid opened.

Both runs were on Fedora, with the Fedora build of the same patch (aurora-sep-userspace). The 12:40 run used aurora3, which has the lid gating but not the sleep fix. The record of test J does not name the build installed. The test was written for aurora4/pkgrel 5, which carry the sleep fix; aurora3/pkgrel 4 are expected to fail its step 4. The Omarchy package itself has not been installed on a Neo. On Omarchy, aurora-touchid supplies fprintd's /dev/sep-bio access.

🤖 Generated with Claude Code

DjDeveloperr and others added 7 commits October 14, 2026 17:16
Pin the Aurora stack, retain Mesa epoch and legacy boot paths, and isolate audio replacements from stock-name upgrades. Keep source tracking disabled for the review candidates.

Signed-off-by: DjDeveloperr <hey@djdev.me>

Assisted-by: LLM
…hing

5f6c917 merges omacom#301, which leaves the firmware-owned J700 DISP_CPU domain alone; 790d5a81 does not boot the Neo. ALARM's clang18, llvm18 and lld18 install only under /usr/lib/llvm18/bin, so LLVM defaults to that prefix and they are makedepends. The m1n1 floor goes back to 1.6.1, which M1 and M2 users' m1n1-aurora meets, and replaces=linux-asahi goes: it would swap the kernel of every Mac on [omarchy] at its next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
replaces= on a stock name swaps that package on every machine using [omarchy] at its next update: Mesa on every aarch64 machine, and m1n1, U-Boot, bless and the audio stack of every M1 and M2; on Qualcomm the platform guard would then refuse the whole upgrade. The recipes keep conflicts and provides, so the Neo image installs them explicitly, and replace only the Neo-only draft names. Every recipe carries the apple-silicon platform group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No package ships the MT7932 policy files, so the initcpio hook adds them only when present instead of failing the build. Only US and world-XZ exist, and the radio stays blocked for any other country, such as one set from the timezone at setup; a watcher on regulatory changes switches such a country to the world domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A first build makes the CL shader compilers Asahi needs; the packaged drivers use them with -Dllvm=disabled and -Dspirv-tools=disabled, so an Arch Linux ARM LLVM or SPIRV-Tools bump no longer leaves the Neo without a GPU until a rebuild. llvmpipe goes with LLVM; softpipe stays. check() refuses a staged library that needs either, and libdisplay-info triggers rebuilds.

The recipe did not build before: arch-meson's --buildtype clashed with -Dbuildtype=release, and its --auto-features enabled demands the VA front end this driver set cannot have. meson setup now takes arch-meson's flags without auto-features, with b_ndebug like Arch's Mesa, and pins the optional features the dependencies follow. makedepends names rust-bindgen, Arch's bindgen package. Mesa's tests stay off: hk_sampler_bias_test undefines NDEBUG and calls nir_validate_shader, so it links only in debug builds.

Built in an Omarchy edge chroot on Arch Linux ARM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Touch ID sensor is in the power button, which a closed lid covers.
In clamshell mode every sudo, polkit request and lock screen still
offered the fingerprint and waited 30 seconds for a finger that could
not come before asking for the password.

aurora-lid-covered-readers.patch makes libfprint follow the lid switch
and drop a reader the lid covers while it is closed, then probe it again
when the lid opens. fprintd lists no device in clamshell mode, so
pam_fprintd returns at once and sudo and polkit go straight to the
password; lock screens that ask fprintd for a reader find none. A
fingerprint prompt still waiting when the lid closes ends at once.

fprintd's sandbox only allows the devices it names, so
fprintd-lid-switch.conf lets it read input devices; libfprint opens only
those that report switches, read-only. Without it libfprint sees no lid
and behaves as before. Both are aarch64-only, like the aurora driver.

Built with makepkg on aarch64: both patches apply, check() has no
failures, and the package carries the drop-in. In an x86_64 VM with
fprintd 1.94.5, a uinput lid switch and a test double for /dev/sep-bio,
41 of 41 checks pass (sudo, pkexec, Omarchy's and GDM's lock PAM
services, the hyprlock and GNOME Shell D-Bus flows); pkgrel 3 fails 18
of them.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A lock screen holds the reader across a sleep, the lid closes while the
machine sleeps, and it wakes from an external keyboard with the lid
still closed. libfprint saw the lid close before fprintd resumed the
reader, so the reader was removed while still suspended. Resuming it
then failed as removed but left it suspended, the lock screen's Release
failed as busy, and the reader was never dropped: fprintd kept listing
it with the lid closed and no reader came back when the lid opened.

aurora-lid-covered-readers.patch now ends the suspension of a removed
reader when it is resumed, follows the lid switch in the thread-default
main context like the rest of libfprint, and adds tests: test-lid-switch
with real uinput lid switches (skipped without /dev/uinput and udev) and
a removed-while-suspended case in test-fpi-device. Both fail before this
change. pkgrel 4 -> 5.

makepkg on aarch64 (qemu-user): both patches apply, the package carries
the drop-in, and the test suite passes (131, with a 10x timeout on a
loaded host).

In the x86_64 KVM VM (fprintd 1.94.5, sepbio mock, uinput lid) an S3
sleep with the lid closed during sleep now ends with no reader while
closed and a new one when the lid opens; pkgrel 4 kept the stale reader.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Author

Superseded by omacom#1332 (Touch ID retries and lid-closed reader hiding) and the follow-ups in omacom#1342, both merged. The feat/aurora-edge base also went upstream as omacom#1101. Closing. Thanks!

@RyanTheTide
RyanTheTide deleted the aurora-edge/libfprint-clamshell branch November 6, 2026 03:25
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