Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Linux desktop client creates a lot of sinks

Linux desktop client creates a lot of sinks

Plan

Premium

Country

Germany

Device & Operating System

 

$ flatpak list | grep -i spot
Spotify com.spotify.Client      1.2.11.916.geb595a67    stable  system

 

 

**bleep**+`                   ---------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Host: Z590M-ITX/ax 
               `+oooooo:                 Kernel: 6.4.12-arch1-1 
               -+oooooo+:                Uptime: 2 hours, 48 mins 
             `/:-:++oooo+:               Packages: 1065 (pacman), 30 (flatpak) 
            `/++++/+++++++:              Shell: zsh 5.9 
           `/++++++++++++++:             Resolution: 1920x1080, 2560x1440 
          `/+++ooooooooooooo/`           DE: Plasma 5.27.7 
         ./ooosssso++osssssso+`          WM: KWin 
        .oossssso-````/ossssss+`         Theme: [Plasma], Breeze [GTK2/3] 
       -osssssso.      :ssssssso.        Icons: [Plasma], breeze-dark [GTK2/3] 
      :osssssss/        osssso+++.       Terminal: konsole 
     /ossssssss/        +ssssooo/-       Terminal Font: Hack 13 
   `/ossssso+/:-        -:/+osssso+-     CPU: 11th Gen Intel i9-11900K (16) @ 5.100GHz 
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA GeForce RTX 3070 Ti 
 `++:.                           `-/+/   GPU: Intel RocketLake-S GT1 [UHD Graphics 750] 
 .`                                 `/   Memory: 5262MiB / 31915MiB

 

 

 

 

 

My Question or Issue

 

The Spotify desktop clients spawns a lot of orphaned audio sinks, which are not garbage collected. I haven't paid strong attention, but I think a new sink is created with every track played.

 

 

 

 

$ pw-cli ls Node | grep -B5 "spotify"
        id 76, type PipeWire:Interface:Node/3
                object.serial = "1386"
                factory.id = "6"
                client.id = "139"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 86, type PipeWire:Interface:Node/3
                object.serial = "1401"
                factory.id = "6"
                client.id = "138"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 117, type PipeWire:Interface:Node/3
                object.serial = "1712"
                factory.id = "6"
                client.id = "115"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 118, type PipeWire:Interface:Node/3
                object.serial = "1416"
                factory.id = "6"
                client.id = "120"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 140, type PipeWire:Interface:Node/3
                object.serial = "1747"
                factory.id = "6"
                client.id = "197"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 152, type PipeWire:Interface:Node/3
                object.serial = "1573"
                factory.id = "6"
                client.id = "206"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 155, type PipeWire:Interface:Node/3
                object.serial = "1537"
                factory.id = "6"
                client.id = "193"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 156, type PipeWire:Interface:Node/3
                object.serial = "1554"
                factory.id = "6"
                client.id = "71"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 158, type PipeWire:Interface:Node/3
                object.serial = "1631"
                factory.id = "6"
                client.id = "161"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 167, type PipeWire:Interface:Node/3
                object.serial = "1522"
                factory.id = "6"
                client.id = "180"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 168, type PipeWire:Interface:Node/3
                object.serial = "1588"
                factory.id = "6"
                client.id = "198"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 189, type PipeWire:Interface:Node/3
                object.serial = "1263"
                factory.id = "6"
                client.id = "190"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"
--
        id 209, type PipeWire:Interface:Node/3
                object.serial = "1371"
                factory.id = "6"
                client.id = "207"
                client.api = "pipewire-pulse"
                application.name = "spotify"
                node.name = "spotify"

 

 

 

2023-09-05_19-33.png
Reply
11 Replies

I'm seeing the same thing! I'm using the Spotify as a flatpak from Flathub (app/com.spotify.Client/x86_64/stable) in Fedora 39 (GNOME). I'm using the *free* edition of Spotify, and for me, it only spawns a new node whenever a round of ads starts playing. If you're running the premium version of Spotify, and it's happening between *every* song for you, could it be the DRM checks that are the root cause of the issue?

In the example shown below (from qpwgraph), the newest node (i.e., spotify-5 [Spotify]) is the only one that actually plays anything; the rest have basically been orphaned off and are no longer producing sound.

Spotify_PipeWire.png

Hey, Flatpak is not developed by Spotify. This is someone else's package

We only release it for Snap and Deb at the moment. Do you have the same issue there?

I don't use Snap, so I can't tell.

I'm on Fedora, which doesn't use DEB packages. I reported the issue to the Flatpak folks, but they insisted I report this upstream, as it has nothing to do with Flatpak. I will install Snap on my system and start testing for the issue there, but could you please look into this for the DEB?

To test for this, run Spotify for a while--at least long enough for a couple rounds of ads--and then run the `qpwgraph` utility.

I have been running a Spotify client (version 1.2.26 - DEB package) for 9h now. During this time I played several tracks and podcasts, and switched between desktop and mobile playing (via Spotify Connect). The output of qpwgraph is attached. As you can see, there's nothing strange. I might try to reproduce it later with ads, if you think this is case.

But one possibility is that the Flatpak version is outdated. Can you ask the package responsible to create a new one, based on the latest stable client (currently 1.2.26)?

pipewire_spotify.png

I installed the Snap version of Spotify, and I'm also showing that everything is looking as it should.

For the record, it looks like the Flatpak is running version 1.2.26.1187--the same version used in the "latest/stable" channel from "snapcraft.io":

flatpak run com.spotify.Client --version
/app/extra/bin/spotify: /usr/lib/x86_64-linux-gnu/libcurl.so.4: no version information available (required by /app/extra/bin/spotify)
[spotifywm] attached to spotify
Spotify version 1.2.26.1187.g36b715a1, Copyright (c) 2023, Spotify Ltd

 

I don't want to speak for @jan491, but in my case, it seems that an additional "Spotify" audio sink only gets created after a video ad plays, which also plays in its own "Chromium" audio sink (see attached).

With Chromium Video Ad.png
After Chromium Video Ad.png

I will take a look at this as soon as possible. But in the meantime, can any test if the same happens with the Web players inside a recent Chrome/Chromium?

This still happens on 1.2.31.1205. I installed Spotify via AUR on Archlinux which extracts files from deb package. I can reproduce this issue with 100% accuracy:

1. Play last song on your current playlist. Let it finish. Make sure that nothing plays.

2. Wait half a minute (or whole minute just to be sure).

3. Play anything. At this point you'll have 2 Spotify connections to the pipewire/pulseaudio.

Still happens 1.2.37.701.

This has also been happening on my machine for ages, using the official deb repository.

 

➜  ~ apt show spotify-client              
Package: spotify-client
Version: 1:1.2.37.701.ge66eb7bc
Priority: extra
Section: sound
Maintainer: Spotify <**bleep**>
Installed-Size: 307 MB
Depends: libc6 (>= 2.30), libasound2, libatk-bridge2.0-0, libatomic1, libcurl3-gnutls, libgbm1, libglib2.0-0, libgtk-3-0, libnss3, libssl3 | libssl1.1 | libssl1.0.2 | libssl1.0.1 | libssl1.0.0, libxshmfence1, libxss1, libxtst6, xdg-utils, libayatana-appindicator3-1
Recommends: libavcodec58 | libavcodec-extra58 | libavcodec57 | libavcodec-extra57 | libavcodec-ffmpeg56 | libavcodec-ffmpeg-extra56 | libavcodec54 | libavcodec-extra-54, libavformat58 | libavformat57 | libavformat-ffmpeg56 | libavformat54
Suggests: libnotify4
Homepage: https://www.spotify.com
License: https://www.spotify.com/legal/end-user-agreement
Vendor: Spotify AB
Download-Size: 138 MB
APT-Manual-Installed: yes
APT-Sources: http://repository.spotify.com stable/non-free amd64 Packages
Description: Spotify streaming music client

 

 

➜  ~ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"

 

volume-control-spotify.png

Seem as this ElectronJS inter process communication and usage of contextBridge to Create a safe, bi-directional, synchronous bridge across isolated contexts

 

source: PR from itch.io  but maybe some spawning ElectronJS policies development should occur

 

Suggested posts