Pi zero 2W - service fail after update [snapcast client]

Hi !

First, thank you for all the work made on DietPi !

Have a little problem after an upgrade of dietpi, what is used :

  • Pi zero 2W with an Allo mini boss dac (sound card set to “allo-boss-dac-pcm512x-audio)”
  • DietPi v9.1.1 (after upgrade and problems, also tried fresh installations with all 32bits images of dietpi)
  • snapclient
  • wifi connection

Since I’ve upgraded from dietpi v8.21.1, snapclient no longer want to work :

└─dietpi-services_edit.conf
│      Active: failed (Result: exit-code) since Tue 2024-03-05 20:17:16 CET;
│ 23h ago
│    Duration: 88ms
│        Docs: man:snapclient(1)
│     Process: 491 ExecStart=/usr/bin/snapclient --logsink=system
│ $SNAPCLIENT_OPTS (code=exited, status=1/FAILURE)
│    Main PID: 491 (code=exited, status=1/FAILURE)
│         CPU: 64ms
│
│ Mar 05 20:17:16 DietPi systemd[1]: snapclient.service: Scheduled restart
│ job, restart counter is at 5.
│ Mar 05 20:17:16 DietPi systemd[1]: Stopped snapclient.service - Snapcast
│ client.
│ Mar 05 20:17:16 DietPi systemd[1]: snapclient.service: Start request
│ repeated too quickly.
│ Mar 05 20:17:16 DietPi systemd[1]: snapclient.service: Failed with result
│ 'exit-code'.
│ Mar 05 20:17:16 DietPi systemd[1]: Failed to start snapclient.service -
│ Snapcast client.

More context/infos :

  • Snapclient server (running an another machine) seems to indicate that the card achieved a connection before the service failed (after each reboot log from snapclient server shows a quick connection)
  • Dietpi is still beautifully runnning snapcast client on another card : rasperry pi 3, digi-pro dac, DietPi (v8.21.1)

Does somebody knows a way to get more infos about the error I’m experiencing or knows a potential solution ?

Maybe you can check whole system log

journalctl -u snapclient.service
1 Like

Thank for your help !

root@DietPi:~# journalctl -u snapclient.service
Mar 05 20:17:13 DietPi systemd[1]: Started snapclient.service - Snapcast client.
Mar 05 20:17:14 DietPi snapclient[421]: PCM device "default" not found
Mar 05 20:17:14 DietPi snapclient[421]: Version 0.26.0
Mar 05 20:17:14 DietPi snapclient[421]: Connecting
Mar 05 20:17:14 DietPi snapclient[421]: ServerSettings - buffer: 1000, latency: 0, volume: 100, muted: 0
Mar 05 20:17:14 DietPi snapclient[421]: Codec: flac, sampleformat: 44100:16:2
Mar 05 20:17:14 DietPi snapclient[421]: Player name: alsa, device: default, desc ription: <none>, idx: -1, sharing mode: unspecified, parameters: <none>
Mar 05 20:17:14 DietPi snapclient[421]: Mixer mode: software, parameters: <none>
Mar 05 20:17:14 DietPi snapclient[421]: Sampleformat: 44100:16:2, stream: 44100:16:2
Mar 05 20:17:14 DietPi snapclient[421]: Using default buffer_time: 80 ms, default fragments: 4
Mar 05 20:17:14 DietPi snapclient[421]: Exception: Can't open default, error: No such file or directory, code: -2
Mar 05 20:17:14 DietPi snapclient[421]: Exception: Can't open default, error: No such file or directory
Mar 05 20:17:14 DietPi snapclient[421]: Snapclient terminated.
Mar 05 20:17:14 DietPi systemd[1]: snapclient.service: Main process exited, code =exited, status=1/FAILURE
Mar 05 20:17:14 DietPi systemd[1]: snapclient.service: Failed with result 'exit-code'.

Could be related to the DAC ? " Player name: alsa, device: default " and " PCM device “default” not found "

aplay -l

Is returning

aplay: device_list:274: no soundcards found...

Could it be a material failure ?
Any change in dietpi audio management or drivers ?

@MichaIng can you have a look

Found something : when setting sound card on onboard hdmi or 3.5mm, aplay -l also returns no soundcards found... so it’s not the DAC (also DAC is working on my pi3 running an old installation).

Could be the same issue that No soundcards found

Can you show your config.txt, so we see whether onboard audio has been enabled as intended:

cat /boot/config.txt

Why do you not use the 64-bit/ARMv8 image on RPi Zero 2W?

Had in mind that snapcast was only available for 32bit versions, but maybe that was a while ago…
Installation redone in 64bits, soundscards still unavailables.

Config.txt :

# Docs: https://www.raspberrypi.com/documentation/computers/config_txt.html
# Overlays: https://github.com/raspberrypi/firmware/blob/54453cc6f8b2e84d3bed47a9b16ff6cae01c1f9f/boot/overlays/README

#-------Display---------
# Max allocated framebuffers: Set to "0" in headless mode to reduce memory usage
# - Defaults to "2" on RPi4 and "1" on earlier RPi models
#max_framebuffers=0

# If you get no picture, set the following to "1" to apply most compatible HDMI settings.
#hdmi_safe=1

# Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display.
# - Ranges from "0" to "11", use values above "7" only if required, e.g. with very long HDMI cable.
# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.
#config_hdmi_boost=5

# Uncomment if HDMI display is not detected and composite is being outputted.
#hdmi_force_hotplug=1

# Uncomment to disable HDMI even if plugged, e.g. to force composite output.
#hdmi_ignore_hotplug=1

# Uncomment to force a console size. By default it will be display's size minus overscan.
#framebuffer_width=1280
#framebuffer_height=720

# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previous RPi models.
#enable_tvout=1
# SDTV mode
#sdtv_mode=0

# Uncomment to force a specific HDMI mode (this will force VGA).
#hdmi_group=1
#hdmi_mode=1

# Uncomment to force an HDMI mode rather than DVI. This enables HDMI audio in DMT modes.
#hdmi_drive=2

# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input.
# With default value "0", the display shows a blank screen instead, but will not go into standby.
# NB: Some legacy OpenMAX applications (OMXPlayer) cannot wake screens from real standby.
hdmi_blanking=1

# Set to "1" if your display has a black border of unused pixels visible.
disable_overscan=1

# Uncomment the following to adjust overscan.
# Use positive numbers if console goes off screen, and negative if there is too much border.
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# Rotation
#display_hdmi_rotate=0
#lcd_rotate=0

#-------RPi camera module-------
#start_x=1
#disable_camera_led=1

#-------GPU memory splits-------
gpu_mem_256=16
gpu_mem_512=16
gpu_mem_1024=16

#-------Boot splash screen------
disable_splash=1

#-------Onboard sound-----------
dtparam=audio=off

#-------I2C-------------
#dtparam=i2c_arm=off
#dtparam=i2c_arm_baudrate=100000

#-------SPI-------------
#dtparam=spi=off

#-------Serial/UART-----
# NB: "enable_uart=1" will enforce "core_freq=250" on RPi models with onboard WiFi.
enable_uart=0

#-------SD card HPD-----
# Comment to enable SD card hot-plug detection, while booting via USB or network.
# NB: This causes constant CPU load and kernel errors when no SD card is inserted.
dtparam=sd_poll_once

#-------Overclock-------
temp_limit=65
initial_turbo=20

#over_voltage=0
#arm_freq=1000
#core_freq=400
#sdram_freq=450

#over_voltage_min=0
#arm_freq_min=300
#core_freq_min=250
#sdram_freq_min=400
arm_64bit=1
dtoverlay=allo-boss-dac-pcm512x-audio

Okay that looks all good. Note that you must reboot after every sound card change, to be effective.

And you did a reboot after that change? Can you check whether /boot/config.txt then contains dtparam=audio=off and no dtoverlay= line?

Looks like I need to dig out a new SD card for my Pi Zero. They are currently all running the new kernel/firmware packages, which do not equal the ones of the images we provide.

With the new kernel, HDMI audio on RPi Zero (1) W works, with “auto” and with “hdmi” selection. It has no 3.5mm jack, hence cannot test that.