raspotify icon indicating copy to clipboard operation
raspotify copied to clipboard

No sound, new install

Open joshuaandrewsN opened this issue 4 months ago • 3 comments

Compatible Device

  • [x] I'm running Raspotify on a compatible Device

Are you sure?

  • [x] I'm not trying to run Raspotify on a ARMv6 device

Compatible OS

  • [x] I'm running Raspotify on a compatible OS

Compatible Configuration

  • [x] I'm running Raspotify on a compatible Configuration

Latest Version

  • [x] I'm running the latest version of Raspotify

Are you sure?

  • [x] I'm not running Raspotify 0.31.8.1 on a Pi v1 or Pi Zero

Due Diligence

  • [x] I have done my due diligence

What happened?

Pi 3B+ fresh OS from Raspberry Imager 1.9.6 Legacy, 32-bit Debian Bullseye

sudo apt-update / apt-upgrade

install raspotify from the script sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

tried sudo apt-update / apt-upgrade

I have tried with the default config file and with setting the output to hw:CARD=Headphones,DEV=0

I have tried the hosts file change

Spotify sees it, and connects and it looks like likes playing, but its not.

Relevant log output and/or the contents of /etc/raspotify/crash_report if any ( sudo journalctl -u raspotify -b and sudo cat /etc/raspotify/crash_report )

pi@raspberrypi:~ $ librespot -d ?
[2025-08-13T20:54:57Z INFO  librespot] librespot 0.6.0-dev ba3d501 (Built on 2025-08-11, Build ID: o42TOKj2, Profile: release)


        Compatible alsa device(s):

        ------------------------------------------------------

        Device:

                hw:CARD=Headphones,DEV=0

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Direct hardware device without any conversions


pi@raspberrypi:~ $ sudo journalctl -u raspotify -b
-- Journal begins at Tue 2025-05-06 09:38:24 EDT, ends at Wed 2025-08-13 16:57:10 EDT. --
Aug 13 16:38:18 raspberrypi systemd[1]: Started Raspotify (Spotify Connect Client).
Aug 13 16:41:57 raspberrypi systemd[1]: Stopping Raspotify (Spotify Connect Client)...
Aug 13 16:41:57 raspberrypi systemd[1]: raspotify.service: Succeeded.
Aug 13 16:41:57 raspberrypi systemd[1]: Stopped Raspotify (Spotify Connect Client).
Aug 13 16:41:57 raspberrypi systemd[1]: Started Raspotify (Spotify Connect Client).
Aug 13 16:42:06 raspberrypi librespot[1330]: [2025-08-13T20:42:06Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Aug 13 16:42:07 raspberrypi librespot[1330]: Failed to create secure directory (/root/.config/pulse): Permission denied
Aug 13 16:48:04 raspberrypi systemd[1]: Stopping Raspotify (Spotify Connect Client)...
Aug 13 16:48:04 raspberrypi systemd[1]: raspotify.service: Succeeded.
Aug 13 16:48:04 raspberrypi systemd[1]: Stopped Raspotify (Spotify Connect Client).
Aug 13 16:48:04 raspberrypi systemd[1]: raspotify.service: Consumed 43.100s CPU time.
Aug 13 16:48:04 raspberrypi systemd[1]: Started Raspotify (Spotify Connect Client).
Aug 13 16:48:23 raspberrypi librespot[1401]: [2025-08-13T20:48:23Z WARN  librespot_core::apresolve] Failed to resolve all access points, using fallbacks
Aug 13 16:48:23 raspberrypi librespot[1401]: [2025-08-13T20:48:23Z WARN  librespot_core::apresolve] Resolve access points error: Service unavailable { client error (Connect) }
Aug 13 16:48:23 raspberrypi librespot[1401]: [2025-08-13T20:48:23Z WARN  librespot_core::apresolve] Failed to resolve all access points, using fallbacks
Aug 13 16:48:23 raspberrypi librespot[1401]: [2025-08-13T20:48:23Z WARN  librespot_core::apresolve] Resolve access points error: Service unavailable { client error (Connect) }
Aug 13 16:48:24 raspberrypi librespot[1401]: [2025-08-13T20:48:24Z WARN  librespot_core::apresolve] Failed to resolve all access points, using fallbacks
Aug 13 16:48:24 raspberrypi librespot[1401]: [2025-08-13T20:48:24Z WARN  librespot_core::apresolve] Resolve access points error: Service unavailable { client error (Connect) }
Aug 13 16:48:24 raspberrypi librespot[1401]: [2025-08-13T20:48:24Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Aug 13 16:48:25 raspberrypi librespot[1401]: Failed to create secure directory (/root/.config/pulse): Permission denied
Aug 13 16:55:51 raspberrypi systemd[1]: Stopping Raspotify (Spotify Connect Client)...
Aug 13 16:55:51 raspberrypi systemd[1]: raspotify.service: Succeeded.
Aug 13 16:55:51 raspberrypi systemd[1]: Stopped Raspotify (Spotify Connect Client).
Aug 13 16:55:51 raspberrypi systemd[1]: raspotify.service: Consumed 40.377s CPU time.
Aug 13 16:55:51 raspberrypi systemd[1]: Started Raspotify (Spotify Connect Client).
Aug 13 16:56:25 raspberrypi systemd[1]: Stopping Raspotify (Spotify Connect Client)...
Aug 13 16:56:25 raspberrypi systemd[1]: raspotify.service: Succeeded.
Aug 13 16:56:25 raspberrypi systemd[1]: Stopped Raspotify (Spotify Connect Client).
Aug 13 16:56:25 raspberrypi systemd[1]: Started Raspotify (Spotify Connect Client).
Aug 13 16:56:37 raspberrypi librespot[1518]: [2025-08-13T20:56:37Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default
Aug 13 16:56:38 raspberrypi librespot[1518]: Failed to create secure directory (/root/.config/pulse): Permission denied

        Supported Format(s):

                S16

        ------------------------------------------------------

        Device:

                plughw:CARD=Headphones,DEV=0

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Hardware device with all software conversions

        Supported Format(s):

                S16 S24 S24_3 S32 F32 F64

        ------------------------------------------------------

        Device:

                sysdefault:CARD=Headphones

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Default Audio Device

        Supported Format(s):

                S16 S24 S24_3 S32 F32 F64

        ------------------------------------------------------

ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave


pi@raspberrypi:~ $ apt-cache policy raspotify
raspotify:
  Installed: 0.46.2~librespot.v0.6.0-ba3d501
  Candidate: 0.46.2~librespot.v0.6.0-ba3d501
  Version table:
 *** 0.46.2~librespot.v0.6.0-ba3d501 500
        500 https://dtcooper.github.io/raspotify raspotify/main armhf Packages
        100 /var/lib/dpkg/status


pi@raspberrypi:~ $ sudo cat /etc/raspotify/crash_report
cat: /etc/raspotify/crash_report: No such file or directory

joshuaandrewsN avatar Aug 13 '25 20:08 joshuaandrewsN

Perhaps a hint here is to look at this message:

ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave

Does raspotify have the correct permissions to play audio?

kimtore avatar Aug 14 '25 09:08 kimtore

I used ProtectHome=false in /lib/systemd/system/raspotify.service and that resolved the "failed to create secure directory"

But sound does not work at all regardless of device selected. Sound works fine with Spotify on Chromium and other sources.

I also need to use the hosts file trick or Raspotify never shows in my list in the spotify app.

joshuaandrewsN avatar Aug 16 '25 23:08 joshuaandrewsN

I have the same problem on a RPI3b+.

Fresh install of Raspberry Pi os lite (64 bit). Installed with sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | sh Nothing to hear when playing spotify

Works: speaker-test -c2 -twav -l3 /usr/share/sounds/alsa $ aplay Front_Center.wav

raspotify.service - Raspotify (Spotify Connect Client)
     Loaded: loaded (/usr/lib/systemd/system/raspotify.service; enabled; preset: enabled)
     Active: active (running) since Thu 2025-10-02 15:55:34 WAT; 1min 12s ago
 Invocation: 1f0d559d42614cc790bb68eb4aabaeb2
       Docs: https://github.com/dtcooper/raspotify
             https://github.com/librespot-org/librespot
             https://github.com/dtcooper/raspotify/wiki
             https://github.com/librespot-org/librespot/wiki/Options
   Main PID: 1039 (librespot)
      Tasks: 9 (limit: 759)
        CPU: 695ms
     CGroup: /system.slice/raspotify.service
             └─1039 /usr/bin/librespot

Oct 02 15:55:34 RaSpotify systemd[1]: Started raspotify.service - Raspotify (Spotify Connect Client).
Oct 02 15:56:44 RaSpotify librespot[1039]: [2025-10-02T14:56:44Z WARN  librespot_connect::state::context] couldn't load context info because: context is not available. type: Default

INFO  librespot] librespot 0.7.1 987dfa5 (Built on 2025-09-04, Build ID: juOBtsrQ, Profile: release)


        Compatible alsa device(s):

        ------------------------------------------------------

        Device:

                hw:CARD=Headphones,DEV=0

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Direct hardware device without any conversions

        Supported Format(s):

                S16

        ------------------------------------------------------

        Device:

                plughw:CARD=Headphones,DEV=0

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Hardware device with all software conversions

        Supported Format(s):

                S16 S24 S24_3 S32 F32 F64
        ------------------------------------------------------

        Device:

                sysdefault:CARD=Headphones

        Description:

                bcm2835 Headphones, bcm2835 Headphones
                Default Audio Device

        Supported Format(s):

                S16 S24 S24_3 S32 F32 F64

        ------------------------------------------------------

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave

Tsjippy avatar Oct 02 '25 14:10 Tsjippy