Skip to content

Cleanup Spotify's leaked pipewire-pulse client objects

License

Notifications You must be signed in to change notification settings

svrana/spotify-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-cleanup

Destroys the leaked pipewire-pulse clients by the Spotify application on Linux.

Why?

Spotify leaks its pulse clients. This seems to happen when its syncing state with another version of spotify running on your phone, car, etc. If unchecked, these leaked clients will prevent new clients from connecting and cause problems like your audio not working, volume control broken, etc. While I believe this to be a problem for both pulseaudio and pipewire-pulse audio systems, this solution works only for pipewire as that's what I use and was more interested in learning a bit about how to interact with it than I was about pulseaudio. If you're not using pulseaudio, you may check out this script posted here in a user comment.

How?

Run spotify-cleanup in a systemd user service every 30 minutes.

Installing

Nix Flake (recommended)

Add the following snippet to your flake inputs:

spotify-cleanup = {
    url = "github:svrana/spotify-cleanup";
    inputs.nixpkgs.follows = "nixpkgs";
};

Using the Home Manager module (recommended)

Add the following to your home-manager imports:

inputs.spotify-cleanup.homeModules.default

And then you may use the option to set it up, for example:

services.spotify-cleanup = {
    enable = true;
    systemdTarget = "graphical-session.target";
    interval = "30m";
};

This method will install the program and setup a user systemd service.

About

Cleanup Spotify's leaked pipewire-pulse client objects

Topics

Resources

License

Stars

Watchers

Forks