Repository navigation
omarchy-mac: report Touch ID ready only once a second opener gets the node - #131
IronsideXXVI wants to merge 1 commit into
Conversation
… node /dev/sep-bio takes one opener at a time, and on a J604 boot fprintd opened it while omarchy-mac-touchid-activate still held the session: fprintd logged "cannot open /dev/sep-bio: Device or resource busy", dropped the reader and answered "No devices" until it exited idle. Two holes let that happen: - fprintd.service only wanted the wait unit, and After= orders only jobs that exist. When D-Bus started fprintd before udev had queued the activation, fprintd ran alongside it. The drop-in now wants the activation as well, and the activation runs after the wait, so the order holds whichever is queued first. - touchid-activate said "ready" once the driver attributes did, while the driver can still hold the session. It now reports ready only when a second open would succeed: the node opens, a client already holds it, or the node is gone (the attributes decide, as before). After 10 s of a busy node with no process holding it, it records "busy" and fails with a journal line that says so. Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
- Kernel 1.848 = 1.847 + 0337: a T8132 root port's DART stays gated until the host has set the port up again after a deep sleep, so the first DART register read no longer goes to an unclocked port. Used only with the T8132 sleep sequence, which is off by default. Quick boot gate PASS, 46 of 46 checks. - The carried Hyprland / bar pair is not installed any more: the 0.57.1-2.605 revision failed its vkmark check with blur on (median 1108 against a minimum of 1619), so the J604 runs the official hyprland 0.57.1-2 again and omarchy-dev 1.1. hyprland/ is removed (last published in fd61512); omarchy-dev/ is back to its 1.1 content. STATUS, README and not-installed/ say so. - UPSTREAM.md: the six pull requests opened on 2026-11-12 (omacom/omarchy#18582, #18583; omacom/omarchy-mac-pkgs#131 to #134); asahi-alarm/asahi-scripts#1 closed by us, carried downstream; aurora-silicon/linux#1492, #1010 and #1497 merged, #1384 closed without merging; the audio destination (Wave 2 #19); apple_nvmem_spmi not needed with omacom's kernel config; the dwc3-apple drop-in row. Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
scottjones
left a comment
There was a problem hiding this comment.
The ordering fix and the second-opener check make sense, and the tests catch it when either is removed. Three things need changing first.
1. Drop the version bump (omarchy-mac/version:1, 0.2.6 to 0.2.7). Since #30, only a release/omarchy-mac-<ver> PR changes this file, and CI enforces that. .github/scripts/check-version-bump fails on this branch. Revert the file and the release PR will do the bump.
2. fprintd now reruns the activation every time it starts (omarchy-mac/vendor/systemd/system/fprintd.service.d/50-omarchy-mac-touchid.conf:8). The activation unit is Type=oneshot without RemainAfterExit (omarchy-mac-touchid-activate.service:19). So every start of fprintd queues a new run and waits for it. fprintd quits after about 30 s idle and D-Bus starts it again at the next sudo or lock screen, so this happens over and over in a session, not once per boot. On a Mac that reads ready, each run is short. On a Mac whose attach never settles, each run loops for 45 s (lib/touchid-activate:92) before fprintd comes up. One that reaches attached late but keeps the node busy adds the 10 s second-opener probe. pam_fprintd gives up before then, so every fingerprint prompt stalls and falls back to the password. I confirmed the systemd behaviour with two user units, a oneshot and a unit that Wants= and After= it: starting the second one three times ran the oneshot three times. The fix needs to keep the boot-time ordering without rerunning on every fprintd start. For example, fprintd could skip the activation once this boot has a result. Note that plain RemainAfterExit=yes would also turn the pacman hook's systemctl start into a no-op.
3. The new busy status isn't handled where the other failure reasons are.
omarchy-mac/lib/touchid-status:20keepsfailed | not-ready | unproven | blockedafter a failed enable this boot, but notbusy. I ran it with abusystatus andtouchid-loadedset: it wroteavailable, so Omarchy offers Touch ID again while the driver stays loaded until a restart. Withnot-readyit kept the reason.omarchy-mac/entrypoints/enable-fingerprint:62has the same list, sobusydoesn't get "Restart this Mac".- The README's list of reasons needs
busytoo.
What I ran (merged onto main 1a865a9):
omarchy-mac/test/all: 123 ok, exit 0test/touchid-activate-test.sh: 11/11 okcheck-version-bump(as a PR from this branch): fails, see 1.check-scopeandcheck-architecture-gatespass.- Mutations: calling
finish readydirectly, removing the newWants=, and removing the held-by-a-client check each fail a test. - I read the kernel's
/dev/sep-bioopen and release (drivers/soc/apple/sbio.rs,bio.rs). The probe's own open releases the node as soon as it closes, so the probe doesn't recreate the race it is checking for. - GitHub shows no CI run on this branch.
One question: in the sbio driver, activation runs inside open() and release is synchronous, so I don't see a window after close that the second-opener probe guards against. If the Wants= ordering is the real fix, the probe may only add a second open. Is there a case it catches?
What changes:
/dev/sep-biotakes one opener at a time. On some boots fprintd opened it whileomarchy-mac-touchid-activatestill held it, logged "cannot open /dev/sep-bio: Device or resource busy", and kept no reader until it exited idle about 30 s later.readyonly when a second open would succeed: the node opens, a client already holds it, or the node is gone. A node still busy after 10 s with no process holding it recordsbusyand says so in the journal.Verification:
readywith 0 EBUSY lines and fprintd listed the sensor, right after install and on the first boot with it.test/touchid-activate-test.shcovers both parts (a node that refuses the first opens, a held node, and systemd accepting the units). The omarchy-mac suite passes (123 ok, 0 not ok).Other Macs: the same activation runs on every Mac where omarchy-mac sets up Touch ID, so they get the same ordering and readiness check. We have only seen the race on the M4.