Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion mac-manual/content/12-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This is the status on the reference Macs. <span class="status ok">works</span> i
| Battery, lid, power profiles | <span class="status ok">works</span> | |
| External displays | <span class="status ok">works</span> | HDMI on models that have it, USB4 and DisplayPort alt-mode through the Aurora kernel. Five displays on the M2 Max. A third and fourth display rely on an aquamarine fix carried until Hyprland releases it. |
| Variable refresh rate, camera (ISP), always-on processor | <span class="status ok">works</span> | Aurora kernel |
| Hardware video decode | <span class="status wip">in progress</span> | VA-API decoding of H.264, HEVC Main and Main10, and VP9 8 and 10-bit, tested on a 13" M1 MacBook Pro; 8-bit H.264, HEVC and VP9 also on a 16" M2 Max with the Aurora kernel. mpv uses it by default for H.264, HEVC and VP9, at about a quarter of the CPU of software decoding at 1080p; `hwdec=no` in `~/.config/mpv/mpv.conf` turns it off. To change the system default, edit `/etc/mpv/mpv.conf` rather than deleting it, since a deleted copy comes back at the next boot. An unedited copy of the earlier default, which lacks `gpu-sw=yes`, is the one exception: setup replaces it with the current default, which lets mpv play on Macs whose GPU has no driver yet. An upgrade alone does not run setup, so on a Mac that already had the earlier default, run `sudo omarchy-mac-setup-system`, or rerun hardware setup, to apply it. Browser acceleration is still open. No hardware encoding. |
| Hardware video decode | <span class="status wip">in progress</span> | VA-API decoding of H.264, HEVC Main and Main10, and VP9 8 and 10-bit, tested on a 13" M1 MacBook Pro; 8-bit H.264, HEVC and VP9 also on a 16" M2 Max with the Aurora kernel. mpv uses it by default for H.264, HEVC and VP9, at about a quarter of the CPU of software decoding at 1080p, drawing with `vo=gpu-next` over OpenGL (`gpu-api=opengl`) with Wayland colorspace hints enabled; `hwdec=no` in `~/.config/mpv/mpv.conf` turns hardware decode off and `vo=gpu` restores the legacy OpenGL renderer. To change the system default and keep your choice across upgrades, edit `/etc/mpv/mpv.conf` rather than deleting it, since a deleted copy comes back at the next boot. An unedited copy of an earlier released default is the one exception: `omarchy-mac`'s pacman hook (on install or upgrade on a booted system) and `omarchy-mac-setup-system` replace it automatically with the current default while leaving edited copies and symlinks alone. Browser acceleration is still open. No hardware encoding. |
| Screen recording | <span class="status ok">works</span> | Encoded on the CPU through `wf-recorder`, because the Apple GPU has no supported hardware video encoder |
| Widevine DRM in browsers | <span class="status ok">works</span> | When the package is available from the Asahi repositories |
| Steam | <span class="status ok">works</span> | Optional, native 4K-page Steam (`user4k=on`) with Aurora FEX and x86 Aurora Mesa on channels carrying `omarchy-steam-fex` 1.0.0-5 or newer. Legacy `muvm` GPU passthrough is deprecated on Aurora 7.3+ kernels and is not pulled in by default. Macs upgraded from `[asahi-alarm]` that still hold Asahi's `steam 20241231-4` shim should switch to Omarchy's native client with `sudo pacman -S omarchy/steam`. |
Expand Down
6 changes: 3 additions & 3 deletions omarchy-mac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Runtime dependencies: `omarchy` (the `omarchy-hw-platform` detector and its Appl

Upgrade the matching runtime, settings and add-on candidates in one pacman transaction. Their transferred commands and user unit must have only one owner. A fresh Apple Silicon install takes two transactions before `omarchy-apply-system`: first one that installs the settings package, then one that installs the platform's default set (`omarchy-pkg-defaults aarch64-apple`: the base, aarch64 and Apple lists, this add-on included). The settings package's pacman platform guard checks only transactions that start after it is installed, so no Apple package may share a transaction with it; the runtime can go in either. The recipe must tag this package with `groups=('omarchy-platform-apple-silicon')`; the desktop's `docs/platform-guard.md` has the contract. The desktop's last hardware leaf runs this package's system setup through the dispatcher, and offline setup never downloads it: a Mac without it keeps Omarchy's generic setup.

Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless the runtime's Apple predicate `omarchy-hw-apple-silicon` holds (`omarchy-hw-platform` reports `aarch64-apple`, or `apple-silicon` on a runtime from before the platform rename), and fails if the detector does. It removes the Intel Mac Broadcom quirk (`options brcmfmac feature_disable=0x82000`, which breaks Apple Silicon Wi-Fi) from `/etc/modprobe.d/brcmfmac.conf` wherever an unguarded runtime migration appended it: only that exact line, with the comment block and blank line written right above it, goes; the file goes when nothing but blank lines is left, a link is left alone with the manual fix, and the initramfs rebuild it owes is recorded under `/var/lib/omarchy/migrations/1789172112-initramfs-pending`, which the runtime's migration finishes. It replaces `/etc/mpv/mpv.conf` with the current mpv default only while it is a regular file byte-identical to the earlier default, which lacks `gpu-sw=yes`; an edited copy or a link stays. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. The package's drop-in `speakersafetyd.service.d/50-omarchy-mac-profile.conf` gates the unit on `/usr/lib/omarchy-mac/speaker-safety-profile`, an `ExecCondition=` that skips it instead of letting it crash-loop unless `omarchy-hw-apple-silicon` holds and `/usr/share/speakersafetyd/<maker>/<model>.conf` exists for the first compatible less its trailing letters; on such a Mac the live restart is a skip and the speakers stay muted. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. A live run gives iwd a profile for each Wi-Fi network NetworkManager saved with its key before the switch, as NetworkManager itself does for a new connection, so saved networks keep connecting instead of reading as a wrong password. The greeter drop-ins need no setup: from the next start of `sddm`, or of `greetd`, which shows the login screen since omacom/omarchy#20404, they hold the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer. On a J514C/T6031 boot whose loader handed the GPU and display over (and without `apple_t6031_display.enable=0`) it instead waits up to 30 s for an `apple-drm` card and an `asahi-g15` render device, then settles udev for at most 10 s and rechecks them. This avoids opening the autologin VT during the framebuffer handoff. Missing devices or a settle timeout never fail the login screen; the wait enables no driver and changes no owner settings. Other boards retain their existing display wait.
Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless the runtime's Apple predicate `omarchy-hw-apple-silicon` holds (`omarchy-hw-platform` reports `aarch64-apple`, or `apple-silicon` on a runtime from before the platform rename), and fails if the detector does. It removes the Intel Mac Broadcom quirk (`options brcmfmac feature_disable=0x82000`, which breaks Apple Silicon Wi-Fi) from `/etc/modprobe.d/brcmfmac.conf` wherever an unguarded runtime migration appended it: only that exact line, with the comment block and blank line written right above it, goes; the file goes when nothing but blank lines is left, a link is left alone with the manual fix, and the initramfs rebuild it owes is recorded under `/var/lib/omarchy/migrations/1789172112-initramfs-pending`, which the runtime's migration finishes. It delegates `/etc/mpv/mpv.conf` updates to `/usr/lib/omarchy-mac/mpv-default-sync` (also called by `92-omarchy-mac-mpv-default.hook` on package install or upgrade on a booted system), replacing `/etc/mpv/mpv.conf` with the current mpv default only while it is a regular file byte-identical to an earlier released default; an edited copy or a link stays. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. The package's drop-in `speakersafetyd.service.d/50-omarchy-mac-profile.conf` gates the unit on `/usr/lib/omarchy-mac/speaker-safety-profile`, an `ExecCondition=` that skips it instead of letting it crash-loop unless `omarchy-hw-apple-silicon` holds and `/usr/share/speakersafetyd/<maker>/<model>.conf` exists for the first compatible less its trailing letters; on such a Mac the live restart is a skip and the speakers stay muted. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. A live run gives iwd a profile for each Wi-Fi network NetworkManager saved with its key before the switch, as NetworkManager itself does for a new connection, so saved networks keep connecting instead of reading as a wrong password. The greeter drop-ins need no setup: from the next start of `sddm`, or of `greetd`, which shows the login screen since omacom/omarchy#20404, they hold the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer. On a J514C/T6031 boot whose loader handed the GPU and display over (and without `apple_t6031_display.enable=0`) it instead waits up to 30 s for an `apple-drm` card and an `asahi-g15` render device, then settles udev for at most 10 s and rechecks them. This avoids opening the autologin VT during the framebuffer handoff. Missing devices or a settle timeout never fail the login screen; the wait enables no driver and changes no owner settings. Other boards retain their existing display wait.

Run `omarchy-mac-setup-user` as each target user with their HOME/XDG directories. It enables the vendor unit without a session bus. It writes nothing into the user's Hyprland files; a block an earlier version appended to `input.lua` or `looknfeel.lua` stays, as the user's. With a live bus, reached only through XDG_RUNTIME_DIR (which `sudo -i` clears), it reloads the user manager, reports the effective unit and starts the mapper. The mapper makes the microphone a typed stereo source, `omarchy_asahi_mic` ("MacBook Microphone"): pipewire-pulse's `module-remap-source` records asahi-audio's mono DSP source (its AUX0 or MONO port), which WirePlumber links to the left side and the mapper to the right, or to a single MONO capture port when PipeWire negotiates one, and offers an `Audio/Source` with front-left and front-right, the shape of a stock microphone, so the desktop's audio panel drives its volume, mute and level meter as it does any other. It makes that source the default input only if a brief sample finds signal, and hands a silent one back to the DSP source. A muted mapping is the user's microphone mute and is left alone. On upgrade from 0.1.2 the mapper replaces 0.1.2's virtual source of the same name (an `Audio/Source/Virtual`, which the panel gives no level meter), keeping its gain, mute and selection. pacman restarts no user service, so a running mapper watches its own file: once an upgrade has replaced it and the transaction has ended, it runs the new file in place, within a few seconds, and that reconciles the live session. At session start the mapper subscribes to audio events before its first pass, so a DSP microphone that appears after it starts is mapped and made the default input at once. Provisioning and first run call setup; subsequent session starts only start the enabled unit, without reloading the user manager or repeating setup. The first desktop session does not depend on a bus existing during installation. Custom fragments, masks, activation links and headset or speaker policies are preserved; setup markers preserve explicit disables after initial setup. User gain state remains in `omarchy/asahi-mic-gain.json` under XDG_STATE_HOME. The desktop saves that state before restarting audio.

Expand Down Expand Up @@ -41,9 +41,9 @@ Vendor defaults use NetworkManager's `/usr/lib/NetworkManager/conf.d`, systemd's

## 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.
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: `/usr/lib/omarchy-mac/mpv-default-sync`, invoked both by `omarchy-mac-setup-system` and by `92-omarchy-mac-mpv-default.hook` after an `omarchy-mac` install or upgrade on a booted system, replaces a regular file byte-identical to an earlier released default (`0.1.0`–`0.2.2` without `gpu-sw=yes`, `0.2.3-1`, or `0.2.3-2`–`0.2.12` with `vo=gpu`) with the current default, and leaves an edited copy or a link alone. So edit `/etc/mpv/mpv.conf` rather than delete it to change the system default and opt out of default upgrades; each user's `~/.config/mpv/mpv.conf` is read after it and wins (`hwdec=no` decodes in software, `vo=gpu` restores the legacy OpenGL renderer).

The default decodes H.264, HEVC and VP9 on the Apple Video Decoder with copy-back (`hwdec=vaapi-copy`, `hwdec-codecs=h264,hevc,vp9`) and draws with the OpenGL renderer (`vo=gpu`, `gpu-api=opengl`). On an M2 Max, copy-back is bit-exact against software decoding, and 1080p playback falls from about 55% to 13% of a core. Zero-copy (`hwdec=vaapi`) is not used: Asahi's Vulkan driver reads the imported chroma plane from the wrong offset, so gpu-next shows green frames, and `libva-v4l2_request` invalidates the frames of a decoder it closes, which copy-back has already copied out. gpu-next also costs about three times the CPU of OpenGL to upload copied frames. `libva-v4l2_request-avd` and `avd-fw` provide the decoder; without them mpv falls back to software.
The default decodes H.264, HEVC and VP9 on the Apple Video Decoder with copy-back (`hwdec=vaapi-copy`, `hwdec-codecs=h264,hevc,vp9`) and draws with libplacebo over OpenGL (`vo=gpu-next`, `gpu-api=opengl`, `target-colorspace-hint=yes`, `target-colorspace-hint-mode=source`). On an M2 Max, copy-back is bit-exact against software decoding, and 1080p playback falls from about 55% to 13% of a core. Zero-copy (`hwdec=vaapi`) is not used: Asahi's Vulkan driver reads the imported chroma plane from the wrong offset, so Vulkan zero-copy shows green frames, and `libva-v4l2_request` invalidates the frames of a decoder it closes, which copy-back has already copied out. Earlier M2 measurements saw `gpu-next` take about three times the CPU of `vo=gpu` on Vulkan, but over OpenGL the cost matches `vo=gpu`: on a 16" M4 Pro (J616s, mpv 0.42.0, fullscreen 3456×2234, median of 3×30 s runs, mpv CPU as % of one core), `vo=gpu` vs `vo=gpu-next` over OpenGL measured 1.9% vs 2.2% on H.264 1080p30 (VA-API), 7.2% vs 6.9% on H.264 2160p60 (VA-API), 19.5% vs 17.2% on HEVC 1080p60 (SW), 72.9% vs 69.0% on HEVC 2160p60 (SW), and 45.4% vs 43.5% on HEVC 2160p30 PQ (SW), with zero dropped frames in all runs and BT.2020/PQ Wayland surface tagging on the HDR clip. `libva-v4l2_request-avd` and `avd-fw` provide the decoder; without them mpv falls back to software.

On a Mac whose GPU has no driver yet, such as the M3 Max, the only OpenGL renderer is Mesa's software one: llvmpipe, or softpipe where Mesa is built without LLVM. mpv rejects a software renderer while probing, and mpv 0.41 then aborts with `vo_x11_init: Assertion '!vo->x11' failed`: its Wayland context does not clean up after a failed init, and the X11 context it tries next asserts on the leftover (fixed upstream in mpv-player/mpv@a58dd8ac41, not yet in a release). `gpu-sw=yes` lets mpv draw on llvmpipe or softpipe there instead. It changes nothing where the context mpv picks has a hardware renderer.

Expand Down
17 changes: 4 additions & 13 deletions omarchy-mac/bin/omarchy-mac-setup-system
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,10 @@ elif [[ -f $brcmfmac ]] && grep -Fxq -- "$quirk" "$brcmfmac"; then
echo "Removed the Intel Mac Broadcom quirk from $brcmfmac; it stops applying at the next reboot"
fi

# The earlier mpv default lacks gpu-sw, so mpv aborts where the GPU has no
# driver, and tmpfiles never replaces the copy it made. Only a regular file
# byte-identical to that copy takes the new default; edits and links stay.
mpv="$root/etc/mpv/mpv.conf"
released_mpv_sum=9e186dd88be483b3666795b805e780921adecd1051ae85986857c22152a2d818
if [[ -f $mpv && ! -L $mpv ]] && [[ $(sha256sum <"$mpv") == "$released_mpv_sum -" ]]; then
updated=$(mktemp "$root/etc/mpv/.mpv.conf.XXXXXX")
cp -- "$root/usr/share/omarchy-mac/mpv/mpv.conf" "$updated" || { rm -f -- "$updated"; exit 1; }
chown --reference="$mpv" "$updated"
chmod --reference="$mpv" "$updated"
mv -- "$updated" "$mpv"
echo "Updated $mpv to the current omarchy-mac default, which lets mpv draw in software where the GPU has no driver"
fi
# Earlier mpv defaults lack gpu-sw (0.1.0-0.2.2) or Wayland colorspace hints
# (0.2.3-0.2.12), and tmpfiles never replaces the copy it made.
# Delegate to mpv-default-sync so setup and the pacman hook share one list.
"$root/usr/lib/omarchy-mac/mpv-default-sync" "${root:-/}"

unit=omarchy-wifi-resume-fix.service
marker="$root/var/lib/omarchy-mac/wifi-configured"
Expand Down
Loading
Loading