Skip to content

Find fingerprint readers a platform names - #694

Closed
scottjones wants to merge 78 commits into
upstream/convergencefrom
touchid/platform-fingerprint-readers-pr
Closed

scottjones wants to merge 78 commits into
upstream/convergencefrom
touchid/platform-fingerprint-readers-pr

Conversation

@scottjones

@scottjones scottjones commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

omarchy-hw-fingerprint only scanned USB, so a reader the kernel drives another way (a Mac's Touch ID, behind its Secure Enclave) was never found: no first-run invitation, and the setup stopped at "No fingerprint sensor detected". A platform package can now name such readers in /usr/share/omarchy-platform/fingerprint-readers, one per line as a file glob and the value it reads once the reader is usable. A platform file that matches nothing never hides a USB reader.

Setup still installs libfprint-git, which omacom/omarchy-pkgs#806 builds for aarch64 with the Touch ID driver. Its enrollment output changed: a failed Touch ID enrollment showed that "keep moving the finger around" and fprintd's raw enroll-stage-passed lines made one touch look like progress, so it timed out.

 omarchy-hw-fingerprint
+  any platform-named file reads its value → reader
   USB product string / vendor scan (unchanged)
 omarchy-setup-security-fingerprint
+  authenticate sudo first, and say so
+  press sensor → "touch, lift and touch again until it says Enrolled"
+  fprintd results → "✓ Step N done. Keep lifting your finger and touching the sensor." / retries / failures
   install libfprint-git fprintd usbutils, enroll, verify, then PAM (unchanged)

Evidence

On an M2 Max with Touch ID and a local platform file: the post-update invitation appeared, setup enrolled and verified with the new output, and the lock screen (including after a 1 h 15 min sleep), pkexec and sudo took the fingerprint. hw-fingerprint-test.sh covers the platform file both ways; fingerprint-package-test.sh covers the scan type and every enroll and verify result fprintd 1.94.5 sends. The full shell suite's eight failing files on this base fail the same way on 606e33d (see #695 and #696).

Merge Danger

Door: two-way

Blast Radius: fingerprint setup on every machine (output only); detection unchanged until a platform ships the file

omarchy-mac's side is omacom/omarchy-mac-pkgs#12 (draft until #806 is published for aarch64).

🤖 Generated with Claude Code

maralcbr and others added 30 commits September 28, 2026 21:52
…part

aarch64 covers Apple Silicon Macs, Snapdragon laptops, Raspberry Pis and
VMs, so the CPU architecture can't pick platform setup. omarchy-hw-platform
prints apple-silicon, qualcomm, generic-aarch64 or generic from the vendor
prefixes in the device tree's root compatible (/proc/device-tree, then
/sys/firmware/devicetree/base) and the CPU, and fails when they contradict
each other. Its qualcomm answer uses the same evidence as the dragon
branch's omarchy-hw-qualcomm-soc, and the fixtures check the two agree.
omarchy-hw-apple-silicon is the Apple predicate on top of it.

An image built away from its hardware names its target in a root-owned
manifest, /var/lib/omarchy/image/target (format=1, platform=). While the
root is being built rather than booted, the detector answers from it and
never reads the build host's device tree; a booted system always answers
from its hardware. As root it restarts in an empty environment, so no
variable picks the platform for privileged setup.

Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
Co-authored-by: Jimmy Van Veen <8206925+JimmayVV@users.noreply.github.com>
An architecture check is right for an ABI, a binary or a repository's
$arch, not for picking a platform. The lint lists each shipped check after
review and fails on a new one, so platform setup goes through
omarchy-hw-platform.
omarchy-reinstall-pkgs installed the base list on every machine. A
platform's default set is now the base list, then install/omarchy-aarch64.packages
on aarch64, then the platform's own list when it has one
(install/omarchy-qualcomm.packages adds linux-firmware-qcom).
omarchy-pkg-defaults prints the set for the detected platform, or for the
one named, and reinstall installs it. x86_64 still gets exactly the base
list, and an image build gets its target's set.
linux-aarch64 has no thunderbolt module, and mkinitcpio fails the whole
image over a MODULES entry it cannot find. The optional form, thunderbolt?,
is not enough: a systemd initramfs copies MODULES as written into
modules-load.d, where "thunderbolt?" names no module, and a kernel without
the module would still list it there. thunderbolt_module.conf now adds plain
thunderbolt only when modinfo finds it as a module for the kernel being
built.

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
omarchy_hooks.conf assigned HOOKS outright, and mkinitcpio sources drop-ins in
name order, so it ran after any numbered drop-in (90-*.conf) and threw its
hooks away. HOOKS now comes from 00-omarchy-hooks.conf, which sorts first, and
later drop-ins add to it. The NVIDIA kms filter and the vconsole handling stay
in omarchy_hooks.conf. With the drop-ins Omarchy writes, machines keep the
same HOOKS, MODULES and FILES; a user drop-in that sets HOOKS and sorts before
omarchy_hooks.conf now takes effect instead of being overwritten.

Migration 1786605598 now sources the baseline first, since without it the
migration would read empty HOOKS and also rebuild hybrid systems. It skips a
machine that lacks the baseline.
lsblk -s prints the ancestor tree with box-drawing prefixes ("└─/dev/nvme0n1p6"), so the crypto_LUKS parent came back as a path that does not exist and first-boot setup stopped with "Could not locate the LUKS device to re-key". -r prints raw names. Factory reset uses the same lookup.
cryptsetup open tries enrolled tokens before the key file, so a TPM2 or
FIDO2 token could authorize the re-key with a wrong passphrase.
Exercise raw ancestry output without invoking provisioning or reset. Cover btrfs subvolume roots, absent encryption, failed probes, and explicit cryptdevice specifications.
A first boot killed after the staged install key's slot was retired left the
key file behind, and every retry then stopped at "the staged LUKS key no
longer unlocks". A lost key file with the boot-time auto-unlock still
configured let setup finish with the disk unlocking unattended.

The re-key now runs from install/provisioning/luks-rekey.sh and records its
phase and slot numbers (never key material) in
/var/lib/omarchy/provisioning/luks-rekey.state. It reuses the owner's slot
instead of adding a duplicate, retires LUKS1 slots too, and destroys the
staged key only after the volume proves it opens nothing. Setup refuses to
finish while any part of the provisioning unlock remains. The journal ends at
phase=done and leaves together with pending, so a retry after the staged key
is retired must use the password the disk already holds.

Key checks exclude LUKS2 tokens: cryptsetup open tries an enrolled token
(say a TPM2 slot a previous owner left behind) before the key and reports its
slot whatever key it was given. Slot listings read only the keyslot section,
since a luks2-keyring token looks like a keyslot in luksDump.
Installation gives the login user, root and the disk holding / one password,
but omarchy-drive-password changed only the LUKS key, so the three drifted
apart. For the disk holding / it now checks the current password opens the
disk, changes the LUKS key, confirms the new key opens the disk and the old
one no longer does, and only then sets the login and root passwords. Any other
encrypted drive changes its LUKS key alone. Every drive now asks for the
current password with gum instead of cryptsetup's prompt.

A journal in ~/.local/state/omarchy/drive-password.state (disk UUID, key slots
and phase, never a password, written with the re-key journal helpers) lets the
next run finish an interrupted change. The rerun accepts only the old key
(removing the slot the interrupted change added) or the new one (retiring the
old slot), so another key such as a recovery passphrase never becomes the login
password. luksChangeKey is judged by whether the new key opens the disk, not
by its exit status, and key checks exclude LUKS2 tokens, which cryptsetup
open would otherwise accept in place of any password.

Runs are serialised, cryptsetup calls hold a disk lock, a / whose LUKS
partition cannot be resolved fails closed, and passwords are never traced. A
new password equal to the current one is refused, and --pbkdf argon2id is
passed only to LUKS2, so LUKS1 drives can change their password again.
Provisioning, factory reset and update call a fixed set of operations
through it. A platform whose boot chain the generic Limine path can't drive
registers a directory of root-owned entrypoints in the dispatcher; every
other platform gets a no-op and keeps its generic path. Apple Silicon is
registered to omarchy-mac-boot's /usr/lib/omarchy/mac-boot, with its
required operations failing clearly when the package or an entrypoint is
missing. docs/lifecycle-dispatch.md is the contract, including how a
Qualcomm boot package would plug in.
… key slots

Owner provisioning asks provision-prepare before the owner form, hands the
staged unlock to provision-commit and provision-verify where the platform
implements both, and records the kept LUKS slot through luks-slots before
the staged key is destroyed; the disk password change records the owner's
new slot the same way. On x86, Snapdragon and generic aarch64 every call is
a no-op and first boot is unchanged.
Where a platform implements the reset operations, reset-prepare and
reset-verify stage and prove the factory root's boot files, the throwaway
slot is added only after that, and reset-commit gets the key on standard
input once the factory root is active. A failure before the switch rolls the
boot state back and revokes the slot. Elsewhere the Limine UKI path is
unchanged.
omarchy-update-boot runs update-verify after AUR packages, the last
sudo-capable step, so it also covers the initramfs rebuilds they trigger.
It follows third-party build code, so like AUR it authenticates through the
no-update wrapper. A failed verification finishes the update's remaining
steps, then exits non-zero without offering the reboot. Where the platform
does not implement it nothing runs and nothing asks for root.
migrations/1790347292.sh resolves the new optional migrate operation and,
where the platform's boot package implements it, runs it as root. The
entrypoint moves the machine onto the platform's official package set,
idempotently and resumably; its failure leaves the migration pending. Once
it succeeds, a root-owned marker spares other accounts the migration and its
root prompt. Everywhere else, Macs without the boot package included, the
migration is a no-op, and an undetermined platform keeps it pending.
A platform package names its platform with groups=('omarchy-platform-<name>'),
<name> being what omarchy-hw-platform prints. omarchy-settings ships a
pre-transaction hook, the guard it runs and a copy of the detector, so the
guard is resident before the runtime and any platform package. The guard
reads tags from the synced databases and refuses a transaction that installs
a package tagged for another platform; a transaction without a tagged
package passes without asking which machine this is. Image builds answer
from the image's root-owned target manifest, as the detector does.

The guard ships on aarch64 only: no platform package is built for x86_64,
so x86 transactions run no hook. Hardware setup starts by proving the guard
is resident and checking the packages an installer placed without it. On
generic aarch64, where no platform packages exist, a missing guard is
logged, not fatal, and on x86 it is expected.
docs/platform-guard.md is the contract.

Co-authored-by: Birk Skyum <74932975+birkskyum@users.noreply.github.com>
Co-authored-by: Jimmy Van Veen <8206925+JimmayVV@users.noreply.github.com>
omarchy-hw-vulkan reports a Vulkan runtime, not whether this voxtype build
has a Vulkan backend. The aarch64 voxtype-bin package ships only the CPU and
ONNX binaries, so on any aarch64 machine with a Vulkan driver setup ran
`voxtype setup gpu --enable` and printed "Vulkan backend not installed" in
the middle of an otherwise working install. Require the backend binary too.

x86_64 voxtype-bin always ships /usr/lib/voxtype/voxtype-vulkan, so x86
installs still switch to the GPU backend as before.

Ported from #483.

Co-authored-by: Oliver Lukschander <33756270+oliverlukschander@users.noreply.github.com>
The widevine package registers its CDM for Chromium and Firefox only.
Brave looks for the CDM in its own install directory, finds nothing, and
DRM sites (Netflix, Apple TV+, Spotify) fail with a blank player and no
useful error. This hits machines where Widevine comes from that package,
such as aarch64 ones, since no Widevine component is published for them.

Link /opt/WidevineCdm/chromium into /opt/brave-bin and /opt/brave-origin-bin
through as_root when Brave or Brave Origin is installed, and add a migration
that repairs existing installs. Both do nothing when the widevine package is
absent or the browser already has a CDM. A standard x86 install has no
widevine package, so nothing changes there.

Ported from #474, extended to Brave Origin.

Co-authored-by: Caleb Marshall <68087341+cajomar@users.noreply.github.com>
With file logging, run_logged sends a failing leaf's output and its
"Failed:" marker to the install log only, so the caller sees setup stop
with an exit status and nothing else. A missing command (exit 127) was the
case that made this hard to diagnose.

Print the failed script, its exit status and the log path on stderr. Stdout
logging mode already shows the failure marker and is unchanged, and
successful steps stay quiet.

Ported from #389 (the logging part).

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
A migration that exits 75 changed nothing and cannot finish yet: omarchy-migrate
leaves it pending with its login notification, runs the migrations after it and
exits 0, so omarchy update carries on. Any other failure still stops the queue.
The platform migration passes a deferred refusal of its entrypoint through, and
defers itself where the dispatcher can't resolve its entrypoint (the platform
can't be told, or the entrypoint isn't trusted): nothing has run then, so the
update goes on to its boot verification, which fails there, as documented.
00-omarchy-hooks.conf set the busybox line on every machine. On a Mac,
omarchy-mac-boot's drop-ins then add the Asahi firmware hooks, but its
encryption drop-in reads busybox encrypt as a Mac unlocked through
cryptdevice= and leaves the line alone. The image came out as
"... block encrypt asahi omarchy-vendorfw filesystems ...", with no
systemd, sd-encrypt or omarchy-mac-encrypt, so an encrypted Mac could not
unlock its disk. Reproduced against an M1 Pro's installed drop-ins.

The baseline now asks omarchy-hw-platform. Apple Silicon starts from the
systemd line its boot package builds on. A Mac whose own mkinitcpio.conf
carries the asahi hook, or busybox encrypt, keeps that line, as a legacy
install needs. x86, Snapdragon and generic aarch64 keep today's busybox
line, as does a machine with no detector. The detector is the runtime's,
or else the copy omarchy-settings ships for its platform guard, so a
settings package newer than the runtime still places a Mac. A detector
that cannot place the machine stops the build.

The HOOKS test now composes the baseline on each platform and on legacy
Mac lines. A new test composes it with omarchy-mac-boot 20260926-1.45's
drop-ins, kept as fixtures, and checks the exact HOOKS the M1 Pro builds.
The NVIDIA test pins its platform.
Not every optional install exists on every architecture: some vendors ship no
aarch64 build, and some repositories don't carry a package at all. Each
Install row now carries a `when:` guard naming every package its install
command adds, checked with omarchy-pkg-available, so a row with nothing to
install disappears instead of failing halfway through a pacman transaction.
The rows that build from the AUR (Chrome, Edge, Brave, Brave Origin, Zen,
NordVPN) are guarded on the CPU architectures their vendors publish for.

omarchy-pkg-available asks the sync databases: one `pacman -Slq` per batch,
and `pacman -Sp` for a name that list doesn't hold, so a provided name
(libappindicator-gtk3) and a version constraint resolve the way `pacman -S`
will. The menu's guard prelude sources the same function, so the whole batch
still costs one fork. omarchy-reinstall-pkgs reports and skips a default
that no configured repository offers instead of failing the transaction.

On x86_64 every guarded row resolves against the stable and edge
repositories, so the menu is unchanged there.

Tests derive each row's packages from its install command on x86_64 and
aarch64 and fail when the guard names different ones.

Co-authored-by: Ryan Hughes <1630358+ryanrhughes@users.noreply.github.com>
Electron draws a blank window when the machine has no DRM render node: a VM,
a headless or passthrough GPU, or a GPU whose driver isn't up yet (Apple M3
and later on Linux today). omarchy-hw-render-gpu tells whether a renderD node
exists, and omarchy-cmd-electron-gl-args prints --ozone-platform=wayland
--disable-gpu only when it doesn't.

omarchy-cmd-electron-gl-wrap installs a marked PATH wrapper in /usr/local/bin
that execs the real binary with those flags, so it follows the machine rather
than the moment it was installed. It refuses to replace a launcher it didn't
write, or to wrap a binary over itself, and stages the write so a failure
leaves the old launcher in place. omarchy-cmd-desktop-exec-repair points the
user's desktop entry at the wrapper by replacing only the executable token,
keeping arguments, other actions and customizations, with a backup.

The 1Password installer uses them when the machine has no render node. With
one, which is every x86 machine with a working GPU, nothing changes.

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
gpu-screen-recorder knows NVIDIA, AMD, Intel and Broadcom GPUs and aborts
during GL init on anything else, such as Apple Silicon's, before a recording
starts. Screen recording now falls back to wf-recorder, when it is installed,
if gpu-screen-recorder is missing or exits before the file appears. The
picker, file naming, notifications and post-processing are shared. wf-recorder
records one audio device, so desktop plus microphone go through a temporary
null sink that stop unloads, and its track is pinned to 48 kHz. Portal
capture and --resolution stay gpu-screen-recorder only.

The finalize pass keeps 48 kHz too: loudnorm declares 192 kHz output, so
without -ar the AAC encoder wrote 96 kHz from a 48 kHz recording, which many
editors decode as silence, and which on Apple Silicon makes the speaker
safety daemon lock the amps. omacom#11092 makes the same one-line change; whichever
lands second drops it.

Stop and status matched `pgrep -f ^gpu-screen-recorder`, which misses
wf-recorder and matches any command line that starts with that path. The
script now records the recorder's pid, and the new
omarchy-capture-screenrecording-process checks or signals it by its
executable, through a pidfd opened before the check so a reused pid can't be
signalled. When that pid is no longer a recorder (a recording started before
this change, or one that died), every recorder the user runs counts, as it
does for the bar indicator and the Stop row, which use the same helper.

Where gpu-screen-recorder works, which is every x86 GPU it supports today, it
records as before.

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
Co-authored-by: Issac Trotts <15530+ijt@users.noreply.github.com>
systemd-logind treats a closed lid as docked only when an external display
is on a connector type it lists (HDMI, DisplayPort, DVI, VGA...). Displays on
"USB" connectors, which Apple Silicon uses for USB-C displays, aren't on that
list, and a missing comma fuses DVI-A and Composite into one entry. With such
a display in use, closing the lid suspended a laptop that was still being
used on it.

omarchy-system-lid-inhibit holds a handle-lid-switch inhibitor while one of
those connectors is connected and enabled in Hyprland, on a laptop where
HandleLidSwitchDocked is ignore, which is exactly the case logind would have
ignored had it counted the display. It releases the inhibitor when the display
goes. A compositor or logind that doesn't answer changes nothing, since
releasing then would suspend a closed lid. The inhibitor runs as a transient
user unit bound to the monitor watcher's unit, so a watcher that dies can't
leave the lid inhibited until logout.

The monitor watcher runs it alongside the clamshell sync. On a machine whose
external displays are all on connectors logind counts, it does nothing.
When a monitor is unplugged, or the lid turns off the laptop panel, Hyprland
first warps focus to whichever monitor it lists first and only then moves the
removed monitor's workspaces over. The workspace you were on lands hidden
behind that monitor's own (Hyprland 0.56.2, CMonitor::onDisconnect).

monitor.focused fires before Hyprland records the new focus, so the monitor
still reported as active is the one being left: its workspace is remembered
until the event loop next turns, and a monitor.removed in that window focuses
it again once the removal has finished. An open special workspace already
comes along, and any focus or workspace change made before the restore runs
wins.
Laptops with an ambient light sensor and a keyboard backlight LED now light
the keys in the dark and dim them as the room brightens, inverse to display
auto-brightness. omarchy-brightness-keyboard-auto polls the sensor every five
seconds (preferring an IIO device that names itself ALS, and converting a raw
channel with its offset and scale) and maps lux onto the LED, with a deadband
so it doesn't chase noise. It pauses while the screen is locked or the lid is
closed.

A level set with the keyboard-brightness keys wins until the light changes
enough that it no longer fits. omarchy-brightness-keyboard records each level
it sets in the session's runtime directory (a private state directory without
one), so the loop can tell keys turned off on purpose from keys left off by
the lock screen or a restored zero, which it lights again.

The user unit runs it in the graphical session. Its ExecCondition asks
--available, so it is a no-op on machines without both a sensor and a
keyboard LED. First run enables it, and a migration enables it for existing
installs, writing the enable symlink itself when there is no live user
manager.

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
Co-authored-by: Gabe Ohlson <3355909+6abe@users.noreply.github.com>
An image is built away from the machine it will run on, so its hardware
leaves would probe the builder. While the image manifest the detector
already reads (/var/lib/omarchy/image/target) exists, omarchy-apply-hardware
queues every leaf of install/hardware/all.sh instead of running it and arms
omarchy-provision-hardware.service. On the first boot, before owner setup
and the login screen, omarchy-provision-hardware retires the manifest and
runs the queue on the real hardware: a failed step stays queued for the
next boot (exit 75), and the initramfs is rebuilt once after the last step
when a step changed its inputs or asked for it. Bluetooth starts its
service on that boot, whose target is already up. Root ignores any
environment override of these paths. Without a manifest, as on every
ISO install, hardware setup runs exactly as before. Nothing here fetches
package databases: an image carries its sync databases and every package
its steps install.
A root built from a distribution tarball instead of the ISO (Arch Linux
ARM's ships LANG=C) never went through the ISO's locale step, so it ran
non-UTF-8. The config phase now selects en_US.UTF-8, generating it if
needed, but only when LANG is unset, C or POSIX: any named locale is
somebody's choice and stays. The ISO writes the locale before this runs,
so an ISO install is unchanged.

Co-authored-by: Scott Jones <444693+scottjones@users.noreply.github.com>
ryanrhughes and others added 9 commits October 2, 2026 14:37
The pacman platform guard (and the detector copy omarchy-settings shipped for
it, which the HOOKS baseline fell back to), the lint against uname gates, first
run staying pending after a failed finalization, run_logged echoing failures to
stderr, half-up battery rounding, hiding empty-jack inputs and leaving a
filter's capture alone when choosing an input all rode along with the Mac work
without serving it. Each goes back to quattro's behaviour and can come back on
its own merits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A platform package could load its own Hyprland binds, settings and gestures:
binds that replaced Omarchy's chords and decorated every later bind, settings
ahead of the theme, and gestures after the user's files, which needed every
hl.gesture call wrapped so a default could step aside. On a Mac those carried
macOS habits (a three-finger workspace swipe, tap-to-click off, menus opening
on the built-in screen, other screenshot and keyboard-backlight chords), not
anything the hardware needs, and Omarchy should behave the same on every
machine. The one bind a Mac does need, its lid switch under the SMC's name,
joins Omarchy's own lid binds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts them

Every aarch64 channel's template pointed at the edge repository, but a switch
to stable or rc installs the release-named omarchy and omarchy-settings. On
edge/aarch64 those are the 4.0.4 release line, which has no omarchy-hw-platform,
lifecycle dispatch or omarchy-pkg-defaults, so `omarchy-channel-set stable` on
a Mac replaced the quattro runtime it runs with one that cannot run it, and
succeeded.

aarch64 platforms now have edge templates alone, so a switch to stable or rc is
refused before anything changes; adding those templates once a release
supports aarch64 opens them. Refresh with no channel named, as reinstall runs
it, and install finalization for a channel the platform has no templates for
take the platform's default channel: stable on x86_64, edge on aarch64.
d0b94d9 returned omarchy-audio-input-set-default to moving every source
output, as not serving Mac support. It does: asahi-audio's microphone DSP on
Apple Silicon records the raw array through a filter-chain capture stream
(audio_effect.jNNN-mic, node.link-group "filter-chain-..."). On an M1 Pro,
choosing the Mac's microphone in the audio panel moved that stream onto the
DSP's own output, and the microphone recorded digital silence (-91 dB, from
-55 dB of room noise) until PipeWire restarted. With the skip it keeps
recording (-54 dB).

This restores the skip of source outputs carrying node.link-group, and its
test, as they were before that commit.
The aarch64 edge templates, the template helper and the update-process docs
still said every platform has a template per channel and every ARM channel
installs from edge, which the previous commit made untrue.
omarchy-mac and omarchy-mac-boot now live in omacom/omarchy-mac-pkgs, with
each package at the top level. The dispatcher, its documentation and the
Apple Silicon package list name that repository, and the drop-in test's
fixtures, byte for byte the same as omarchy-mac-boot/files/etc/mkinitcpio.conf.d
at 4399105, cite it there.
The migrate operation went with the Mac migrations, and no caller hands a
machine to a platform migration any more, so the header lists only the
flows that still dispatch. The optional-operations comment is rewrapped.
A fresh install marks every migration done only for the user it creates, so
an account added later runs them all on its first update. On an Apple
Silicon Mac this one matches: an M1 Pro reports sys_vendor "Apple Inc." and
a BCM4387 (14e4:4433), so it would append feature_disable=0x82000, which
stops that chip scanning once brcmfmac reloads. Restore the guard and its
test case.
omarchy-hw-fingerprint only scanned USB, so a reader the kernel drives
another way, such as a Mac's Touch ID behind its Secure Enclave, was never
found: no first-run invitation, and the setup stopped at "No fingerprint
sensor detected". A platform package now names such readers in
/usr/share/omarchy-platform/fingerprint-readers, each as a file and the
value it reads once the reader is usable.

Such a platform supplies the libfprint that drives its readers, so the
setup installs only fprintd there instead of swapping in libfprint-git,
which lacks the platform's driver, and the removal drops only fprintd.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The setup kept a platform's own libfprint because no Omarchy libfprint
carried a Mac's Touch ID driver. omarchy-pkgs' libfprint-git now builds for
aarch64 with that driver (omacom/omarchy-pkgs#806), so the setup's
libfprint-git is the right library on a Mac too, and this change only
teaches omarchy-hw-fingerprint the platform's readers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maralcbr

maralcbr commented Oct 5, 2026

Copy link
Copy Markdown
Member

@scottjones reviewed at 58fe858. The parser is sound: only lines starting with / with exactly two fields count, comments and malformed lines are skipped, the glob is pathname expansion only (nothing in the file is executed), * stays within one directory, and $(<file) drops sysfs's trailing newline. With no platform file it's one stat and the existing USB scan, so it's safe to land alongside omacom/omarchy-pkgs#806.

Small things before merge:

  • Docs vs behaviour. docs/file-layout.md says the file must read "exactly that value", but trailing newlines are dropped, whitespace splits fields (a glob with a space becomes glob + value), and the read happens as the session user (a 0400 node would never match). Worth stating those three.
  • Missing regression. Every platform case pairs the file with a USB device that isn't a reader. Please add the other direction: platform file present but not matching (or glob matches nothing) plus a real USB reader → still exit 0, so a later change can't hide USB readers on a machine whose platform ships the file.
  • Platform-file inventory. docs/lifecycle-dispatch.md's list of platform files doesn't mention fingerprint-readers, and the new paragraph says aarch64 libfprint-git already carries the Touch ID driver, which is true only once /etc/os-release doesnt contain omarchy breaks omahcl.com #806 is published.

Agreed this belongs here as a generic platform file, with the apple_sep path in the omarchy-mac package.

scottjones and others added 2 commits October 5, 2026 06:49
…e it

Marcelo's review: the docs said a file must read "exactly" its value, but
the comparison drops trailing newlines, a space splits a line's fields and
the file is read as the session user; they now say so. A platform file that
matches nothing must never hide a USB reader, so the test now pairs one with
a real USB reader both ways. lifecycle-dispatch.md lists the file with the
others, and file-layout.md no longer says aarch64 libfprint-git carries the
Touch ID driver before omacom/omarchy-pkgs#806 publishes it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A failed enrollment on a Mac's Touch ID showed how setup's output misled:
it told everyone to keep moving the finger around the sensor, which suits a
swipe sensor, and printed fprintd's raw "Enroll result: enroll-stage-passed"
lines. A press sensor needs a separate touch for each sample, fprintd sends
one stage after its duplicate check before enrollment starts, and one stage
can take several touches, so after a single touch enrollment looked under
way and timed out a minute later.

Setup now asks fprintd for the reader's scan type and, for a press sensor,
says to touch, lift and touch again until it says Enrolled. It turns each
result into an instruction: the duplicate check's stage prints nothing, each
later stage is a numbered step followed by what to do next, retries and
failures say what to do, and verify reads the same way, " (done)" and
" (not done)" suffixes included. fprintd's routine lines are hidden, but
anything else it prints, such as why it could not claim the device, is
shown, and fprintd's exit status still decides each step. sudo is
authenticated first, and named, because with fingerprint sudo set up its own
touch read as the first sample; if it fails, setup says why and stops.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
scottjones added a commit to omacom/omarchy-mac-pkgs that referenced this pull request Oct 5, 2026
It skipped unless the pinned runtime named fingerprint-readers, so CI was
green without running it. The pin now names omacom/omarchy-mac#694's head
(#13362 plus the detector), and the test no longer skips. Before this lands
the pin moves to the merged commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones

Copy link
Copy Markdown
Collaborator Author

Thanks — all four addressed in d94c8d71c:

  • docs/file-layout.md now says the file's trailing newlines are dropped, whitespace splits fields (so neither glob nor value can hold a space), and it's read as the session user; on hardware diag/touchid is 0444.
  • New regressions: a non-matching platform file, and one whose glob matches nothing, beside a real USB reader (product string and vendor) still detect it. Checked they fail if the platform branch stops the scan.
  • fingerprint-readers is in lifecycle-dispatch.md's list.
  • The paragraph no longer claims aarch64 libfprint-git has the driver; it says setup can enroll once /etc/os-release doesnt contain omarchy breaks omahcl.com #806's build carries it.

One addition in 28102156b: setup now guides enrollment step by step. A failed Touch ID enrollment showed that "keep moving the finger around" plus fprintd's raw enroll-stage-passed lines made one touch look like progress, and it timed out. It asks fprintd for the scan type and tells a press sensor's owner to touch, lift and touch again; turns each result into an instruction (fprintd's duplicate-check stage prints nothing, later stages are steps, retries and failures say what to do, and fprintd's own error lines still show); and authenticates sudo first, because with fingerprint sudo its touch read as the first sample. fprintd's exit status still decides each step. Reviewed by Grok and Fable, and tested on the M2 Max.

@maralcbr

maralcbr commented Oct 5, 2026

Copy link
Copy Markdown
Member

@scottjones re-reviewed at 2810215. All three earlier points are fixed: the docs describe the real match rules, the inverse USB regressions are in, and fingerprint-readers is in lifecycle-dispatch.md.

The enrollment guidance is a good change, and its status handling is sound: set -e without pipefail plus PIPESTATUS[0] keeps fprintd's result, a failed enroll still exits 1, and PAM is still written only after a successful verify.

One thing before merge:

  • The first enroll-stage-passed is always hidden (bin/omarchy-setup-security-fingerprint:100-104). steps starts at -1 on every reader, on the assumption that the first stage is the duplicate check. That's true for a reader that identifies, but on one that doesn't (a USB swipe or match-on-host sensor, say), the first real scan prints nothing and every later step is numbered one low. Since this path runs on every machine, please key the skip on the reader (fprintd's duplicate check only runs when the device can identify) rather than skipping unconditionally.

Lower priority:

  • sudo -n true can itself block on pam_fprintd when fingerprint sudo is already set up, so a re-run may wait for a touch before "First, confirm it's you" is printed. sudo -n -k-style checks can't avoid PAM; it may be enough to print the line before checking.
  • A failed verify falls off the end with status 0 (only the enroll failure exits 1). That predates this PR, but it's an easy exit 1.
  • fingerprint-package-test.sh never reaches the enroll-succeeds paths: enroll 0 + verify 1 (no PAM) and enroll 0 + verify 0 (PAM written) would lock the ordering.
  • Worth a glance on hardware that verify's retry lines show as they happen rather than when fprintd-verify exits, since its stdout is now a pipe.

scottjones and others added 2 commits October 5, 2026 21:17
The first enroll-stage-passed was always hidden, on the assumption that
it is fprintd's duplicate check. fprintd runs that check only on readers
that identify, so on any other reader the first real stage was hidden
and every later step was numbered one low.

fprintd's D-Bus interface doesn't say whether a reader identifies, but
it gives the reader's name. Touch ID ("Apple secure enclave fingerprint
sensor") identifies, and its check needs no touch while nothing is
enrolled, so its first stage stays hidden. Every other reader's first
stage counts: on one that doesn't identify it is the first enrollment
stage, and a duplicate check that took a touch is shown as step 1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A failed verify printed its message and fell off the end with status 0;
it now exits 1 like a failed enrollment. The tests now reach the paths
after a successful enrollment: a failed verify fails setup without
touching PAM, and a verified print writes PAM only after the verify.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones

Copy link
Copy Markdown
Collaborator Author

@maralcbr thanks. At a36627c70:

  • First stage: fprintd's D-Bus interface doesn't expose IDENTIFY, but it does give the reader's name, so the skip is now keyed on Touch ID ("Apple secure enclave fingerprint sensor", the driver's full_name), whose first stage is always fprintd's duplicate check. Every other reader counts its first stage, including one fprintd can't name. Tests cover Touch ID, another reader and no name.
  • Failed verify now exits 1, and the tests reach both enroll-succeeds paths: verify fails → exit 1, no PAM edits; verify passes → PAM written after the verify.
  • sudo -n true: it never reaches PAM. With no cached timestamp sudo refuses non-interactive mode before authenticating (noninteractive_auth is off by default). With pam_fprintd in /etc/pam.d/sudo it returned 1 in 8 ms here, so I left it.
  • Live verify lines: fprintd-verify prints each result with g_print, which flushes stdout per call; a test program showed lines reaching a pipe as printed.

@maralcbr

Copy link
Copy Markdown
Member

Thanks @scottjones, I'd close this one and split what's left upstream:

Nits for the upstream enrollment PR:

  • When busctl can't read the scan type (empty result), the script takes the swipe branch, so a press reader is told "Swipe your finger across the sensor." to verify. Neutral wording for an unknown scan type would avoid that.
  • Spotting Touch ID by the libfprint driver name ("Apple secure enclave fingerprint sensor") only shifts the step count if the name changes, so it's harmless, but a comment pointing at where that string lives in libfprint-git would help whoever renames it.

@scottjones

Copy link
Copy Markdown
Collaborator Author

Thanks @maralcbr, split as you suggested: detection is in omacom#14675, and enrollment is in omacom#15512, rebased onto omacom#7158 with both of your nits. Closing this one.

@scottjones scottjones closed this Oct 15, 2026
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