Repository navigation
Own Apple speaker safety and fix the silent mic mapping in omarchy-mac - #535
Merged
Merged
Conversation
omarchy-mac-setup-system is now the only enabler of speakersafetyd: it applies the package's 80-omarchy-mac-audio.preset once the daemon is installed, so /etc presets, masks and explicit disables win, and a live run restarts a daemon a start-limit left dead. The desktop audio leaf keeps installing the protected stack, now with alsa-ucm-conf-asahi (without it there is no speaker path), and hands enablement to the package. The package also ships mx-mac's WirePlumber no-suspend policy so the speaker amplifiers stay powered between streams instead of popping, and retires exact per-user copies mx-mac left behind.
systemctl --user reaches the session bus only through XDG_RUNTIME_DIR. A guided resume under sudo -i clears it while /run/user/UID/bus still exists, so the old fallback called systemctl --user and aborted setup. The wants link already activates the mapper at the next graphical session. Retargeted from #462 against quattro. Co-authored-by: Z23 <3616196+z23@users.noreply.github.com>
The mapper switched the default input to its stereo monitor once the ports and links existed, without checking that audio flowed. On a J314s that monitor carried only digital silence, so every default-source recorder got zeros (#505). A muted mapping sink, which the volume keys hit while WirePlumber briefly makes the new null sink the default output, has the same effect. Before selecting the monitor, or while it is the default, sample it briefly through parec: only a monitor with a non-zero sample becomes the default, and a silent default goes back to the DSP source. The mapping stays in place and the condition is logged. A muted monitor is the user's microphone mute, so it is never sampled or swapped for the unmuted DSP.
loudnorm declares 192 kHz output, so without -ar the finalize pass writes 96 kHz AAC and undoes wf-recorder's -R 48000. Playing that file switches the Asahi speaker PCM to 96 kHz, speakersafetyd panics on bad IV-sense data and the kernel locks the amps. Retargeted from #502 against quattro; drop it once omacom#11092 lands upstream. Co-authored-by: Issac Trotts <issac.trotts@gmail.com>
Muting the monitor while it is sampled silences it, and the mapper then moved the default input to the unmuted DSP. Re-read the monitor after sampling so that mute keeps the monitor selected.
While the monitor is the default source, the mute key mutes the mapping sink, not the monitor. The mapper read only the monitor, so the next event sampled the resulting silence and switched to the unmuted DSP. A mute on either side is now the user's microphone mute. The supervisor samples a default mapping once instead of on every audio event, which opened the microphone each time. Samples are read as floats, so a quiet monitor is not mistaken for digital silence, and a sample that could not be taken changes nothing instead of counting as silence.
The no-suspend policy matched every node on the Apple card's first two PCM devices, so a capture node there would never close after use. Match sinks only. The desktop audio leaf warns instead of aborting hardware setup when the omarchy-mac hand-off fails, like the rest of that leaf. Preset wording now says which /etc presets outrank the package's.
The once-per-mapping cache is keyed on PipeWire port IDs, which are reused. The mapper outlives an audio restart, so a rebuilt mapping could match a key sampled before it and skip sampling. Clear the cache whenever the mapper loads a new mapping module.
maralcbr
changed the base branch from
mac/13-hw-platform
to
quattro-upstream
September 25, 2026 09:53
# Conflicts: # packages/omarchy-mac/README.md # packages/omarchy-mac/bin/omarchy-mac-setup-user # packages/omarchy-mac/test/systemd-test.sh
maralcbr
added a commit
that referenced
this pull request
Sep 25, 2026
Brings in the password sync (#532), audio (#535), display (#533), Wi-Fi resume (#529) and battery charge limit (#525) work. omarchy-drive-password takes #532's version. It already carries what #503 added (no tracing, the new password over stdin), and it has no Apple branch. #503's drive-password-apple-test.sh asserted that the disk password never changes the login or root password, which ticket 19 replaced with a journaled LUKS-first sync for the system disk; drive-password-test.sh covers the shared behaviour, so the Apple copy goes.
This was referenced Sep 25, 2026
Closed
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket 37 (audio safety and microphone), stacked on #514 (
mac/13-hw-platform). Covers gap-audit rows A1–A3 and Q1, and retargets #462 and #502 fromquattro.What changed
80-omarchy-mac-audio.preset, andomarchy-mac-setup-systemapplies it once speakersafetyd is installed./etcpresets, masks and later explicit disables win. A live run restarts a daemon a start-limit left dead, which the desktop leaf used to do.install/hardware/apple/audio.shno longer enables anything: it installs the stack and callsomarchy-setup-mac --system.parecfirst.omarchy-mac-setup-userreaches the user bus only throughXDG_RUNTIME_DIR, so asudo -iresume no longer aborts.-ar 48000, so loudnorm no longer writes 96 kHz files that trip speakersafetyd. Drop it when Pin recording audio sample rate at 48 kHz omarchy#11092 lands.#478 (J456 iMac fallback) is left with its author: it is a draft awaiting hardware checks and would need a rebase onto
packages/omarchy-mac.Needed elsewhere
enable speakersafetyd.servicefrom80-omarchy-mac.presetand80-omarchy-apple.preset, and drop speakersafetyd from the first-boot hand-off (systemctl enable speakersafetyd.service sddm.service). Until then both packages enable it.apply_presetsmust also apply omarchy-mac's preset (or runpreset-all), and the bootstrap check's hand-off links must stop expecting speakersafetyd from the boot package.asahi-audio alsa-ucm-conf-asahi rtkit pipewire-alsatodepends. asahi-audio pulls speakersafetyd./etc/wireplumber/.../asahi-audio-no-suspend.confbelongs toomarchy-settings-dev, so the package swap removes it. Setup deliberately leaves/etcalone.Tests
packages/omarchy-mac/test/allpasses at every commit (Arch Linux ARM container). New coverage:/etcpreset and disable, checked with realsystemctl --rootsudo -ibus case (fails on the old code)parecprobe against a stub./test/all, non-root): 292 files. Only the base branch's 4 environment failures remain (config, hermes-remove, snapper, unowned-system-paths: sibling repos absent in the container).update-lock-testfailed once under load and passes alone. The affected files and./test/clipass again after the review fixes.test/shell.d/screenrecording-sample-rate-test.shruns a real ffmpeg finalize: 48000 Hz with the fix, 96000 Hz without.Hardware (not done here)
The M2 Max was inspected read-only (mx-mac stack): speakersafetyd enabled through the boot preset, and the no-suspend policy in
/etc(owned byomarchy-settings-dev) and~/.config. The mic mapper is not installed, and the default source iseffect_output.j416-mic. Speaker and mic acceptance on the converged image belongs to 25/51. Run this in the owner's session there.--no-soundskips the 3 s capture and the tone.audio-check.sh