Skip to content

Feature: route audio applet volume to MPRIS when Spotify Connect is active #1506

Description

@tomashaa

Cosmic-applets version:
Pop!_OS / COSMIC current (cosmic-applets from distro packages; also tested with a local rebuild of cosmic-applet-audio)

Specific applet that this is regarding (if applicable):
cosmic-applet-audio

Issue/Bug description:
When Spotify plays to a remote Spotify Connect device (e.g. a Marantz amplifier, Sonos, or similar), audio does not go through the local PipeWire sink. The header/master volume slider in the audio applet therefore has no effect on what the user is actually hearing. Volume must be changed inside Spotify instead.

This is expected given Connect architecture, but the desktop volume control can still drive the remote volume because Spotify exposes a working MPRIS Volume property for Connect playback.

Proposed behavior:
If the active MPRIS player is Spotify and playback is active, and Spotify has no local Pulse/PipeWire sink-input, treat volume UI as remote/media volume:

  • Audio applet sink slider sets org.mpris.MediaPlayer2.Player.Volume
  • Mute toggles media volume (0 / restore)
  • Scroll-wheel on the applet icon follows the same path
  • When Spotify plays locally (sink-input present), keep current PipeWire sink volume behavior

Steps to reproduce (current behavior):

  1. Play Spotify to a Connect device (Marantz amplifier, Sonos, or similar)
  2. Confirm there is no local Spotify sink-input (pactl list sink-inputs)
  3. Move the COSMIC audio applet master/sink slider
  4. Observe that the Connect device volume does not change
  5. Run playerctl -p spotify volume 0.4 and observe that Connect volume does change

Expected behavior:
While Connect playback is active, the audio applet volume control should affect the Connect device volume (via MPRIS), matching user expectation for a “system” volume control during media playback.

Other notes:

  • Verified on Pop!_OS / COSMIC with Spotify → Marantz amplifier (Connect): MPRIS volume works; local prototype of the heuristic above works for the applet slider.
  • This issue is intentionally scoped to cosmic-applet-audio. Keyboard volume keys are handled by cosmic-settings-daemon and would be a related follow-up there.
  • Open question for maintainers: is pactl-based “no local sink-input” detection acceptable, or should detection use a PipeWire/WirePlumber-native API from the existing audio stack?
  • Happy to open a PR after consensus on approach; local proof-of-concept exists on fork branch feature/mpris-connect-volume (tomashaa/cosmic-applets).

Proof commands:

playerctl -p spotify status
playerctl -p spotify volume
pactl list sink-inputs | rg -i spotify || echo "no local Spotify stream"
playerctl -p spotify volume 0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions