Skip to content

Resolve the audio volume sink on Pipewire changes instead of every 15 seconds - #15033

Merged
dhh merged 3 commits into
quattrofrom
audio-sink-no-poll
Oct 12, 2026
Merged

dhh merged 3 commits into
quattrofrom
audio-sink-no-poll

Conversation

@dhh

@dhh dhh commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

The audio panel ran omarchy-audio-output-sink (bash plus several pactl calls) every 15 seconds on every monitor, whether or not the panel was open. The timer was a safety net in case a speaker tuning or EasyEffects was applied or removed underneath the selected output.

Those changes show up in Pipewire's graph, so the sink is now re-resolved when the default sink changes (as before), and when nodes or link groups come and go. A short debounce means a burst of changes resolves once, and a change during a resolve runs it again afterwards. A hardware output (alsa_output.*) is its own volume sink, which the script reports without looking further, so that common case no longer spawns anything.

Verified on a running desktop with a hardware default sink: the script runs once at startup, before Pipewire reports the sink, and not at all over the next 20 seconds. Before, it ran every 15 seconds per monitor. audio-test.sh gains behavior tests for the hardware shortcut, the script path and the rerun.

🤖 Generated with Claude Code

… seconds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed.

Summary

The PR replaces repeated volume-sink checks with debounced PipeWire changes and adds a hardware shortcut.

  • The audio panel checks its volume sink when audio routing changes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Selected output changes] --> D[Resolve volume sink]
  B[PipeWire graph or EasyEffects settings change] --> C[Wait 500 ms]
  C --> D
  D --> E{Hardware output?}
  E -->|Yes| F[Use hardware directly]
  E -->|No| G{Script already running?}
  G -->|Yes| H[Schedule rerun after exit]
  G -->|No| I[Start script with current generation]
  I --> J{Generation still matches?}
  J -->|Yes| K[Use script result]
  J -->|No| L[Ignore older result]
  H --> D
Loading

Reviews (2) · Last reviewed commit: "Test the audio volume sink rerun through..." · Reviewed by Greptile

Comment thread shell/plugins/panels/audio/Panel.qml Resolved
Comment thread test/shell.d/audio-test.sh Resolved
dhh and others added 2 commits October 11, 2026 16:10
…ects settings changes

Addresses Codex review: a script read still running could overwrite the hardware fast path's answer, and an idle EasyEffects resolves through its settings file, which changes without a graph event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Addresses Greptile review: the rerun test only checked the stale flag, so removing the rerun would still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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