Audio volume/state of all Flatpak apps linked

Please let me know if this question is better asked in a more specific forum. Given that it occurs on vanilla Fedora 41 using the pre-installed systems, it seems relevant for this forum.

Setup: Fedora 41, KDE, NVidia GPU, Flatpak for apps

When playing something in the Flatpak Spotify app and changing the audio volume of the app (by hovering over it in the task manager), the volume of completely unrelated apps is changed as well (all Flatpak apps; Signal, Vivaldi, … in this case). Additionally, both Spotify and all other Flatpak apps simultaneously show the audio playing icon in the task manager, even though the other apps should not be playing anything.
This leads me to believe that this is related to the stream grouping in pipewire/wireplumber. So far, I have tried creating a custom wireplumber config and updating various properties of the Spotify node. However, none of those actually worked.
Additionally, the audio volume of Spotify resets to 100% after every reboot. I suspect that this might also be because of weird audio stream grouping.

Any help is greatly appreciated.

1 Like

Maybe it would be a good idea to file a bug: Using Bugzilla :: Fedora Docs

You could also try switching to pulseaudio instead of pipewire, this way you could confirm if the issue is in pipewire and/or KDE Plasma.

So you are using KDE?

Normally when scrolling over an app it switches between them.

If you mean that little slider that appears on audio playing apps, that should be per-app?

If I understand correctly he’s saying that you change the volume on one app an many other app change with it.

Are all these electron or chromium based flatpaks?

You could try looking at the files under
~./local/state/wireplumber/

To see if there are separate entries for the applications.

You could also clear those files out and see if it changes anything.

Thanks for the ideas. It looks like it is related to chromium/electron. I found this open issue on electron regarding PulseAudio: https://github.com/electron/electron/issues/27581.
The behavior is pretty weird though. When only Spotify is playing audio, then the audio state (volume/mute) is “linked” with apps like Signal. This means that muting Signal, will also mute Spotify. However, once audio is played in Signal, it will create a playback stream (can be seen in Settings->Sound) and stop being linked to Spotify. Now, they have the expected behavior where they have two different volume levels. Once the audio playback in Signal is stopped, after a few seconds, the playback stream is closed, and it starts being linked to Spotify again.
It looks like updating the node.name property through a custom wireplumber rule for both applications does not help.

I was able to at least make it so that each application has its own stored audio level in ~/.local/state/wireplumber/stream-properties.
For this, I created a ~/.config/pipewire/pipewire-pulse.conf from /usr/share/pipewire-pulse.conf and added entries like the following to the pulse.rules array:

{
    matches = [
        { application.process.binary = "signal-desktop" }
    ]
    actions = {
        update-props = {
            application.name = "signal"
            node.name = "signal"
        }
    }
}

This setup works for Signal/Vivaldi, where without it, they would share the same audio state, and with it, they do not anymore (they work as one would expect). However, Spotify is still an odd one, because Signal does not link with Spotify (playing audio in Signal does not show Spotify as playing audio as well), but the opposite is true: playing audio in Spotify while Signal is NOT playing audio, shows Signal as if it was playing audio as well.
This could be related to Spotify not being an electron app (CEF instead) and therefore not playing nicely with the other apps. Given that this is already an improvement and that it might be an issue with the apps themselves, I will mark this as answered.

1 Like