spotifyd
spotifyd copied to clipboard
User Switch stops process
As soon as a 2nd user tries to connect the spotifyd process stops without an error (looks like a clean shutdown). Not sure if this is a bug or a "feature" or an "works as intended"
Environment
- OS: Debian 11 (Bullseye/Testing) with pulseaudio backend
- Spotifyd: 0.30 (full and slim prebuild)
- Mutiple users with their own spotify premium accounts
Expected behaviour:
- Run spotifyd without -u/-p options
- User A connects
- User A issues command to start music
- Spotifyd starts playing music from User A
- User B Connects
- User B issues command to start music
- Spotifyd stops playing music from User A
- Spotifyd starts playing music from User B
Observed behaviour Situation 1
- Running spotifyd without -u/-p options
- First user (A or B) that connects can play music
- as soon as the other user connects after that, the spotifyd process closes
Situation 2
- Running spotifyd with -u/-p options (credentails of user A)
- as soon as user (B) connects the spotifyd process closes
- as long as a user with the -u/-p credentials connects he (or she) can play music
Logs (last bit)
Click to show logs
``` drop Spirc[0] Shutting down player thread ... drop Player[0] drop Session[0] drop AudioKeyManager drop ChannelManager drop MercuryManager shutdown; state=pool::State { lifecycle: Running, num_futures: 0 } -> transitioned to shutdown -> shutting down workers dropping I/O source: 3 deregistering handle with poller dropping I/O source: 1 deregistering handle with poller dropping I/O source: 2 deregistering handle with poller dropping I/O source: 0 drop Dispatch deregistering handle with poller dropping I/O source: 5 ```
I have found this as well, but no quick fix for this yet
Version 0.3.2 has the same issue Fixed it at the moment with an auto restart by systemd. first connect kills the process, and the 2nd try connects to restarted process
(my spotifyd.service file)
[Unit]
Description=Spotifyd deamon
StartLimitIntervalSec=20
StartLimitBurst=20
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target
[Service]
User=spotifyd
Group=spotifyd
Restart=always
ExecStart=/opt/spotifyd-linux-full/spotifyd -d Woonkamer -b pulseaudio --zeroconf-port 4070 --initial-volume 60 -B 320 --no-daemon
[Install]
WantedBy=multi-user.target
https://github.com/librespot-org/librespot/issues/579 The original library seems to have the same issue
If I'm not mistaken, this has been fixed in #1059.
I can confirm that this issue is fixed (at least in a compile from the current source)