Skip to content

Support J715 Touch ID and SDDM fingerprint login - #69

Open
audreyt wants to merge 15 commits into
omacom:mainfrom
audreyt:feat/j715-touchid-login
Open

audreyt wants to merge 15 commits into
omacom:mainfrom
audreyt:feat/j715-touchid-login

Conversation

@audreyt

@audreyt audreyt commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

Adds Touch ID setup for the 15-inch M4 Air (J715) and fingerprint login at a stock SDDM login screen on every supported Mac. The branch is refreshed onto main 76d8b72; omarchy-mac stays at that main's 0.2.6, with no further version bump.

J715. Setup needs this Mac's own installed FDR MSRk body and FSC2 calibration. Nothing is shipped or extracted. Missing, malformed or shadowed input stops setup before consent or a driver load. Eligibility checks every present key candidate for a readable regular 10848-byte file using metadata, without reading the private body. Calibration is limited to the 130427-byte size observed working on one reference Mac. That check does not authenticate the data and may refuse other valid sizes. The existing consent-gated boot service and readiness checks are reused.

SDDM login. Enabling Touch ID adds a reversible include to SDDM's stock system-login stack, under the existing setup and removal lock.

  • An empty password asks for a fingerprint. A typed password skips pam_fprintd and goes straight to the original password stack, so it never waits on the sensor. An account with no password cannot log in at SDDM while Touch ID is on.
  • The fingerprint requires both a live user bus and a privileged SDDM login marker from this boot. A lingering user manager alone is not login proof. An optional open_session hook records successful authentication/account checks; failed authentication and close_session do not create proof. Automatic login does not establish the marker: after autologin, or after enabling/upgrading the policy during a session, the first interactive SDDM login still needs a password. It is refused while a login keyring may be locked. A listed login collection must be unlocked. Without one, there must be no login.keyring in ~/.local/share/keyrings or the legacy ~/.gnome2/keyrings, and an errno-aware probe under the user's credentials refuses access errors and other checks that cannot finish. omacom/omarchy has no login keyring, so there Touch ID works as a re-login feature.
  • Shell, nologin, faillock and account checks still apply. The policy copies the pam_faillock options from system-auth. Rejected fingers count toward the lockout and an accepted finger clears the count.
  • The SDDM step is best effort. Custom, symlinked or edited PAM policy is left alone, and setup says so and goes on with enrollment. Only an owner who agreed to the prompt that names the login screen gets the include. That agreement is recorded in /etc/omarchy-mac/touchid-sddm, so a Mac that agreed under 0.2.3 is not changed unasked.
  • Disabling restores the original SDDM bytes, line endings included. If administrator-owned PAM blocks that, boot consent and driver options are still removed and the partial failure is reported.

Verification

Refreshed head 97add397 (merge of main 76d8b72 into 1e20d4c). Local checks, exit 0; CI for this head is not yet verified.

  • Scope and architecture gates, and git diff --check against main.
  • bash omarchy-mac/test/all: 185 ok.
  • OMARCHY_TEST_RUNTIME=<checkout> bash test/integration/all: 59 ok, against omacom/omarchy@81fd2d23ca6e3462183a4dc8360de3113fa8d80c.

Previous head 1e20d4c, on top of the main merge 6a61152:

  • bash omarchy-mac/test/all: 178 ok, exit 0.
  • OMARCHY_TEST_RUNTIME=<checkout> bash test/integration/all: 59 ok, exit 0, against omacom/omarchy@81fd2d23ca6e3462183a4dc8360de3113fa8d80c.
  • Scope and architecture gates, Bash syntax, Python AST parsing and whitespace checks pass.
  • Before the fixes, new regressions reproduce malformed J715 keys reporting available (15 failures), linger allowing first-login fingerprints, and an inaccessible parent hiding a keyring. The focused calibration/key suite now has 50 passes.
  • Real libpam tests exercise successful and failed authentication/account checks, the open_session marker, close_session behavior, typed-password routing, faillock and policy upgrades/removal. Filesystem cases cover trusted markers and both keyring locations, including permission errors.
  • Earlier fork CI and hardware evidence below applies to the earlier revisions named, not to the new session hook.

Hardware, on the J715 with the policy as of 267ee02, after a full power-off and power-on:

  • At the cold-boot greeter the login keyring was locked. The empty-password request was refused before pam_fprintd and fprintd never started. The typed password logged in within a second.
  • After a logout with the keyring unlocked, a fingerprint login succeeded in about 3 seconds with no keyring prompt.
  • Not yet exercised on hardware: an idle timeout re-arming the request and a rejected finger.

Earlier, the fixed M4-kit module restored an existing enrollment after a cold boot and completed an SDDM fingerprint login. That run predates the keyring gate and needed a separate keyring unlock.

Dependencies and limits

J715 needs the driver work in omacom/linux-aurora#200 and a compatible libfprint. That upstream kernel has compiled with SEP KUnit enabled but has not been hardware-qualified, and the earlier module result does not qualify it. Camera/SEP coexistence and suspend/resume remain unqualified. Keep this a candidate until the matching driver and userspace are available and qualified together. This PR releases no production package or boot image.

#61 is in main and merged into this branch (6658d80). #64 overlaps in touchid-eligibility and touchid-consent-test.sh. The order stays #64 first, then a merge of main into this branch.

Merge Danger

Door: two-way

Disabling removes the owned include and restores the original SDDM file. It leaves the Linux key store and administrator-owned policy intact.

Blast Radius: Touch ID setup and SDDM login on every supported board, J715 eligibility

On a Mac whose owner turns on Touch ID with SDDM installed, an account with no password can no longer log in at SDDM. Other display managers get no PAM changes. No private provisioning material is included.

audreyt and others added 5 commits October 26, 2026 12:13
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The reviewed changes appear safe to merge as candidate support.

Summary

Adds J715 Touch ID eligibility and optional fingerprint login through stock SDDM policy.

  • J715 Macs can enable Touch ID with their own installed sensor files.
  • Opted-in owners can use fingerprints to log back in through stock SDDM.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[SDDM authentication] --> B{Password empty?}
  B -- No --> C[Original password stack]
  B -- Yes --> D{Trusted earlier login and live user bus?}
  D -- No --> E[Refuse fingerprint request]
  D -- Yes --> F{Login keyring safe?}
  F -- No --> E
  F -- Yes --> G[Check fingerprint]
  G -- Accepted --> H[Clear failed attempts]
  C --> I[Account checks]
  H --> I
  I --> J[Open SDDM session]
  J --> K[Record login for this boot]
Loading

Reviews (8) · Last reviewed commit: "Keep Touch ID eligibility and SDDM login..." · Reviewed by Greptile

Comment thread omarchy-mac/lib/touchid-eligibility Resolved
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this. The J715 gate looks tight: only t8132 plus j715 gets past the board check, other T8132 boards and the M1 family are still refused, and both suites pass for us (147 unit, 59 integration). Breaking the J715 board gate or the calibration size check makes touchid-j715-calibration-test.sh fail, so those tests do their job.

The SDDM part needs changes before it can merge, because on stock Omarchy it blocks fingerprint setup on any Mac whose Touch ID is ready, on every supported board, not just J715.

  1. SDDM refusal stops enrollment on every Omarchy Mac where Touch ID is ready (omarchy-mac/lib/touchid-sddm:30-31, omarchy-mac/entrypoints/enable-fingerprint:42, omarchy-mac/lib/touchid-enable:176-179)

SYSTEM_AUTH expects auth required pam_faillock.so preauth exactly. Omarchy's install/config/increase-lockout-limit.sh (and omarchy-upgrade-to-quattro and omarchy-apply-lock) rewrites that line to preauth silent deny=10 unlock_time=120, and the authfail line the same way. So every Omarchy system-auth is "custom" to this helper and touchid-sddm enable returns 1.

That return is fatal in both places it is called. In enable-fingerprint, a Mac that already has Touch ID on and ready now exits 1, and omarchy-setup-security-fingerprint answers that with "The fingerprint sensor was not turned on, so nothing was enrolled" and exits. In touchid-enable, a first-time setup turns Touch ID on, records consent, then exits 1 for the same reason, and every retry goes down the already-on path and fails again.

We reproduced it with a copy of an M2 Max (J414c) PAM directory, already enabled and ready: the PR's enable-fingerprint exits 1 with "system-auth has custom authentication requirements", and main's exits 0. With the two faillock lines reduced to the bare Arch form, the helper accepts the stack, so this is only the Omarchy faillock arguments.

The SDDM step should be best effort: warn and carry on with enrollment when the stack is not one we own. The test fixtures in touchid-sddm-test.sh use plain Arch system-auth; an Omarchy-shaped fixture would have caught this.

  1. If the faillock arguments are accepted, the owned policy changes the lockout (omarchy-mac/lib/touchid-sddm:16)

The policy runs its own pam_faillock.so preauth with no arguments. Omarchy's faillock.conf sets deny=10, so the count matches, but unlock_time falls back to the default 600 seconds and silent is lost: pam_faillock's preauth judges the lock by its own unlock_time, so an SDDM lockout lasts 10 minutes instead of the 2 used everywhere else. The policy should either copy the system-auth arguments or leave preauth to system-auth.

  1. Password logins at SDDM wait on the fingerprint (omarchy-mac/lib/touchid-sddm:17)

pam_fprintd sits before pam_unix in one serial stack, and its man page says it cannot take a password and a fingerprint at the same time. For any user with prints enrolled, a typed password waits for pam_fprintd to give up, up to timeout=10, before it is checked. That is the trade the lock screen avoids by keeping a separate omarchy-lock-fingerprint stack. We have not reproduced the delay on an SDDM screen, but it is the documented behaviour, so it should be called out to the owner or the timeout cut sharply. SDDM itself runs one PAM stack and has no fingerprint-specific handling. A missing or absent reader falls through quickly; we checked with real libpam that a missing pam_fprintd under sufficient does not block login.

  1. Macs that already agreed get SDDM changes without being told (omarchy-mac/entrypoints/enable-fingerprint:41-42)

The new consent lines (103-104) only show on first-time setup. A Mac that turned Touch ID on under 0.2.3 gets the SDDM include the next time fingerprint setup runs, with no notice. That covers every supported board, not just J715.

  1. Smaller: disable now fails on Macs that never used Touch ID (omarchy-mac/lib/touchid-sddm:90)

configure() reads /etc/pam.d/sddm through read_regular before it knows whether there is anything to remove, so a symlinked sddm file makes disable-fingerprint exit 1 on any Apple Silicon Mac, including M1 with a USB reader. Omarchy's removal carries on but tells the owner the reader may still be on at the next boot, which is not true. Disable could skip the check when the prefix is not present.

Merge order: this needs linux-aurora#200 and a qualified J715 driver for the J715 path to work. Without them modprobe fails on J715 and touchid-enable takes consent back, so that failure is clean. It also conflicts textually with #61 (enable-fingerprint lock block, which this PR moves) and #64 (touchid-eligibility, consent test). #64's unfinished-keybag refusal matters most for a fresh J715 keybag, so we would land #64 first and rebase this on it.

audreyt and others added 2 commits October 26, 2026 19:58
…locked

An empty password asks the SDDM stack for a fingerprint; any typed password skips pam_fprintd and goes straight to the stock password stack, so typing never waits on the sensor. The fingerprint branch runs only while the user's login keyring is running and unlocked, checked as the user without starting a stopped keyring, so the first login after each boot uses the password that unlocks it.

A fingerprint request that times out or is unavailable ends without reaching pam_unix, and a rejected finger counts toward the account lock. The include's faillock preauth is requisite, so a locked account never reads the sensor. Tests run real libpam with pam_exec and the new helpers for each branch, and the manual and README describe the flow.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
…p best effort

Omarchy rewrites system-auth's faillock lines to `preauth silent deny=10 unlock_time=120` and `authfail deny=10 unlock_time=120`, which the helper took for custom rules, so enabling failed and blocked fingerprint enrollment on every Omarchy Mac. The known faillock options are now accepted, copied into the owned policy so the lockout limits match, and an untouched owned policy is recognised by structure whatever options it carries. Unknown options are still refused.

The SDDM step no longer ends setup: enable-fingerprint and touchid-enable warn and go on when the stack is not ours. It runs on the already-on path only for a Mac whose owner agreed through the prompt that names the SDDM login screen, recorded in /etc/omarchy-mac/touchid-sddm and removed by disable-fingerprint, so a Mac that agreed under 0.2.3 is not changed unasked. Removal ignores an sddm file, a symlink included, that does not include the policy, so it no longer fails on a Mac that never used Touch ID.

Tests add Omarchy-shaped system-auth fixtures and the consent-record and symlink cases, the J715 calibration test now keeps the new record in its fixture, and the README and manual note that an account with no password cannot use the SDDM login screen while Touch ID is on.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
@audreyt

audreyt commented Oct 27, 2026

Copy link
Copy Markdown
Author

Thanks for the careful review. Pushed as 716b0c9 and 267ee02 (the second one is the response to this review). Heads-up first: the first commit also changes the SDDM policy design since you looked at it (see 3): an empty password now asks for a fingerprint, gated on the login keyring being unlocked, and a typed password skips pam_fprintd entirely.

1. SDDM refusal stops enrollment on Omarchy Macs. Reproduced from Omarchy's increase-lockout-limit.sh. system-auth's pam_faillock lines may now carry silent, no_log_info, audit, even_deny_root, deny=, unlock_time=, fail_interval= and root_unlock_time=; any other option is still treated as custom and refused. The SDDM step is best effort in both enable-fingerprint and touchid-enable: when the helper refuses, setup says the login screen was left as it is and enrollment goes on (exit 0). touchid-sddm-test.sh now has an Omarchy-shaped system-auth fixture (accepted, idempotent, unknown option refused) and touchid-consent-test.sh covers the already-on and first-time paths with a custom stack. Reverting the normalisation, or making the refusal fatal again, fails those tests.

2. Owned policy changes the lockout. The policy now copies the preauth and authfail options from system-auth (so silent deny=10 unlock_time=120 and deny=10 unlock_time=120 on Omarchy). An existing owned policy is recognised by structure, so a later change of Omarchy's options is not read as an edit by the administrator, and enable rewrites it.

3. Password logins wait on the fingerprint. Fixed by design rather than a shorter timeout: a pam_exec expose_authtok helper routes an empty password to pam_fprintd (timeout=5 per try) and any typed password straight to the stock password stack, so typing never waits on the sensor. The fingerprint branch also requires the user's login keyring to be running and unlocked (checked as the user, without activating a stopped keyring), so the first login after boot is password-only. Tested with real libpam (pam_exec, pam_unix) offline, and with a logout/login on a J715. Not yet exercised: a correct typed password through the new policy on a live greeter. Note that an account with no password can no longer use the SDDM login screen while Touch ID is on (its empty password is read as a fingerprint request); the README and manual say so.

4. Macs that already agreed get SDDM changes without being told. The SDDM include is now applied on the already-on path only when /etc/omarchy-mac/touchid-sddm exists. touchid-enable writes it after the owner answered the prompt that names the SDDM login screen, and disable-fingerprint removes it. A Mac that agreed under 0.2.3 is not changed. The trade-off is that it has to turn Touch ID off and on to get the login screen; a one-time invitation would be the alternative if you prefer it.

5. disable fails on Macs that never used Touch ID. disable now only refuses when the sddm file, read through a symlink, includes our policy; otherwise there is nothing to remove and it exits 0 (symlink, dangling symlink and a symlink that includes us are tested).

Merge order. Agreed that #64 should land first; I will rebase this on it once it is in, and on #61 for the enable-fingerprint lock block.

The full package suite passes locally (151 ok) on this head. I have not had an independent reviewer sign off on the final state of the second commit; please treat it as unreviewed.

Comment thread omarchy-mac/lib/touchid-sddm Resolved
@audreyt

audreyt commented Oct 27, 2026

Copy link
Copy Markdown
Author

Update on the open item from my earlier reply ("a correct typed password through the new policy on a live greeter was not yet exercised"). It has now been exercised on the J715 (M4 Air), on head 267ee02's policy as installed locally, after a full power-off and power-on:

  • Cold-boot greeter, login keyring locked. The greeter's automatic empty-password request was refused by touchid-pam-keyring-unlocked (pam_exec exit 1; SDDM relayed "System error"), pam_fprintd was never reached, and the typed password logged in within a second: touchid-pam-empty-password exited 1 so the fingerprint branch was skipped, pam_unix accepted the password, and gnome-keyring was unlocked with it in the session. fprintd was not started on this boot at all.
  • Greeter after a logout, keyring unlocked. A fingerprint request started without Enter, the sensor prompt appeared, one verify cycle ran, and the fingerprint login succeeded in about 3 seconds with no keyring prompt.

Not exercised on hardware yet: an idle timeout re-arming the request, and a rejected finger. The greeter theme used for the checks is a local one and is not part of this PR; the PR's own evidence is still the offline suite (151 ok on this head) plus the hardware observations above. The earlier caveats stand: it needs linux-aurora#200 and a qualified J715 driver, and the final state has had no independent reviewer sign-off.

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the quick turnaround. We re-ran everything at 267ee02: 151 unit and 59 integration tests pass. All five items are fixed, and the tests prove it: putting back the strict faillock match, the fatal SDDM step in either entrypoint, the old symlink read, or the bare preauth each makes a test fail.

We also ran the enable path against a copy of an M2 Max's /etc/pam.d (Omarchy's silent deny=10 unlock_time=120). It now exits 0, writes a policy with preauth silent deny=10 unlock_time=120 and authfail deny=10 unlock_time=120, a second enable changes nothing, and disable restores the original bytes. At cbecf9f the same copy was refused.

Status of the earlier items:

  1. Faillock args refused, enrollment blocked: fixed (omarchy-mac/lib/touchid-sddm:27-28, 109-119; omarchy-mac/entrypoints/enable-fingerprint:41-43; omarchy-mac/lib/touchid-enable:180-181).
  2. Lockout options lost: fixed (touchid-sddm:21, 25).
  3. Typed passwords wait on the sensor: fixed. With real libpam and the real system-login and system-auth, a typed password never reaches the fingerprint line and is asked for once.
  4. Earlier Macs changed without being told: fixed by the /etc/omarchy-mac/touchid-sddm record (enable-fingerprint:41).
  5. Disable on a symlinked sddm: fixed (touchid-sddm:134-149).

The new design has one blocker:

  1. The fingerprint login can never be reached on Macs running omacom/omarchy (omarchy-mac/lib/touchid-pam-keyring-unlocked:13, 40-41)

The gate asks for Locked on /org/freedesktop/secrets/collection/login. omacom/omarchy has no login keyring. install/login/sddm.sh removes -auth pam_gnome_keyring.so from /etc/pam.d/sddm so that SDDM never creates one, and install/user/default-keyring.sh sets up a passwordless Default_keyring as the default. On our M2 Max, logged in with the keyring running, the service lists only session and Default_5fkeyring. Running the helper's unlocked() against that live bus returns False, because get-property fails with "Object does not exist". So on omacom/omarchy an empty password always fails at the gate and pam_fprintd never runs. The SDDM change only takes away SDDM login for accounts with no password.

Your J715 result fits this: the helper only passes when a login collection exists, so that machine has one. omarchy-mx-mac puts the hook back (install/login/sddm.sh and migration 1787552167), and this repo's asahi-fresh acceptance check requires it, while omacom/omarchy removes it. Which one is your J715 on? The two trees disagree, so the gate has to work on both.

The docs repeat the same assumption. mac-manual 04-security.md and the README say the first login "unlocks your login keyring", but on omacom/omarchy the password unlocks no keyring at SDDM. The consent text at enable-fingerprint:104-105 still says fingerprints work at login and does not mention the empty password or the lost passwordless login.

If the goal is "don't leave a password-protected keyring locked", the gate could look at the collection behind the default alias, or count a missing login collection as nothing to unlock. The bus check already keeps the first login after boot on the password, so treating a missing login collection as nothing to unlock doesn't weaken it, and it changes nothing where a login keyring exists. Either way, on omacom/omarchy this is a re-login feature. Encrypted installs autologin once per boot, and at a later SDDM screen the user's bus exists only while the old user manager is still up (linger, another session, or leftover processes after logout). Worth saying so plainly in the manual.

Smaller:

  1. A fingerprint success does not clear earlier failures (touchid-sddm:24). This is the same point greptile raised. success=done skips system-auth's authsucc. With real libpam: two rejected fingers, then an accepted one, and the tally is still 2. It ages out after fail_interval, and the next password login clears it, so it only matters for someone near deny=10. Running pam_faillock.so authsucc after a fingerprint success, before the stack ends, would fix it.

  2. The copied lockout options only refresh when enable runs again (touchid-sddm:183-185). If Omarchy or the owner later changes system-auth's faillock options, SDDM keeps the old ones until fingerprint setup is run again. That is fine if documented.

What we checked with real libpam (pam_start_confdir, copies only, faillock tally and nologin pointed at scratch paths, pam_fprintd stood in by pam_debug): an empty password with fingerprint success still goes through shells, nologin, faillock preauth and the account stack. A nologin file or a locked account (10 rejected fingers) denies both fingerprint and password before any prompt. A rejected finger counts once. A timeout, a missing reader or a missing pam_fprintd.so fails the empty attempt quickly without counting, and typed passwords still work. If the package is removed and its helpers are gone, typed passwords still work. pam_setcred does not re-run the pam_exec helpers. We found no way past faillock, nologin or account checks.

Merge order: #61 is in main now and this still conflicts with main in omarchy-mac/entrypoints/enable-fingerprint. Against #64 it conflicts in omarchy-mac/lib/touchid-eligibility and omarchy-mac/test/touchid-consent-test.sh. #64 merges into main cleanly, so landing #64 first and rebasing this on main still looks right.

@audreyt

audreyt commented Oct 27, 2026

Copy link
Copy Markdown
Author

Status update, no new commits since 267ee02.

  • Conflicts with main. GitHub now reports this branch as conflicting, which is the overlap with Say when enable-fingerprint can't open the Touch ID lock #61 (enable-fingerprint lock block) and Say when the xART guard broke Touch ID setup #64 (touchid-eligibility, consent test) that was flagged in the review. As agreed, I will rebase onto Say when the xART guard broke Touch ID setup #64 once it lands instead of resolving it now, so the rebase happens once on the final base.
  • Hardware evidence stands as posted above. Cold boot with a locked keyring (password-only, fprintd never started) and a logout/login with the keyring unlocked (fingerprint without Enter) both behaved as described. The machine stayed stable through later unrelated hardware work on the same boot. Still not exercised on hardware: an idle timeout re-arming the request, and a rejected finger.
  • Unchanged caveats. It needs linux-aurora#200 and a qualified J715 driver, and the final state has had no independent reviewer sign-off.

audreyt and others added 2 commits October 27, 2026 11:04
Resolves the enable-fingerprint lock block with omacom#61: the lock is still taken for the options and the SDDM step together, and a lock that cannot be opened is reported as such.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
… keyring

An accepted fingerprint ended the stack with success=done, so system-auth's
pam_faillock authsucc never ran and earlier rejected fingers stayed counted.
The policy now runs authsucc, with system-auth's options, after a fingerprint
success. The policy from before this change is still recognised as ours, so
running fingerprint setup again replaces it.

The keyring gate required an unlocked login collection, which omacom/omarchy
never creates: it removes pam_gnome_keyring from SDDM and uses a passwordless
Default_keyring, so the fingerprint branch could never be reached there. A
running keyring without a login collection, or a stopped one without a
login.keyring file (checked as the user), now has nothing to unlock. A locked
login collection, or a stopped keyring that would start locked, is still
refused, and the session-bus check still keeps the first login of a boot on
the password.

The manual, README and consent prompt now say that on omacom/omarchy this is
a re-login feature, that an account with no password loses SDDM login, and
that lockout options are copied when fingerprint setup runs.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
@audreyt

audreyt commented Oct 27, 2026

Copy link
Copy Markdown
Author

Pushed 6658d80 (merge of main) and 3ea608a (review fixes). The branch is mergeable again.

Merge with main. #61's lock message is kept: in enable-fingerprint the lock is still taken for the driver options and the SDDM step together, and a lock that cannot be opened is reported as "could not be opened" rather than as another setup running. I merged instead of rebasing so the reviewed commits keep their hashes; #64 is still open, and I will take it the same way when it lands.

Blocker: no login keyring on omacom/omarchy. Thanks for catching this. The J715 is on the omarchy-mx-mac layout: -auth pam_gnome_keyring.so is in its /etc/pam.d/sddm, ~/.local/share/keyrings has login.keyring, and the live bus lists session, Default_5fkeyring and login. That is why it passed there. touchid-pam-keyring-unlocked now treats a missing login collection as nothing to unlock:

  • Keyring running: read Collections from the Secret Service. If login is not listed (your M2 Max case), it passes. If it is listed, it must be unlocked, as before. A collection list that can't be read is refused.
  • Keyring stopped: it is still never activated. It passes only when the user has no login.keyring, checked with test as the user through setpriv, since a stopped keyring with one would start locked.
  • The session-bus check is unchanged, so the first login of a boot still uses the password.

The manual, README and consent prompt now say that on omacom/omarchy this is a re-login feature. They also say the fingerprint is asked for with an empty password, that an account with no password loses SDDM login, and that the password unlocks a login keyring only if one exists.

2. Fingerprint success left failures counted (also Greptile's P1). The fingerprint line is now [success=1 maxtries=ignore default=die]. It jumps past authfail to a new auth [success=done default=die] pam_faillock.so authsucc, which carries system-auth's authsucc options. The empty-password jump is now default=4, so typed passwords still go straight to the stock stack. With real libpam and real pam_faillock (scratch dir=), two rejected fingers then an accepted one gave a tally of 1, 2, then 0. The dispatch test now asserts the clear, and putting back success=done makes it fail. A policy written by 267ee02 is still recognised as owned, so running fingerprint setup again replaces it; that has its own test.

3. Lockout options refresh only on enable. Documented in the README and manual: after changing the pam_faillock options in system-auth, run fingerprint setup again.

Verification on 3ea608a.

  • bash omarchy-mac/test/all: 152 ok, exit 0.
  • OMARCHY_TEST_RUNTIME=<omacom/omarchy@81fd2d2> bash test/integration/all: 59 ok, exit 0.
  • check-scope and check-architecture-gates pass.
  • Mutation checks: restoring success=done on the fingerprint line, or ignoring the login-collection lookup, each fails touchid-sddm-test.sh.
  • This repo's Actions runs for the PR are waiting for a maintainer's approval (fork PR). The same workflows dispatched on the fork at 3ea608a: Tests, Mac manual and Package resolution all passed.

Still not exercised on hardware: the new gate on an omacom/omarchy Mac, an idle timeout re-arming the request, and a rejected finger. The driver caveats are unchanged: this needs linux-aurora#200 and a qualified J715 driver.

@audreyt

audreyt commented Oct 27, 2026

Copy link
Copy Markdown
Author

@scottjones could you approve the pending workflow runs for 3ea608a? They are waiting for approval because this is a fork PR. The same Tests, Mac manual and Package resolution workflows already pass on the fork (links in the comment above).

audreyt and others added 2 commits October 27, 2026 21:51
…sted

The keyring gate only looked for a login.keyring file when the keyring service
was stopped, and only at the XDG path. gnome-keyring also falls back to the
legacy ~/.gnome2/keyrings directory, and a running service that does not list a
login collection was always passed, so a password-protected login keyring could
be missed.

The gate now checks both paths, as the user, whenever it has no login
collection to inspect: a stopped service, or a running one that omits it. Only
a clean answer that neither file exists passes; a failed check refuses. Where
the service lists a login collection it must still be unlocked, and omacom/omarchy,
which has no login keyring file, is unaffected.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
The SDDM notes sat inside the J715 section even though fingerprint login at
SDDM applies on every supported board. They are now a separate README section,
in shorter paragraphs, and the manual puts the general case before the J715
requirements.

The manual said Touch ID works after logging out and also that the earlier
session must still be running. It now says the login screen accepts a
fingerprint while the user services from that login are still running, as they
are while another session is open and sometimes after a logout.

The hardware note now says the earlier J715 fingerprint login predates the
keyring check.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
@audreyt

audreyt commented Oct 28, 2026

Copy link
Copy Markdown
Author

Pushed cd2642b on top of 3ea608a. It narrows the keyring gate from the earlier fix, and omacom/omarchy behaves as before.

Keyring gate. A missing login collection still counts as nothing to unlock, but only when there is also no login.keyring file in ~/.local/share/keyrings or the legacy ~/.gnome2/keyrings. That now applies whether the keyring service is stopped or running without a login collection. Before, a running service that left out login passed without the file check, and the stopped case looked only at the XDG path. A file check that cannot finish refuses, and a listed login collection must still be unlocked. omacom/omarchy has no login.keyring, so an empty password still reaches the fingerprint there, as on your M2 Max.

Tests. touchid-sddm-test.sh now covers a file at either path alone and a running service that omits login while a file exists. It also covers a file check that fails. Letting the running case pass again, or dropping the legacy path, makes the test fail. bash omarchy-mac/test/all gives 152 ok and test/integration/all gives 59 ok.

Docs. 9f48c58 only rewords. SDDM login now has its own README section, as it applies on every board, and the manual's wording about logging out now matches the session-bus condition. I also refreshed the PR description to match the current design.

CI. Tests, Mac manual and Package resolution pass on the fork at 9f48c58: Tests, Package resolution, Mac manual.

@scottjones, could you approve the pending runs (they wait because this is a fork PR) and take another look at the keyring item? The merge order is unchanged: #64 first, then I merge main here.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 04:08
@audreyt

audreyt commented Nov 5, 2026

Copy link
Copy Markdown
Author

Merged current main (7e50e93) into this branch as 6a61152, preserving the reviewed commit hashes.

The prompt resolution keeps main's three-line experimental/macOS-backup warning and retains this branch's four lines explaining SDDM re-login, submitting an empty password, the restriction on accounts without a password, and leaving custom PAM policy alone. The prompt tests check those notices and the 80-column limit; the README matches.

Checks on the resulting tree:

  • bash omarchy-mac/test/all: 155 ok, exit 0.
  • OMARCHY_TEST_RUNTIME=<81fd2d23> bash test/integration/all: 59 ok, exit 0.
  • Scope and architecture gates, Bash syntax, and whitespace check against main: pass.

The merge order remains #64 first. Its conflict resolution is available on audreyt:mac/touchid-xart-refusal-main-refresh (f95d837), but updating #64 itself needs a maintainer because its source branch is omacom-owned. I have not merged that unlanded branch here; after #64 lands, this branch still needs a merge of main and the combined tests.

The existing request for re-review of the keyring fixes stands. These are software checks, not new hardware qualification: the J715 fresh-install requirement before release and the earlier hardware limits remain.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The login gate can allow first-login fingerprints for lingering users and treat inaccessible keyrings as absent, while eligibility accepts truncated J715 keys that prevent setup from completing.

3 open issues
What changed in this PR

Adds J715 Touch ID setup and opt-in fingerprint re-login at stock SDDM screens, extending the Mac package’s existing consent and driver-readiness flow. J715 remains a candidate pending qualification of matching kernel and userspace support.

Changes:

  • Adds J715 eligibility and installed factory-input checks without automatic extraction.
  • Adds reversible SDDM authentication policy with password routing, keyring checks and lockout handling.
  • Expands regression tests and documents setup, removal and hardware limitations.
File Description
omarchy-mac/​test/​touchid-sddm-test.sh Tests PAM dispatch, policy restoration and keyring checks.
omarchy-mac/​test/​touchid-j715-calibration-test.sh Tests calibration size, shadowing and activation gates.
omarchy-mac/​test/​touchid-consent-test.sh Adds J715 input and SDDM consent/removal cases.
omarchy-mac/​README.md Documents J715 requirements and SDDM behavior.
omarchy-mac/​lib/​touchid-sddm Manages the reversible SDDM authentication include.
omarchy-mac/​lib/​touchid-pam-keyring-unlocked Checks session-bus and login-keyring state.
omarchy-mac/​lib/​touchid-pam-empty-password Identifies empty-password fingerprint requests.
omarchy-mac/​lib/​touchid-enable Validates J715 keys and records SDDM consent.
omarchy-mac/​lib/​touchid-eligibility Adds J715 board and calibration eligibility checks.
omarchy-mac/​entrypoints/​enable-fingerprint Updates consent prompts and applies agreed SDDM policy.
omarchy-mac/​entrypoints/​disable-fingerprint Removes SDDM policy and reports partial cleanup failures.
mac-manual/​content/​04-security.md Explains fingerprint login and J715 limitations.

Review effort: Balanced

Comment thread omarchy-mac/lib/touchid-eligibility Outdated
Comment on lines +99 to +102
if compatible apple,t8132 && ! installed apple/msrk-j715.bin; then
echo unsupported:no-root-key
exit 0
fi

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed: eligibility now checks metadata for every present J715 key candidate, requiring a regular readable 10848-byte file and rejecting malformed shadows even beside a good copy. No private body is read. The new cases fail on the old helper; the calibration/key suite now passes 50 cases, including missing files, valid symlinks and unchanged non-J715 rules.

Fixed in 1e20d4c.

Comment on lines +25 to +27
bus = runtime / str(entry.pw_uid) / "bus"
if not bus.is_socket():
return False

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Reproduced and fixed. A live bus now needs a trusted boot-local login marker too. An optional SDDM open_session hook records successful authentication/account checks; failed auth/account checks and close_session do not create proof. The gate rejects symlinked or writable markers. Real PAM tests exercise the hook and the regression test denies a lingering bus with no prior login.

The marker is only established by the interactive sddm stack. Automatic login and an already-running session at policy upgrade do not count, so the first interactive SDDM login still needs a password. README and manual now make that conservative restriction explicit.

Fixed in 1e20d4c.

Comment on lines +47 to +51
expression = [word for name in LOGIN_FILES
for word in ("-a", "!", "-e", str(Path(entry.pw_dir) / name))][1:]
try:
done = run(["/usr/bin/setpriv", f"--reuid={entry.pw_uid}", f"--regid={entry.pw_gid}",
"--clear-groups", "--reset-env", "/usr/bin/test", *expression],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Reproduced with an actual login.keyring behind an inaccessible parent. Replaced test ! -e with an errno-aware Python stat probe running under the user's credentials, including supplementary groups. Only FileNotFoundError confirms absence; access errors and other lookup failures refuse. Real filesystem regressions cover both XDG and legacy paths, alongside the existing stopped/running-keyring cases. The initial regression fails on the old helper and passes with the fix.

Fixed in 1e20d4c.

…tate

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
@audreyt

audreyt commented Nov 5, 2026

Copy link
Copy Markdown
Author

Addressed the three new review findings. All were reproduced before the fixes.

  • J715 eligibility: every present msrk-j715.bin candidate must be regular, readable and 10848 bytes. Metadata checks do not read the private body. Truncated, oversized, directory and dangling-link shadows refuse even beside a good copy. The new cases failed on the previous helper and the focused calibration/key suite now has 50 passes.
  • Linger: a user bus alone no longer counts. The owned SDDM include now has an optional open_session hook that records successful authentication/account checks in a privileged, boot-local /run/omarchy-mac/touchid-logins/<uid> marker. Fingerprint authentication requires that marker as well as the live bus and keyring checks. Type, owner and write-permission checks reject forged markers. The previous owned include is upgraded and removal restores the original bytes.
  • Keyring access errors: the file probe runs under the user's credentials with supplementary groups, using Python's errno-aware stat. Only confirmed absence passes; permission errors and other lookup failures refuse. Both XDG and legacy files are exercised on the real filesystem.

The marker intentionally comes only from the interactive sddm stack. sddm-autologin does not create it: after automatic login, the first interactive SDDM screen still needs a password. Enabling or upgrading the policy during a session likewise needs one password login. This conservative behavior is documented in the README and manual.

Local checks: package suite 178 ok, integration suite 59 ok against runtime 81fd2d23; scope, architecture, syntax and whitespace checks pass. Real libpam tests cover successful and failed auth/account paths, session recording, close-session behavior, typed-password routing and byte-exact policy removal. The initial regression run demonstrated both the linger bypass and the inaccessible-parent bypass.

No installed PAM policy was changed and no new hardware qualification is claimed. #64 still needs its maintainer-owned source branch updated; the merge order and the J715 fresh-install qualification before release remain unchanged.

@audreyt

audreyt commented Nov 5, 2026

Copy link
Copy Markdown
Author

J715 hardware follow-up, 2026-11-05: the current Quickshell lock screen now has a verified lock/unlock cycle for both Touch ID and the password fallback.

Initially, System → Lock did nothing. Both /etc/pam.d/omarchy-lock-password and /etc/pam.d/omarchy-lock-fingerprint were absent; the running lock service reported passwordPam:false. Touch ID enrollment was already present.

After running the installed omarchy-apply-lock for the owner, the lock service read both authentication configurations. It acquired a secure session lock (secure=true), and the owner successfully unlocked with Touch ID. A separate lock acquired secure=true again and the owner confirmed password-only unlock. The shell recorded successful unlock events for both tests.

This used the existing runtime helper and enrollment: no SDDM policy, driver or keybag change was needed for the recovery. The helper also installed its existing fingerprint resume hook and fprintd stop-timeout drop-in; suspend/resume was not tested.

Scope: this is Quickshell lock-screen evidence on the current installed J715 system. It does not validate this PR's new SDDM login-marker hook, first-login gate, or the fresh-install keybag path. The earlier release qualifications still stand.

The silent missing-PAM failure already has a runtime report, omacom/omarchy#14607, and open fixes omacom/omarchy#14621 and omacom/omarchy#14911. I am adding the recovery evidence there rather than treating it as a new #69 driver or SDDM defect. Existing-install upgrade coverage should include an already-enrolled fingerprint reader, creation of both lock PAM services, and a real secure-lock/unlock check.

@audreyt

audreyt commented Nov 16, 2026

Copy link
Copy Markdown
Author

Refreshed onto current main 76d8b72 as 97add39733794d50bcff5fa36147ea61e5f26f26. The merge was clean, and omarchy-mac stays at main's 0.2.6.

Local checks, all exit 0:

  • scope and architecture gates
  • git diff --check against main
  • bash omarchy-mac/test/all: 185 ok
  • integration suite: 59 ok, against omacom/omarchy@81fd2d23

No new hardware run. The cold-boot and logout results in the PR body are still the 267ee02 policy, not this head. This refresh does not contain #64; land that first, then merge main here again.

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