No sound on RPi 3B+ (yet another one)

I flashed BalenaOS onto my Raspberry Pi 3B+ with balena-sound using the deploy button from this link.

My first try was with the 64bit version. The installation went well, but unfortunately I got no sound from the Jack (I tried both Spotify and Bluetooth). After going through many threads and issues, I tried nearly everything, but simply can’t get it to work. I can confirm the Jack works (speaker-test from the audio container).

I tried:

  • Removing the overlay as mentioned here
  • Setting SOUND_MODE to STANDALONE (actually I do that for all deployments directly from the Advanced interface in order to rule out some possible bugs)
  • Setting AUDIO_OUTPUT to RPI_HEADPHONES (same remark as above)
  • Installing the 32 bit version
  • Downgrading to an outdated version of the 32 bit version (2.38 rev1 I believe) as mentioned in this GitHub issue
  • Disabling services one by one and testing them individually
  • Combinations of the above

Nothing worked. I get a few error messages in the logs though:

 audio  W: [pulseaudio] module-loopback.c: Cannot set requested sink latency of 66.67 ms, adjusting to 99.95 ms
 audio  W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
 audio  W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
 audio  W: [pulseaudio] bluez5-util.c: org.bluez.Media1.RegisterApplication() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "RegisterApplication" with signature "oa{sv}" on interface "org.bluez.Media1" doesn't exist
 audio  W: [pulseaudio] bluez5-util.c: Couldn't register media application for adapter /org/bluez/hci0
 audio  W: [pulseaudio] bluez5-util.c: Only SBC codec is available for A2DP profiles

Here is the output of /support:

{"version":"3.8.2","config":{"mode":"STANDALONE","device":{"ip":"192.168.178.35","type":"raspberrypi3"},"multiroom":{"master":"192.168.178.35","forced":false},"audioBlock":{"_events":{},"_eventsCount":2,"pulseCookie":{"type":"Buffer","data":[1,189,160,126,240,33,47,116,54,7,0,0,51,8,0,0,192,60,47,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,60,47,116,38,7,0,0,37,4,128,0,0,0,0,0,0,0,0,0,0,0,0,0,38,7,0,0,255,255,255,255,6,0,0,0,232,60,47,116,248,59,47,116,0,0,0,0,0,0,0,0,0,0,0,0,56,61,47,116,0,0,0,0,0,0,0,0,68,215,70,116,80,45,47,116,80,61,47,116,0,0,0,0,152,56,47,116,0,0,0,0,216,245,69,116,72,61,47,116,36,7,0,0,152,8,0,0,232,59,47,116,248,60,47,116,0,7,0,0,9,0,0,0,88,61,47,116,0,0,0,0,170,7,0,0,51,9,0,0,184,58,47,116,176,2,30,116,189,7,0,0,168,1,0,0,72,248,69,116,51,8,0,0,190,7,0,0,43,0,0,0,120,61,47,116,136,61,47,116,119,114,105,116,101,0,0,0,128,213,70,116,168,61,47,116,5,0,0,0,242,199,239,240,1,255,255,255,255,255,255,255,199,7,0,0,168,1,0,0]},"connected":true,"chunks":[],"requests":[],"lastRequestId":12,"pulseAddress":{"port":4317,"host":"192.168.178.35"},"address":"tcp:192.168.178.35:4317","subToEvents":true,"name":"BalenaAudio","socket":{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":false,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":true,"resumeScheduled":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"dataEmitted":true,"decoder":null,"encoding":null},"_events":{},"_eventsCount":4,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"errored":null,"closed":false,"closeEmitted":false,"writable":true},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null},"defaultSink":"balena-sound.input"}},"audio":{"name":"pulseaudio","version":"15.0","user":"root","hostname":"82527932c13f","sampleSpec":{"format":3,"channels":2,"rate":44100},"defaultSink":"balena-sound.input","defaultSource":"balena-sound.input.monitor","cookie":968097816,"channelMap":{"channels":2,"types":[1,2]}},"sinks":[{"index":0,"name":"alsa_output.bcm2835-alsa.stereo-fallback","description":"bcm2835 ALSA Stereo","sampleSpec":{"format":3,"channels":2,"rate":44100},"channelMap":{"channels":2,"types":[1,2]},"moduleIndex":6,"channelVolumes":{"channels":2,"volumes":[49152,49152]},"isMuted":false,"monitorSourceIndex":0,"monitorSourceName":"alsa_output.bcm2835-alsa.stereo-fallback.monitor","latency":"0n","driverName":"module-alsa-card.c","flagsRaw":55,"properties":[["alsa.resolution_bits","16"],["device.api","alsa"],["device.class","sound"],["alsa.class","generic"],["alsa.subclass","generic-mix"],["alsa.name","bcm2835 ALSA"],["alsa.id","bcm2835 ALSA"],["alsa.subdevice","0"],["alsa.subdevice_name","subdevice #0"],["alsa.device","0"],["alsa.card","0"],["alsa.card_name","bcm2835 ALSA"],["alsa.long_card_name","bcm2835 ALSA"],["device.bus_path","platform-soc:audio"],["sysfs.path","/devices/platform/soc/soc:audio/bcm2835_alsa/sound/card0"],["device.string","hw:0"],["device.buffering.buffer_size","17632"],["device.buffering.fragment_size","4416"],["device.access_mode","mmap"],["device.profile.name","stereo-fallback"],["device.profile.description","Stereo"],["device.description","bcm2835 ALSA Stereo"],["module-udev-detect.discovered","1"],["device.icon_name","audio-card"]],"configLatency":"0n","baseVolume":56210,"state":2,"volumeSteps":65537,"cardIndex":0,"ports":1,"activePortName":"analog-output","formats":"Analog Output"},{"index":9900,"name":0,"description":"analog-output","sampleSpec":[{"encoding":1,"properties":[]}],"channelMap":1,"moduleIndex":"balena-sound.input","channelVolumes":"Null Output","isMuted":{"format":3,"channels":2,"rate":44100},"monitorSourceIndex":{"channels":2,"types":[1,2]},"monitorSourceName":21,"latency":{"channels":2,"volumes":[49152,49152]},"driverName":false,"flagsRaw":1,"properties":"balena-sound.input.monitor","configLatency":"39812n","baseVolume":"module-null-sink.c","state":418,"volumeSteps":[["device.description","Null Output"],["device.class","abstract"],["device.icon_name","audio-card"]],"cardIndex":"66666n","ports":65536,"activePortName":0,"formats":65537},{"index":4294967295,"name":0,"description":"","sampleSpec":[{"encoding":1,"properties":[]}],"channelMap":2,"moduleIndex":"balena-sound.output","channelVolumes":"Null Output","isMuted":{"format":3,"channels":2,"rate":44100},"monitorSourceIndex":{"channels":2,"types":[1,2]},"monitorSourceName":22,"latency":{"channels":2,"volumes":[65536,65536]},"driverName":false,"flagsRaw":2,"properties":"balena-sound.output.monitor","configLatency":"17147n","baseVolume":"module-null-sink.c","state":418,"volumeSteps":[["device.description","Null Output"],["device.class","abstract"],["device.icon_name","audio-card"]],"cardIndex":"50023n","ports":65536,"activePortName":0,"formats":65537},{"index":4294967295,"name":0,"description":"","sampleSpec":[{"encoding":1,"properties":[]}],"channelMap":3,"moduleIndex":"snapcast","channelVolumes":"Null Output","isMuted":{"format":3,"channels":2,"rate":44100},"monitorSourceIndex":{"channels":2,"types":[1,2]},"monitorSourceName":23,"latency":{"channels":2,"volumes":[65536,65536]},"driverName":false,"flagsRaw":3,"properties":"snapcast.monitor","configLatency":"0n","baseVolume":"module-null-sink.c","state":418,"volumeSteps":[["device.description","Null Output"],["device.class","abstract"],["device.icon_name","audio-card"]],"cardIndex":"0n","ports":65536,"activePortName":2,"formats":65537}],"volume":75,"constants":{"debug":false,"port":80,"coteDelay":5000,"mode":"STANDALONE","balenaDeviceType":"raspberrypi3","multiroom":{"forced":false,"pollInterval":60000,"disallowUpdates":false},"volume":75,"inputSink":"balena-sound.input"}}

Is there anything else I can provide to get support?
Thanks

+1

I also have a RPi 3B+ and am experiencing the same problem, even after going through all the same steps…

I just solved this issue for my system by setting the default sink to balena-sound.output instead of balena-sound.input in /core/audio/balena-sound.pa. You can find my fork of balena-sound with the fix at https://github.com/AppelBoomHD/balena-sound.

Hope this helps!

Thanks @Julian, I’ll try your fork. Are you running it with a 64 bit OS?

Yes I am. balenaOS 2.80.3+rev1 to be exact.

It worked! Thanks.

Could you explain how you came up with this / why this fix works?

I am wondering if it’s a workaround or something the contributors should/are aware of; it seems so simple.

Hi.

This solution didn’t fix the problem for me. Thanks for your efforts though. I hope the Balena team are working on getting this thing fixed.

Hi everyone, thanks for reporting the issue. I’ve just released a fix for this here https://github.com/balenalabs/balena-sound/pull/547, updating to balenaSound v3.8.4 should solve the problem! Let us know if it doesn’t, cheers!

Hi,
Thanks @tmigone! Good to see that this has been fixed!

To answer your question @pierre, I got the idea by trying to play a sound on my RPi with the paplay command by manually setting the sink to my mp3 jack. Since that worked, I looked through the output of /support to see if there were any sink variables that aren’t correctly set. That’s where I found the defaultsink variable which was set to balena-sound.input. I checked the startup script for the audio service, to find where the default sink variable was set. That happened to be the balena-sound.pa file.

It was kind of a desperate final attempt of fixing the problem after struggling with it for a while, but I happened to be lucky which was a huge relief.

1 Like