Skip to content

fix(audio): route bar wheel and panel slider volume through omarchy-audio-output-volume - #14683

Open
anmolsharma152 wants to merge 1 commit into
omacom:quattrofrom
anmolsharma152:fix/audio-wheel-bluetooth-volume
Open

anmolsharma152 wants to merge 1 commit into
omacom:quattrofrom
anmolsharma152:fix/audio-wheel-bluetooth-volume

Conversation

@anmolsharma152

@anmolsharma152 anmolsharma152 commented Oct 9, 2026 •

Copy link
Copy Markdown

Problem

When adjusting output volume using the scroll wheel on the top bar's audio widget or dragging the panel slider, volume does not actually decrease or increase on Bluetooth devices (e.g. A2DP sinks) or sinks requiring route-level control, even though the slider moves and the OSD displays changes. Media keys, on the other hand, work as expected.

Root Cause

  • Hyprland media keys run omarchy-audio-output-volume, which uses pactl set-sink-volume and interacts directly with pipewire-pulse to properly update hardware and Bluetooth sinks.
  • In shell/plugins/panels/audio/Panel.qml, the bar wheel handler and panel slider previously relied on Quickshell's internal PipeWire QML property binding (volumeSink.audio.volume = volume). Quickshell sets node-level parameters (pw_node), which Bluetooth nodes ignore because their volume is managed on device routes. As a result, Quickshell's internal state updated, but the physical sink volume in PipeWire remained unchanged.

Solution

  1. Extended bin/omarchy-audio-output-volume to support:
    • --no-osd flag to allow silent programmatic updates (e.g., when dragging the panel slider).
    • Setting absolute volumes directly (N% / N).
  2. Updated shell/plugins/panels/audio/Panel.qml:
    • Scrolling the mouse/touchpad wheel on the bar icon routes through omarchy-audio-output-volume [+-]step, matching media key behavior and reliably updating Bluetooth sinks.
    • setOutputVolume() syncs the volume downstream using omarchy-audio-output-volume --no-osd <N>%.

Verification

  • Tested wheel volume adjustments with active Bluetooth audio stream; loudness increases/decreases in sync with the bar icon and OSD.
  • Verified unit test suite test/shell.d/audio-test.sh passes.

Fixes #12707
Relates to #13004

@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from e2d5427 to 605a967 Compare October 9, 2026 04:50
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Routes bar-wheel and panel-slider volume changes through omarchy-audio-output-volume so Bluetooth outputs receive pactl updates.

  • Adds absolute percentages, explicit sink selection, optional OSD suppression, and mute preservation.
  • Keeps the latest requested volume while a command runs and clears saved values after work finishes.
  • Adds command-level tests for the new arguments.
  • No new actionable issues were found. Tests and the live UI were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Wheel or slider] --> B[Save latest volume and sink]
  B --> C[Send when command and timer allow]
  C --> D[omarchy-audio-output-volume]
  D --> E[pactl sets sink volume]
  E --> F[Process finishes]
  F --> G[Send queued value or clear saved state]
Loading

Reviews (8) · Last reviewed commit: "fix(audio): route bar wheel and panel sl..." · Reviewed by Greptile

Comment thread bin/omarchy-audio-output-volume Resolved
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
Comment thread bin/omarchy-audio-output-volume Resolved
@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from 605a967 to a448a7a Compare October 9, 2026 05:43
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from a448a7a to ac0a56b Compare October 9, 2026 05:58
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
Comment thread bin/omarchy-audio-output-volume Resolved
@jandrusk

Copy link
Copy Markdown

Thanks for digging into the Bluetooth case. A few pointers so this doesn't get split across PRs:

@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from 20e8449 to 70eeee9 Compare October 12, 2026 19:36
@anmolsharma152

Copy link
Copy Markdown
Author

Thanks for the pointers and review @jandrusk!

  1. Rebase on Resolve the audio volume sink on Pipewire changes instead of every 15 seconds #15033: Rebased cleanly on top of upstream/quattro. The volume queue reset is now integrated alongside @dhh's new generational resolver (volumeSinkGeneration) and PipeWire graph listeners.
  2. Double Write & Process Spawning (Holding a volume key loses most steps: overlapping omarchy-audio-output-volume runs race #14833): Addressed. setOutputVolume() now treats volumeSink.audio.volume strictly as an optimistic UI update, and uses a 100ms debounce timer (volumeDebounceTimer) matching the pattern in monitor/Panel.qml. Rapid mouse-wheel flicks or continuous slider drags now coalesce into a single background dispatch once the interaction settles, avoiding overlapping subshells.
  3. Linking omarchy.audio bar slider/scroll doesn't change volume on Bluetooth (device-routed) sink — mute works #12707 & fix(audio): set Bluetooth sink volume via pactl (#12886) #13004: Linked omarchy.audio bar slider/scroll doesn't change volume on Bluetooth (device-routed) sink — mute works #12707 in the PR description. While fix(audio): set Bluetooth sink volume via pactl (#12886) #13004 covers the panel slider, this PR also brings mouse-wheel volume adjustment on the top bar into parity with the keyboard media keys, which fix(audio): set Bluetooth sink volume via pactl (#12886) #13004 does not address.

The branch has been updated and pushed!

Comment thread shell/plugins/panels/audio/Panel.qml Resolved
@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from 70eeee9 to 9dda73e Compare October 12, 2026 21:05
Comment thread shell/plugins/panels/audio/Panel.qml Resolved
@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from 9dda73e to 7ab988a Compare October 12, 2026 21:15
@omarchybot

Copy link
Copy Markdown
Collaborator

Looked at this today, but didn't get past classifying it. I read it as a bug fix: bar-wheel and panel-slider volume changes that don't reach Bluetooth sinks. Every item here gets classified by two models separately, and the second one (Codex Medium) couldn't run because omabot has used up its daily review budget. So the classification isn't settled yet, and I haven't added labels, run the change on a test machine or reviewed the diff line by line.

Nothing is needed from you right now. This comes back round for a full review once a second opinion is available.

@chessing234

Copy link
Copy Markdown
Contributor

your commit is in #21020. the bar wheel goes through omarchy-audio-output-volume. absolute N and N% set the level, and --no-osd, --preserve-mute, and --sink stayed. --no-osd is a separate flag from the function that draws the OSD, which had the same name and replaced it. relative steps still accumulate. @dhh @omarchybot if 21020 lands, this can close as superseded.

@anmolsharma152
anmolsharma152 force-pushed the fix/audio-wheel-bluetooth-volume branch from 7ab988a to c0e2a55 Compare December 2, 2026 13:11
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — maintainer to decide whether the Bluetooth volume fallback is still needed on quattro.

Codex High classified the diff as a compatibility fix for #12707. DeepSeek V4.1 Flash classified it as an enhancement. The diff also adds absolute volume and sink selection to the CLI, and Quickshell 0.3.2 fixes the reported failure to write route volume when a device reports no volume step. The classification is unsettled, so verification stopped before worker tests. Quickshell fix · Omarchy packaging

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.

omarchy.audio bar slider/scroll doesn't change volume on Bluetooth (device-routed) sink — mute works

4 participants