Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mac-manual/content/04-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Owner provisioning then asks for your name and password, as on x86. On an encryp

The next boot unlocks the disk with your password. At the prompt the built-in keyboard and trackpad work, because their drivers are loaded early in the initramfs. A Bluetooth keyboard does not, just as on x86: use the built-in keyboard or a wired one.

## Touch ID login

After you explicitly enable Touch ID, its driver starts at each boot and restores the fingerprints already enrolled for Linux. The first login after each boot uses your password, which also unlocks your login keyring. After that, while the keyring stays unlocked, a stock SDDM login screen accepts Touch ID: submit your username with an empty password and touch the sensor when prompted. Typing your password always works and skips the fingerprint wait. An account that has no password cannot use the SDDM login screen while Touch ID is on. A customized SDDM authentication stack is left for its administrator rather than rewritten, and fingerprint setup carries on without the login screen change.

On the 15-inch M4 Air (J715), support additionally requires a compatible kernel and this Mac's own FDR root key and FSC2 calibration. They are private, are not shipped in a package, and are not interchangeable with another Mac's files. Setup currently accepts only the 130427-byte calibration size observed working on one reference Mac; size does not authenticate the file, and other sizes have not been qualified. The earlier J715 port has restored an existing enrollment and completed fingerprint login after a cold boot; the current upstream kernel still needs its own qualification.

Fingerprint login does not unlock an encrypted root disk, and it is not offered until the desktop keyring has been unlocked with your password. Keep using the disk password at the early boot prompt. Turning Touch ID off removes its SDDM authentication include, but does not delete the Linux key store. If an administrator has customized the PAM configuration and the include cannot be removed safely, turning it off still stops the driver loading at the next boot and reports that the PAM configuration needs review.

## Changing passwords

Change passwords under _Update > Password_ in the Omarchy menu, as on x86. On a Mac your disk password and your login password start out the same, but each changes on its own: _Drive Encryption_ changes only the disk password, and _User_ only the login password. A disk password change is recorded step by step, so an interruption resumes rather than leaving the disk half changed. If you no longer know your password, see the next section.
Expand Down
16 changes: 15 additions & 1 deletion omarchy-mac/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# omarchy-mac

Apple Silicon defaults and support services for Omarchy. Version: `0.2.3` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one.
Apple Silicon defaults and support services for Omarchy. Version: `0.2.4` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one.

## Build and stage

Expand Down Expand Up @@ -39,6 +39,20 @@ The logind drop-in `/usr/lib/systemd/logind.conf.d/20-omarchy-mac-sleep-key.conf

Vendor defaults use NetworkManager's `/usr/lib/NetworkManager/conf.d`, systemd's `/usr/lib/systemd` and `/usr/lib/tmpfiles.d`, modprobe's `/usr/lib/modprobe.d`, and WirePlumber's `/usr/share/wireplumber/wireplumber.conf.d`. Same-name `/etc` or user fragments retain precedence. iwd has no vendor directory, so an `iwd.service` drop-in lists `/usr/lib/omarchy-mac/iwd` after `/etc/iwd`; iwd loads the first `main.conf` it can read, so an `/etc/iwd/main.conf` replaces the Apple one whole. The Apple default keeps iwd off 6 GHz: on the BCM4388 a join the firmware makes to a 6 GHz access point reports connected and authorized, yet the access point drops everything the Mac sends and DHCP never completes, so a network that also offers 5 GHz joins there instead. The firmware's own roaming can still move a weak connection onto 6 GHz, and `omarchy network band 6` cannot reach 6 GHz. Like the backend, it applies when iwd next starts: setup restarts nothing, so an upgraded Mac keeps 6 GHz until it reboots. Setup reports effective live NetworkManager/module configuration and systemd fragments. Review those reports and any drop-ins when diagnosing overrides; custom policy is never normalized to the package default.

## J715 Touch ID and SDDM login

J715 (the 15-inch M4 Air, `apple,j715` and `apple,t8132`) additionally needs a kernel with the J715 nonce-session support and this Mac's own installed 10848-byte FDR MSRk body at `apple/msrk-j715.bin`. Its FSC2 calibration must already be installed under the sensor node's `firmware-name`, or `apple/mesa_calibration.bin` when the node omits it. There is no automatic extraction path for this board: the older calibration carve and the Neo's root-key envelope are not substitutes. Eligibility checks the files without reading or copying the key; enablement checks the existing body's observed size before it records consent or loads the driver. A length check does not authenticate the body: it must already have been acquired and verified for this Mac, and the enclave decides whether to accept it. Keep the key root-only. This package neither distributes private factory data nor recreates or resets existing enrollments.

For J715, eligibility requires every present calibration candidate to be readable and 130427 bytes, the size observed working on one reference Mac. The comparison with an earlier failure was not a controlled A/B test. This deliberately rejects other sizes until they are tested; size alone does not prove that a body is complete, authentic or belongs to this Mac.

The existing consent-gated boot service loads the driver before the display manager and fprintd. Its failure does not prevent password login. An already enrolled fingerprint still needs the driver's successful restore and matching diagnostics on the new boot; same-boot enrollment alone does not prove that.

Where SDDM is installed, enabling Touch ID also adds an authentication include to its stock `system-login` PAM stack. The include preserves shell, nologin and account-lock checks, and copies the lockout options (`silent`, `deny=`, `unlock_time=`, `fail_interval=`) from the system's `system-auth`, so Omarchy's limits apply; any other option or rule there is administrator-owned and refused. An empty password asks for a fingerprint, which is offered only while the user's login keyring is already running and unlocked, so the first login after each boot uses the password that unlocks it; a fingerprint request ends after five seconds or three rejected fingers without trying the empty password, and rejections count toward the account lock. An account with no password cannot log in at SDDM while Touch ID is on, since its empty password is read as a fingerprint request. Any other password skips the fingerprint and goes straight to the original password stack. A greeter can therefore start fingerprint requests on its own and still accept a typed password. Account, password and session management remain the original SDDM configuration. The helper refuses custom authentication rules, symlinks and edited owned policy rather than overwriting them. The SDDM step is best effort: when it refuses, setup says so and fingerprint enrollment goes on with the login screen unchanged. Only a Mac whose owner agreed through the prompt that names the SDDM login screen, recorded in `/etc/omarchy-mac/touchid-sddm`, gets the change; a Mac that agreed earlier is not changed unasked. Turning Touch ID off removes that record, and an `sddm` file that does not include the policy, a symlink included, never blocks removal. Disabling Touch ID removes only its own include and restores the original bytes. No SDDM restart is needed. Fingerprint login does not unlock a password-encrypted keyring or the LUKS root volume.

If administrator-owned PAM configuration prevents removal of the include, disabling still removes the boot consent and driver options, but reports failure so the remaining PAM policy can be reviewed. It does not unload a driver that is already running.

The earlier J715 port has restored an existing Linux enrollment after a complete shutdown and power-on and completed an SDDM fingerprint login. The login keyring still required a separate unlock. This does not qualify the current upstream kernel or concurrent camera operation. The offline PAM tests exercise libpam itself, including password fallback and denied accounts; they do not replace hardware checks on the matching kernel. Release this support only after that kernel and the userspace driver are available and qualified together.

## Video decode in mpv

mpv has no vendor configuration directory and decodes in software unless told otherwise. The package ships its Apple default as `/usr/share/omarchy-mac/mpv/mpv.conf` and a systemd-tmpfiles rule that copies it to `/etc/mpv/mpv.conf` only when that file is missing. pacman's systemd hook applies the rule when the package is installed or upgraded, and boot applies it again. An existing `/etc/mpv/mpv.conf` is never overwritten, with one exception: `omarchy-mac-setup-system` replaces a regular file byte-identical to the earlier default, which lacks `gpu-sw=yes`, with the current default, and leaves an edited copy or a link alone. An upgrade alone does not apply this, because neither `omarchy update` nor a pacman upgrade runs setup: run `sudo omarchy-mac-setup-system`, or rerun hardware setup, to apply it. So edit it rather than delete it to change the system default; each user's `~/.config/mpv/mpv.conf` is read after it and wins, and `hwdec=no` there decodes in software.
Expand Down
13 changes: 9 additions & 4 deletions omarchy-mac/entrypoints/disable-fingerprint
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ elif ! flock -w 300 "$lock_fd"; then
exit 1
fi

pam_status=0
if ! /usr/lib/omarchy-mac/touchid-sddm disable; then
pam_status=1
echo "Touch ID's SDDM policy could not be removed; an administrator must review it." >&2
fi
key=/usr/lib/firmware/updates/apple/msrk-j700.bin
if [[ -e /etc/omarchy-mac/touchid-on || -e /etc/modprobe.d/omarchy-mac-touchid.conf || -e $key || -e $key.new ]]; then
if [[ -e /etc/omarchy-mac/touchid-on || -e /etc/omarchy-mac/touchid-sddm || -e /etc/modprobe.d/omarchy-mac-touchid.conf || -e $key || -e $key.new ]]; then
# A record left behind, on a read-only root say, loads the driver again.
if ! rm -f /etc/omarchy-mac/touchid-on /etc/modprobe.d/omarchy-mac-touchid.conf "$key" "$key.new"; then
echo "Touch ID could not be turned off: remove /etc/omarchy-mac/touchid-on, /etc/modprobe.d/omarchy-mac-touchid.conf and $key" >&2
if ! rm -f /etc/omarchy-mac/touchid-on /etc/omarchy-mac/touchid-sddm /etc/modprobe.d/omarchy-mac-touchid.conf "$key" "$key.new"; then
echo "Touch ID could not be turned off: remove /etc/omarchy-mac/touchid-on, /etc/omarchy-mac/touchid-sddm, /etc/modprobe.d/omarchy-mac-touchid.conf and $key" >&2
exit 1
fi
echo "Touch ID stops loading at the next boot. The key store for Linux stays on this Mac."
fi
exit 0
exit "$pam_status"
39 changes: 21 additions & 18 deletions omarchy-mac/entrypoints/enable-fingerprint
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,33 @@ if [[ -e /etc/omarchy-mac/touchid-on ]]; then
# whatever its status: on a kernel that loads the driver read-only, the
# options are what lets it reach ready after a restart.
options=/etc/modprobe.d/omarchy-mac-touchid.conf
if [[ ! -e $options ]]; then
# Under the Touch ID lock, so a removal running now can't be undone here.
lock=/run/omarchy-mac/touchid.lock
if ! { mkdir -p -m 0755 "${lock%/*}" && exec {lock_fd}>>"$lock"; } 2>/dev/null || ! flock -w 300 "$lock_fd"; then
echo "Touch ID's driver options could not be written: another Touch ID setup or removal is still running." >&2
exit 1
fi
if [[ ! -e /etc/omarchy-mac/touchid-on ]]; then
echo "Touch ID was turned off while this ran, so setup goes on without it."
exit 0
elif [[ ! -e $options ]]; then
{ mkdir -p -m 0755 "${options%/*}" &&
printf '%s\n' "# The owner turned on Touch ID; omarchy-mac's disable-fingerprint removes this." \
"options apple_sep xart_writes=1 provision_keybag=1" >"$options.new" &&
chmod 0644 "$options.new" && mv -fT "$options.new" "$options"; } ||
{ rm -f "$options.new" 2>/dev/null; echo "Touch ID's driver options could not be written to $options" >&2; exit 1; }
fi
exec {lock_fd}>&-
# Options and login policy share the setup/removal lock.
lock=/run/omarchy-mac/touchid.lock
if ! { mkdir -p -m 0755 "${lock%/*}" && exec {lock_fd}>>"$lock"; } 2>/dev/null || ! flock -w 300 "$lock_fd"; then
echo "Touch ID's driver options could not be written: another Touch ID setup or removal is still running." >&2
exit 1
fi
if [[ ! -e /etc/omarchy-mac/touchid-on ]]; then
echo "Touch ID was turned off while this ran, so setup goes on without it."
exit 0
elif [[ ! -e $options ]]; then
{ mkdir -p -m 0755 "${options%/*}" &&
printf '%s\n' "# The owner turned on Touch ID; omarchy-mac's disable-fingerprint removes this." \
"options apple_sep xart_writes=1 provision_keybag=1" >"$options.new" &&
chmod 0644 "$options.new" && mv -fT "$options.new" "$options"; } ||
{ rm -f "$options.new" 2>/dev/null; echo "Touch ID's driver options could not be written to $options" >&2; exit 1; }
fi
# The owner agreed already, so they are never asked again: a Touch ID that
# isn't ready yet needs a restart, and setup goes on with any other reader.
if [[ $status != "ready" ]]; then
echo "Touch ID is turned on but isn't ready yet ($recorded_status)."
echo "Restart this Mac, then set up the fingerprint again. If it still isn't"
echo "ready, see journalctl -u omarchy-mac-touchid-activate."
elif [[ -e /etc/omarchy-mac/touchid-sddm ]] && ! /usr/lib/omarchy-mac/touchid-sddm enable; then
# Only an owner who was told about the login screen gets it, and it never stops setup.
echo "Touch ID's SDDM login was left as it is: its PAM configuration is not one this package manages." >&2
fi
exec {lock_fd}>&-
exit 0
fi
# Only a Touch ID that can be set up stops the setup: anywhere else it goes on,
Expand Down Expand Up @@ -100,6 +101,8 @@ echo "Turning Touch ID off later removes your fingerprints and stops the driver"
echo "loading. The key store stays."
echo
echo "This applies to every user on this Mac and needs an administrator."
echo "On a stock SDDM login screen, fingerprints also work for login; the"
echo "password remains available. A custom SDDM PAM configuration is kept."
echo "Saying no leaves Touch ID off. You can turn it on later from"
echo "Setup > Security > Fingerprint."
echo
Expand Down
25 changes: 23 additions & 2 deletions omarchy-mac/lib/touchid-eligibility
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ if compatible apple,t8103 || compatible apple,t6000 || compatible apple,t6001; t
echo unsupported:m1-family
exit 0
elif ! compatible apple,t8112 && ! compatible apple,t6020 && ! compatible apple,t6021 && ! compatible apple,t8140 &&
! { compatible apple,t8122 && { compatible apple,j613 || compatible apple,j615; }; }; then
! { compatible apple,t8122 && { compatible apple,j613 || compatible apple,j615; }; } &&
! { compatible apple,t8132 && compatible apple,j715; }; then
echo unsupported:board
exit 0
fi
Expand All @@ -68,15 +69,35 @@ calibration=apple/mesa_calibration.bin
if [[ -r $sensor/firmware-name ]]; then
calibration=$(tr -d '\0' <"$sensor/firmware-name")
fi
if ! installed "$calibration" && { compatible apple,t8140 || ! can_extract extract-mesa-calibration; }; then
if ! installed "$calibration" && { compatible apple,t8140 || compatible apple,t8132 || ! can_extract extract-mesa-calibration; }; then
echo unsupported:no-calibration
exit 0
Comment thread
audreyt marked this conversation as resolved.
Resolved
fi
# A 130427-byte J715 FSC2 body worked on one reference Mac.
# Size rejects other-sized inputs, not another Mac's or forged data.
# Check every lookup candidate so a good copy cannot hide a malformed shadow.
if compatible apple,t8132; then
for directory in "$firmware" "$firmware/vendor" "$firmware/updates"; do
calibration_path=$directory/$calibration
if [[ -e $calibration_path || -L $calibration_path ]]; then
if [[ ! -f $calibration_path || ! -r $calibration_path ]] || [[ $(wc -c <"$calibration_path") != 130427 ]]; then
echo unsupported:invalid-calibration
exit 0
fi
fi
done
fi
# The Neo's sensor key is rebuilt once the owner agrees, by touchid-root-key
# (Python), from the factory records asahi-installer leaves on the ESP.
if compatible apple,t8140 && ! installed apple/msrk-j700.bin &&
{ [[ ! -r $esp/asahi/all_firmware.tar.gz ]] || ! command -v "$python" >/dev/null; }; then
echo unsupported:no-root-key
exit 0
fi
# J715 needs its own FDR MSRk and FSC2, not the Neo's reconstructed key or
# the older calibration an extractor can find in the system container.
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.

echo available
Loading