Repository navigation
Wait for snd-soc-macaudio before starting speakersafetyd - #214
Merged
Merged
Conversation
Because 80-omarchy-mac-audio.preset enables speakersafetyd.service under multi-user.target, systemd starts speakersafetyd as soon as multi-user.target runs — often 2+ seconds before snd-soc-macaudio registers AppleJ* (even after sound.target is reached by DisplayPort/HDMI audio). On M2 Max (J416), speakersafetyd panicked twice with 'No such device (19)' on every boot before succeeding on retry #3, risking StartLimitBurst=10 leaving speakers muted. Ship a systemd drop-in (40-omarchy-mac-wait-for-macaudio.conf) and bounded ExecStartPre helper (/usr/lib/omarchy-mac/wait-for-macaudio), following the same pattern as sddm's wait-for-display, to wait up to 10 s for /sys/bus/platform/devices/sound/sound/cardN and its /dev/snd/controlCN node before starting speakersafetyd. On J700, 50-j700-guard.conf's ExecCondition still runs before ExecStartPre so speakerguardd machines skip it.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds a bounded wait before
Reviews (1) · Last reviewed commit: "Wait for snd-soc-macaudio before startin..." · Reviewed by Greptile |
This was referenced Nov 29, 2026
omarchy-pkgs-merge Bot
pushed a commit
to omacom/omarchy-pkgs
that referenced
this pull request
Nov 29, 2026
Pin omarchy-mac to 0.2.10-1 (commit 518550ca2d96449abbeac6e233e63db0655e01b3, tag omarchy-mac-v0.2.10), shipping omacom/omarchy-mac-pkgs#214 (bounded wait-for-macaudio ExecStartPre drop-in for speakersafetyd so it no longer panics twice at boot before snd-soc-macaudio probes). Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
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.
Problem
80-omarchy-mac-audio.presetenablesspeakersafetyd.serviceformulti-user.target, which starts the daemon beforesnd-soc-macaudiofinishes probing the built-in Apple Silicon sound card (evensound.targetis reached ~2.4 s earlier by DisplayPort/HDMI audio).On
m2-max(J416), every cold boot logged two Rust panics (hw:AppleJ416: Could not open sound card! No such device (19),status=101) before succeeding on restart attempt #3, riskingStartLimitBurst=10leaving the speakers muted on slower probes.Fix
Following the existing
sddm.service.d/10-omarchy-mac-wait-for-display.confpattern:omarchy-mac/vendor/systemd/system/speakersafetyd.service.d/40-omarchy-mac-wait-for-macaudio.confrunningExecStartPre=-/usr/lib/omarchy-mac/wait-for-macaudio.omarchy-mac/lib/wait-for-macaudio, which polls up to 10 s (every 50 ms) for/sys/bus/platform/devices/sound/sound/card[0-9]*and its matching/dev/snd/controlC<N>device, and always exits0on timeout or when no platform sound node is present sospeakersafetydis never blocked.50-j700-guard.conf'sExecConditionruns beforeExecStartPre, sospeakerguarddboards skip it.omarchy-mac/test/systemd-test.shverifying wait-while-absent, wait-while-control-missing, immediate return once ready, and immediate skip without a platform sound node.Evidence
Ran in Arch container (
omarchy-pkg-builder:latest-aarch64-edge):bash omarchy-mac/test/systemd-test.sh— all tests passbash test/integration/speaker-owner-test.sh— all tests pass