hifiberry / hifiberry-os

Linux distribution optimized for audio playback
MIT License
1.01k stars 128 forks source link

Spotify daemon stops playing after a while #589

Open dennisfrijlink opened 6 days ago

dennisfrijlink commented 6 days ago

Describe the bug The spotify deamon setup works fine but for somehow after a while it just stops playing and not just pause, the song is also not selected anymore.

HiFiBerryOS version 20240523

HiFiBerry sound card DAC+ Pro

To Reproduce Steps to reproduce the behavior:

  1. play song with spotify daemon
  2. wait for a while, and the bug appears (could not find a period of time)

Expected behavior Just keep playing.

Additional context Beside that when I check the logs of the spotify deamon it returns nothing

# journalctl -b -u spotify.service
# ~
# ~
# ~
# ~
# ~
# ~

And when checking the running services nothing spotify related is showing:

  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
  audiocontrol2.service        loaded active running Audiocontrol2
  avahi-daemon.service         loaded active running Avahi mDNS/DNS-SD Stack
  avahi-dnsconfd.service       loaded active running Avahi DNS Configuration Daemon
  beocreate2.service           loaded active running Beocreate 2 Server
  bluealsa-aplay.service       loaded active running BlueALSA aplay
  bluealsa.service             loaded active running BlueALSA
  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
  audiocontrol2.service        loaded active running Audiocontrol2
  avahi-daemon.service         loaded active running Avahi mDNS/DNS-SD Stack
  avahi-dnsconfd.service       loaded active running Avahi DNS Configuration Daemon
  beocreate2.service           loaded active running Beocreate 2 Server
  bluealsa-aplay.service       loaded active running BlueALSA aplay
  bluealsa.service             loaded active running BlueALSA
  bluetooth.service            loaded active running Bluetooth service
  btagent.service              loaded active running Bluetooth Auth Agent
  containerd.service           loaded active running containerd container runtime
  datacollector.service        loaded active running Usage data collector
  dbus.service                 loaded active running D-Bus System Message Bus
  docker.service               loaded active running Docker Application Container Engine
  getty@tty1.service           loaded active running Getty on tty1
  mpd-update-notifier.service  loaded active running mpd update notifier
  mpd.service                  loaded active running mpd
  ntpd.service                 loaded active running Network Time Service
  rngd.service                 loaded active running Hardware RNG Entropy Gatherer Daemon
  seatd.service                loaded active running Seat management daemon
  sigmatcp.service             loaded active running SigmaTCP Server for HiFiBerry DSP
  sshd.service                 loaded active running OpenSSH server daemon
  systemd-journald.service     loaded active running Journal Service
  systemd-networkd.service     loaded active running Network Configuration
  systemd-resolved.service     loaded active running Network Name Resolution
  systemd-timesyncd.service    loaded active running Network Time Synchronization
  systemd-udevd.service        loaded active running Rule-based Manager for Device Events and Files
  weston.service               loaded active running Weston, a Wayland compositor, as a system service
  wpa_supplicant.service       loaded active running WPA supplicant
  wpa_supplicant@wlan0.service loaded active running WPA supplicant for wlan0
josefmuhr commented 2 days ago

Same for me with Spotify Connect as source, so using vollibrespot.

Could be the same problem as stated in https://github.com/hifiberry/hifiberry-os/issues/576 .

I did remove the Spotify IP from the /etc/hosts file but this only gets the connection working, not ensuring that it stays stable.

So there is a good chance that the error is on Spotifys side.

Quick update: The web interface is still working after playback stopped. In the sources section of the web interface I'm seeing that bluetooth is the active source, without me connecting to the pi via bluetooth. For now I disabled bluetooth as a source (I don't use it anyway). I will test and report back if the error persists.

Update 2 : For now this seems to work for me. Had disconnects every ~10 minutes. Been playing without disconnecting for 20ish minutes.

dennisfrijlink commented 1 day ago

Hi @josefmuhr did disabling bluetooth fixed the issue permanent? And how did you disbaled the bluetooth, via the web UI or via SSH?

Thanks in advancd

josefmuhr commented 1 day ago

Hi @josefmuhr did disabling bluetooth fixed the issue permanent? And how did you disbaled the bluetooth, via the web UI or via SSH?

Thanks in advancd

I have not had a single disconnect since disabling. I did disable it via the web UI.