Skip to content

speakerguardd-v2, aurora-speaker-upgrade: add the speakerguardd 1.0 stack, opt-in - #2560

Open
joshuaswarren wants to merge 1 commit into
omacom:masterfrom
joshuaswarren:w7J/speakerguardd-v2
Open

joshuaswarren wants to merge 1 commit into
omacom:masterfrom
joshuaswarren:w7J/speakerguardd-v2

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the speakerguardd 1.0 stack (the "v2" line) as two new packages, packaged the way aurora-silicon does it in its Arch Linux ARM repository (packages/speakerguardd-v2 and packages/aurora-speaker-upgrade).

  • speakerguardd-v2 1.0.0alpha.1, pinned at aurora-silicon/speakerguardd dda9784b. It installs beside speakerguardd and speakersafetyd.
  • aurora-speaker-upgrade 0.1, pinned at the same commit. It moves a Mac to v2 when run, and --revert goes back.

Opt-in

Nothing depends on speakerguardd-v2, so a default install does not pull it. At each boot its fleet gate starts exactly one stack, and the 0.1 daemons stay in charge until aurora-speaker-upgrade switches the Mac. aurora-speaker-upgrade ships disabled. The existing 0.1 update for current installs is #2532.

Changes from the aurora-silicon recipes

  • Platform group omarchy-platform-apple-silicon instead of the aurora group.
  • pkgrel 1.
  • One stale comment in the speakerguardd-v2 recipe reworded.
  • .omarchy/package.json added to each package, as for speakerguardd.

The source tarball checksum matches Aurora's. The pin follows their release candidate 8 line. Their release candidate 9 (40ef1351, alarm-aurora#203) is still open. Moving to it later changes only _commit and the first checksum.

Tested

  • tests/pinned-sources.sh: pass, 154 git sources pinned.
  • tests/pkgname-unique.sh: pass. Package metadata validates for both new packages.
  • Native aarch64 build with bin/build --package <name> --arch aarch64 on a 14-inch M2 Max MacBook Pro running Linux. check() ran for both and passed with 0 failures: the speakerguardd-v2 cargo tests and its three Python session test suites, and the upgrade tool's 36 tests.
  • speakerguardd-v2-1.0.0alpha.1-1-aarch64.pkg.tar.zst, sha256 f8082cab51924fb556ecca1669c68a42ee000b258539002b70335cbaed195204.
  • aurora-speaker-upgrade-0.1-1-any.pkg.tar.zst, sha256 997b25cadee3d39a4f0fa3d038937a48c3af7537a7da61c3c323a6ba2bbb73f2.
  • The v2 package depends on aurora-audio>=4.1.aurora2-11. The aurora-audio in this repository (4.1.aurora3-3) satisfies it.

Not installed on a laptop yet.

Unvoiced; checked by hand.

…tack, opt-in

Packages speakerguardd v2 (1.0.0-alpha.1, commit dda9784b) the way Aurora's
Arch Linux ARM repository does it, and the aurora-speaker-upgrade tool that
switches a Mac to it.

- speakerguardd-v2 installs beside speakerguardd and speakersafetyd. Nothing
  depends on it, so a default install does not pull it. Its fleet gate keeps
  the 0.1 daemons in charge until aurora-speaker-upgrade switches the Mac.
- aurora-speaker-upgrade ships disabled and moves the Mac only when run;
  --revert goes back.
- Both recipes are copied from aurora-silicon/alarm-aurora packages/, with
  the platform group changed to omarchy-platform-apple-silicon and pkgrel
  reset to 1. The source tarball checksum matches Aurora's.
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] No confirmed blocking issue was found in the reviewed changes.

Summary

Adds two packages for opting into the speakerguardd 1.0 stack:

  • Apple Silicon Macs can switch to the v2 speaker-protection stack.
  • A separate tool switches one Mac to v2 and can restore the legacy setup.

No actionable defect was established. Review covered the supplied recipes, existing audio packages, and relevant references in the related repositories. The pinned upstream helper implementations were unavailable, so their runtime behavior was not independently verified. No builds or runtime tests were run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[speakerguardd-v2] --> B[Renamed services and helpers]
  A --> C[LV2 plugin and tuning compiler]
  D[aurora-speaker-upgrade] --> E[Explicit switch or revert]
  E --> F[Per-Mac stack selection]
  B --> F
Loading

Reviews (2) · Last reviewed commit: "speakerguardd-v2, aurora-speaker-upgrade..." · Reviewed by Greptile

@e-fu

e-fu commented Dec 3, 2026

Copy link
Copy Markdown

A note on the speakerguardd pin from the J614s (MacBook Pro 14" M4 Pro) side, before this merges:

  • dda9784b lacks speakerguardd#168 (bfec437, merged the day after). Before chore: sync AUR packages #168, v2 on a J614s could take the protection lease with all twelve V/I sense switches off. The silent self-check turned them on and then restored them to off, so playback ran without feedback. Omarchy has no speakersafetyd profile for J614, so v2 is the only protection that Mac can get, and this pin is not safe there. The RC9 candidate named in the description (40ef1351, 2026-11-10) predates chore: sync AUR packages #168 too.
  • Current main does not fit this PR either. From 4e690a85 (2026-11-28) on, v2 is the only speaker stack: legacy-gate.conf is gone, speakerguardd-gate legacy always answers no, and aurora-speaker-upgrade --revert/--purge only exit 1. With this PR's drop-ins, installing the package would skip speakersafetyd and speakerguardd 0.1 on every Mac, and there would be no way to revert.
  • Candidate pin: 5bd2d652 (tag aurora-nightly-20261128). It contains chore: sync AUR packages #168, the per-AID playback-row gate and the restore-image fixes. It is the last tagged commit that keeps the opt-in, legacy-gate and --revert model this PR is built around. Recipe changes:
    • both recipes: _commit moves to 5bd2d652; aurora-speaker-upgrade keeps sha256sums=('SKIP');
    • speakerguardd-v2:
      • pkgver becomes 1.0.0alpha.2;
      • the source tarball and README checksums are updated;
      • it adds speakerguardd#302 (test only) as a patch with its checksum, so check() passes on a build host with a bound speaker card;
      • check() also runs packaging/session/test_session.py.
  • PipeWire. Aurora's speakerguardd-v2 depends on pipewire-speaker-graph>=2. That is their PipeWire build with patches 1006, 1007, 1008 and 1010: the volume is applied once on the voicing control after repeated volume or mute updates, and a start the kernel refused is recovered. Omarchy ships stock PipeWire.
    • Question for the speakerguardd maintainers: is stock PipeWire supported for silent testing (--check, the switch, a muted stream)?
    • And what is required before audible testing: those patches, or something else?
  • Kernel side for J614s: an AOP crash on speaker stream stop makes the self-check refuse the Mac until reboot. The fix is ASoC: apple: aop-spkr: stop the speaker TX DMA only after pw1 aurora-silicon/linux#3619 (+ Sync upstream (six-hourly): omarchy-ane 0.5.12-1 #2800). Both merged after the current linux-aurora intake, and a carry request for omacom/linux-aurora is being prepared.

A branch with the re-pin on top of this PR:

https://github.com/e-fu/omarchy-pkgs/tree/speakerguardd-v2-j614s-pin (commit 3d79c4db)

Both packages build and their test suites pass on a J614s. This combination is not yet hardware-validated on Omarchy (this kernel, this package pair, stock PipeWire): no --check, switch or playback has been run. If this PR lands first, I can send the re-pin as a follow-up and bump aurora-speaker-upgrade's pkgrel too.

@e-fu

e-fu commented Dec 3, 2026

Copy link
Copy Markdown

The hardware row that was missing from my earlier comment. J614s (MacBook Pro 14" M4 Pro), Omarchy edge, muted only: sink volume 0, muted, digital silence.

Setup: speakerguardd-v2 1.0.0alpha.2-1 and aurora-speaker-upgrade 0.1-1 built from the re-pin branch (both recipes pin speakerguardd 5bd2d652), aurora-audio with the raw-sink gate from #4520, wireplumber 0.5.19, and a locally built linux-aurora with the carries from omacom/linux-aurora#563 (#2800, #3619).

With stock pipewire 1:1.6.12-1:

With the same PipeWire plus Aurora's patches 1006, 1007, 1008 and 1010 (1:1.6.12-1.1, pipewire-audio provides pipewire-speaker-graph=2):

  • --check, the switch and one muted stream passed as before.
  • The same suspend: no snd_pcm_start error lines, one refused start, grant about 1.1 s after wake.

My test harness stops the player when the daemon logs sense binding withdrawn at wake, so neither run shows whether the stream itself continues after the suspend.

For this PR: the stack installs, switches and reverts on stock PipeWire. Aurora's speakerguardd-v2 recipe requires pipewire-speaker-graph>=2; this PR and my re-pin (3d79c4db) depend on plain pipewire. I have a recipe that carries the four patches on aarch64 and provides that name (Arch Linux ARM's 1:1.6.12-1 recipe, check() 72 of 72, tested as above), but it would mean this repo owns PipeWire on aarch64: 20 split packages shadowing [extra], tested on one Mac. Do you want that as a PR, or is there another plan for the PipeWire side before speakers go audible?

No audible playback at any point.

@e-fu

e-fu commented Dec 3, 2026

Copy link
Copy Markdown

Addendum to the row above: first audible playback on the J614s (AID34). Packages, pin and patched PipeWire as in that comment; the kernel also carries aurora-silicon/linux#2371.

Seen in the terminal and in the volume controls:

  • sudo aurora-speaker-upgrade run completed with verify: pass and done: speakerguardd v2 owns the speakers (AID34, macOS 26B123, ...). It first prints the restore-image line and then nothing for close to a minute while it fetches from Apple.
  • The sgv2.voicing.j614 sink came up muted at volume 0. I set it to 0.20, unmuted it and made it the default sink.

By ear: ordinary desktop playback, slider from 5 % to 100 %: clean on both channels, no crackle, no dropouts, no level jumps.

Journal:

  • The two stream starts after the supervisor was up were granted by the daemon and the kernel about 13 ms after the session helper reported playback.
  • The two stops in the window each show the daemon's nothing plays: protection released and the kernel's withdrawn: released by the owner.
  • The filtered journal shows no AOP crash, amp fault, lease lapse, snd_pcm error or xrun.

Measured run (engine telemetry): −18 dBFS RMS pink noise into sgv2.voicing.j614, slider 0.3 / 0.6 / 1.0 for 60 / 60 / 300 s in one continuous stream. Telemetry read from /run/speakerguardd/<uid>/engine with crates/sgv2-lv2/examples/engine-watch.rs built from the pin.

ch0–3 ch4–5
TemperatureLimit in the compiled tuning 130 °C 140 °C
Open-loop coil estimate (tol), max 124.95 °C 89.99 °C
Closed-loop coil estimate (tcl, fresh), max 122.94 °C 78.37 °C
Gain, min −0.07 dB 0 dB

Maxima and minima are over all 39482 complete CSV records.

  • lost=0, gaps=0, stale_polls=0, health_or=0x0, tadj 0 throughout.
  • tol on ch0–3 at 60 / 120 / 420 s (end of each step): 52.3 / 68.1 / 122.0 °C. The temperature was still rising slowly when the 300 s ended, so this is not a steady-state figure.
  • Journal for the run: one grant at stream start and the supervisor's wake line (first 1367 frames, 28.5 ms, held until the amps played; 0 frames over capacity), then nothing from the supervisor or the speaker driver during the hold.

Limits of this row: no microphone capture, no kill -9 of the supervisor mid-hold, one run at one room temperature (not recorded). At the tested pin (5bd2d652), packaging/session/gate.json has no playback rows for AID34 and the README says "1.0.0-alpha. Not for use yet". I didn't test short notification sounds. I left v2 enabled after the test and haven't checked it after a reboot. The per-second log and the CSV are available if useful.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants