Repository navigation
Give speakersafetyd one owner and fix the audio and display checks - #567
Merged
Merged
Conversation
omarchy-mac-boot 20260925-3/-4 still enabled speakersafetyd from its image preset (80-omarchy-mac.preset, and 80-omarchy-apple.preset through the link) and from the first-boot hand-off, next to omarchy-mac's own preset. The boot package now enables only its own units and the display manager, so 80-omarchy-mac-audio.preset is the single owner. Images still get it enabled because the builder applies every 80-omarchy-mac*.preset, and upgrades keep the existing enable link: nothing on the upgrade path reapplies presets, and omarchy-mac's preset keeps it enabled if something does. The new package test builds image roots from both packages with real systemctl --root: a fresh image through the builder's presets, the real first-boot hand-off and the deferred audio step ends with one enable link, and an upgrade from the -3/-4 payload keeps it, with or without omarchy-mac's setup having run, through preset-all too. The boot suite checks its presets leave speakersafetyd disabled and that first boot enables only sddm.
The audio check looked for "unlocked" in speakersafetyd's journal, but snd-soc-macaudio logs "Speaker volumes unlocked" in the kernel log; it now reads that, through sudo -n when the user cannot read the system journal. The single-owner check counts only enable lines and also requires one enable link. brightnessctl goes through logind, which refuses a session without a seat, so over SSH the display check reruns itself in the user's service manager, which carries the desktop session. --read-only skips its brightness and keyboard steps.
grep exits 2 when one of its files is a glob that matched nothing, so the single-owner check failed on every Mac without /etc/systemd/system-preset. The owner test also covers a boot upgrade on a Mac whose omarchy-mac has no speakersafetyd preset yet (edge 0.1.0-5, or mx-mac without omarchy-mac): the link stays.
maralcbr
added a commit
to omacom/omarchy-pkgs
that referenced
this pull request
Sep 27, 2026
From omacom/omarchy-mac#567 the add-on enables speakersafetyd itself and its README says the recipe declares mkinitcpio and the protected speaker stack (asahi-audio, which pulls speakersafetyd, alsa-ucm-conf-asahi, rtkit, pipewire-alsa).
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 74. On image 2 the M2 Max had speakersafetyd preset three times: omarchy-mac's
80-omarchy-mac-audio.presetand omarchy-mac-boot's80-omarchy-mac.preset(plus80-omarchy-apple.preset, a link to it), and the boot package's first boot enabled it again. 20260925-4 (84352fd) still did.What changed
80-omarchy-mac*.preset, and its image check refuses an image without the enable link.test/manual/apple-audio-check.sh, from Own Apple speaker safety and fix the silent mic mapping in omarchy-mac #535's body). It now reads "Speaker volumes unlocked" from the kernel log, falling back tosudo -nwhen the user can't read the journal. It used to grep the speakersafetyd unit journal. The owner check counts onlyenablelines and also requires exactly one enable link.test/manual/apple-display-check.sh, from ticket 39). From a shell without a seat (SSH), it reruns itself viasystemd-run --user --wait --pipe, because logind refuses brightness writes from seatless sessions.--read-onlyskips the brightness and keyboard steps.Publish order (for the re-pin)
Edge
omarchy-mac0.1.0-5 is pinned to b4a79d8, before #535, so it ships no speakersafetyd preset. Re-pin and publish omarchy-mac at or past #535 before any omarchy-mac-boot pin that includes this change. Before that:systemctl preset-allwould drop the link. The upgrade itself keeps it (proof C below).Optional hardening at the re-pin: make omarchy-mac-boot depend on the owner (a provided name from omarchy-mac's post-#535 recipe). The boot package then can't be installed without the preset.
Tests
packages/omarchy-mac/test/speaker-owner-test.sh, with realsystemctl --rooton image roots staged from both packages:preset-all→ one linkpackages/omarchy-mac/test/all: passpackages/omarchy-mac/boot/test/all: pass./test/all: 335/336. The one failure ishermes-remove-test.sh, which is on the known-failures list.preset-all.preset-allthen disables it (hence the publish order above).--no-sound: the amps-unlocked check now passes. The owner check fails only because the -3 boot presets are still installed.--read-only: 0 failures, run over SSH, which exercises the rerun in the session. A probe showed the rerun lands in session 1 on seat0 and keeps the exit code.Second review: SAFE WITH FIXES. One high finding, fixed: the owner check failed when
/etc/systemd/system-presetis missing. One low finding, covered by a new test case: a boot upgrade on a Mac with no owner preset.