spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

User Switch stops process

Open geephile opened this issue 4 years ago • 3 comments

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 ```

geephile avatar Feb 22 '21 21:02 geephile

I have found this as well, but no quick fix for this yet

robinvd avatar Mar 03 '21 09:03 robinvd

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

geephile avatar May 29 '21 14:05 geephile

https://github.com/librespot-org/librespot/issues/579 The original library seems to have the same issue

geephile avatar May 29 '21 15:05 geephile

If I'm not mistaken, this has been fixed in #1059.

eladyn avatar Oct 02 '22 13:10 eladyn

I can confirm that this issue is fixed (at least in a compile from the current source)

geephile avatar Oct 11 '22 12:10 geephile