Skip to content

Switch speakers to speakerguardd v2 for users - #195

Merged
RyanTheTide merged 16 commits into
mainfrom
sgship/v2-switch-on
Nov 19, 2026
Merged

RyanTheTide merged 16 commits into
mainfrom
sgship/v2-switch-on

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem

speakerguardd v2 has been installable by hand since release candidate 9, but no default package pulls it in, so every Arch Linux ARM install still runs the legacy protection (speakersafetyd + speakerguardd 0.1).

Change

At the next boot after pacman -Syu, each Mac collects its own tuning, compiles it, runs the silent self-check and switches the kernel's speaker interface only on a pass. A refused Mac keeps speakersafetyd and is not retried until the kernel, speakerguardd or the tool changes. sudo aurora-speaker-upgrade --revert goes back. speakersafetyd and speakerguardd 0.1 stay installed.

Testing

  • python3 -m unittest discover -s tests: 497 OK. tests/test_pins.py now asserts that aurora-audio pulls v2 and the upgrade tool, that no other package pulls v2, that the legacy daemons stay, that the preset enables the unit, and that the install script applies it.
  • The dafc5088 archive sha256 (324338cd…c322) was computed from codeload. alpm_vercmp puts 1.0.0alpha.2-1 above 1.0.0alpha.1-43 and the retired builds. bash -n on both PKGBUILDs, sh -n on the install script.

Still to run

makepkg builds of speakerguardd-v2, aurora-speaker-upgrade and aurora-audio in CI, then packaged rows on the lab Macs with no playback: revert to legacy, upgrade, start aurora-speaker-upgrade.service (the boot path), then check status, the self-check verify and amp faults, then restore. Twins: fedora-aurora#239, nixos-aurora#199.

Details
  • History: this branch carried RC8 through RC9 while v2 was a preview. RC9 itself is on main (speakerguardd bbd9ed30), so after merging main the diff is only the switch-on and the pin move.
  • The unit is Type=oneshot, SuccessExitStatus=1 2 (1 = refused, 2 = cannot run yet), TimeoutStartSec=900, WantedBy=multi-user.target. A Mac already on v2 with its bundle does nothing.
  • The preset is applied with systemctl --preset-mode=enable-only, so a unit the user already disabled stays disabled. Removing the package disables the unit.

Hardware rows

The same upstream (speakerguardd 1.0.0-alpha.2) switch-on path passed on four lab Macs (M1 Pro, M4 Pro, Neo, M2) with the Fedora packages: each Mac started from legacy with an empty store, and the boot unit switched it to v2 with the self-check passing, 0 amp faults and 0 AVC; see aurora-silicon/fedora-aurora#239. This PR's own packaging is covered by its CI build and tests.

Assisted-by: LLM (Claude:Opus 5.5)

aurora-audio depends on speakerguardd-v2 (RC8 or later) and
aurora-speaker-upgrade beside speakersafetyd and speakerguardd 0.1, and
aurora-speaker-upgrade 0.1-0.2 enables its unit by a shipped preset, applied
on install and once on the upgrade from the disabled preview (as
asahi-scripts does for its units). At the next boot each Mac collects its
own tuning, self-checks it silently and switches only on a pass; a refused
Mac keeps speakersafetyd and is not retried until the kernel or
speakerguardd changes (speakerguardd#125). Twin of fedora-aurora#239.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
@RyanTheTide RyanTheTide added the needs Ryan+DJ go Changes what users can get; waits for Ryan and DJ label Nov 9, 2026
# Conflicts:
#	packages/aurora-audio/PKGBUILD
#	packages/aurora-speaker-upgrade/PKGBUILD
…C8.2

The switch-on now requires speakerguardd-v2 RC8.2 or later (same-boot
switch grants, #134) and the matching aurora-speaker-upgrade.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
@RyanTheTide RyanTheTide changed the title Switch speakers to speakerguardd v2 for users (needs Ryan + DJ go) Switch speakers to speakerguardd v2 for users (held: v2 not prod-ready) Nov 9, 2026
@RyanTheTide RyanTheTide added on hold waits for the upgrade preview warning, or for v2 parity and the four-Mac E2E and removed needs Ryan+DJ go Changes what users can get; waits for Ryan and DJ labels Nov 9, 2026
The switch-on now requires speakerguardd-v2 RC8.4 (speakerguardd ff88f9f9)
and aurora-speaker-upgrade 0.1-0.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide RyanTheTide changed the title Switch speakers to speakerguardd v2 for users (held: v2 not prod-ready) Switch speakers to speakerguardd v2 for users Nov 9, 2026
RyanTheTide and others added 11 commits November 9, 2026 23:51
Move both packages to speakerguardd v2 49b1c107 (speakerguardd#144):
aurora-speaker-upgrade switches without the preview confirmation, and
the boot unit no longer needs --i-understand-preview (still accepted,
no effect). The package descriptions drop the preview notice and
docs/speakerguardd-v2-preview.md becomes docs/speakerguardd-v2.md.

Both packages stay opt-in; nothing here enables the upgrade unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aurora-speaker-upgrade with the preset becomes 0.1-0.8 and the platform
requires speakerguardd-v2 release candidate 9 and that build, so the
boot unit the preset enables switches without a confirmation flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release candidate 9 now builds on 8.5: speakerguardd v2 beb1b6b9
(#144 on top of #145, #146 and #147), numbered past 8.5
(speakerguardd-v2 0.39 / pkgrel 32, aurora-speaker-upgrade 0.8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Numbered past release candidate 8.5: aurora-speaker-upgrade with the
preset is 0.1-0.9 and the platform requires speakerguardd-v2 release
candidate 9 (0.39, alarm 32) and that build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release candidate 9 now builds on 8.6: speakerguardd v2 40ef1351 (#144
on top of #145-#148, #151 and #152), numbered past 8.6
(speakerguardd-v2 0.40 / pkgrel 33, aurora-speaker-upgrade 0.9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Numbered past release candidate 8.6: aurora-speaker-upgrade with the
preset is 0.1-0.10 and the platform requires speakerguardd-v2 release
candidate 9 (0.40, alarm 33) and that build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
aurora-audio 4.1.aurora2-17 depends on speakerguardd-v2 >= 1.0.0alpha.1-43
and aurora-speaker-upgrade >= 0.1-0.17 beside speakersafetyd and
speakerguardd 0.1, which stay installed as the fallback.

aurora-speaker-upgrade 0.1-0.17 ships 90-aurora-speaker-upgrade.preset,
which enables aurora-speaker-upgrade.service; its install script applies
the preset on install and once on the upgrade from a disabled build. At
the next boot each Mac switches only when its own tuning passes the
silent self-check; a refused Mac keeps speakersafetyd.

Both v2 packages move to speakerguardd v2 d2457cf2 (speakerguardd#171,
#176, #179, #187, #194). tests/test_pins.py asserts the new defaults and
that the legacy stack stays.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Adds speakerguardd#199: the J815 graph is regenerated with the #176
hold sink, so it matches what the session helper links.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Pin speakerguardd main dafc5088 (tag v1.0.0-alpha.2), the first release
from main now that v2 is speakerguardd's main line; same tree as v2
86fbf429. speakerguardd-v2 1.0.0alpha.2-1 (pkgrel resets with the new
pkgver), aurora-speaker-upgrade 0.1-0.18; aurora-audio depends on both.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide marked this pull request as ready for review November 19, 2026 23:41
@RyanTheTide
RyanTheTide merged commit b8da5c9 into main Nov 19, 2026
6 checks passed
@RyanTheTide
RyanTheTide deleted the sgship/v2-switch-on branch November 19, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold waits for the upgrade preview warning, or for v2 parity and the four-Mac E2E

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant