No sound from Kodi on my Raspberry Pi 4
#1
This started happening about a month ago. I was running LibreElec on my Pi4 to watch Netflix & Prime, with some Youtube when I lost the sound. I'd been watching with sound for about a month prior to this. I couldn't debug the problem within LibreElec and wasn't really enthused with it anyway, so I tried installing Raspberry Pi OS/64bit. This confirmed that I was getting sound through the HDMI cable but apparently the 64bit version of Kodi doesn't support Netflix or Prime. I tried installing the 32bit version of Kodi but that wouldn't install on multiarch. Finally I installed the 32bit version of Raspberry Pi OS and Kodi. Things are working except I still get no sound through Kodi. I have sound when I play a Youtube video through Midori, but not when I play the same video through Kodi. Similarly I get no sound through Prime videos (don't have Netflix running yet).

To be clear, there is nothing left over from the LibreElec install. Installing Raspberry Pi OS wipes the SD card. Yet I have the same Kodi problem on both platforms even though the Pi itself is outputting sound through the HDMI cable when not running Kodi.

I've gone through all the audio setting I can find but there is nothing that looks strange. Changing the various volume settings hasn't helped. I did notice that the default audio stream in Prime was set to Arabic but changing it to any of the 3 English streams didn't seem to do anything.

Any ideas on what is going on and how to fix it?

Thanks.
Reply
#2
OK, solved it via this post: https://forums.raspberrypi.com/viewtopic...120c0c32a8.

There apparently is an audio bug in Kodi but changing dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d in /boot/config.txt worked for me.
Reply
#3
Thread marked solved.

User still having issues so solved tag removed.
Always read the Wiki, FAQ and search the forum before posting.
Read/follow the forum rules.
Reply
#4
I spoke too soon. While I had working sound for a while, it's gone again. I checked that the config.txt amendment was still there and it is. This leaves me with two mysteries - why did the sound come back after I changed config.txt and why has it gone off again?
Reply
#5
Hey Dangelus, can you remove the "solved" tag since it isn't? 

Thanks.

Still no joy in Mudville. No matter what I try, Kodi remains mute. To repeat, I have working sound on my Pi through the Raspberry Pi OS. It's just Kodi that is silent. I've tried it with both lines in the /boot/config.txt and have working sound either way through Youtube in a browser but not in Kodi - not even the various beeps the GUI makes everytime anything is done.

Searching the Internet for solutions has yielded about as many working solutions as I found for the overscan problem - and with the same result - they don't solve it. Another similarity between the two issues is that both seem to suffer from bizarre jargon in the settings that defy conventional understanding.

Since the lack of sound is Kodi-wide, I thought trying the various Kodi sound settings would be the obvious place to start. Unfortunately I'm left with a series of what look to be hardware device numbers that really don't give me enough information to say "this is the one I need" so I have to try each one in turn. Some of the Internet search results even suggest that I may have to reboot the Pi to get the new settings to work.

I realize that Kodi runs on a lot of devices besides Linux, but I don't see why it isn't just outputting the sound to the operating system's sound system. Why is it doing something so complicated that if fails to produce sound on my Pi under both LibreElec and Raspberry Pi OS?
Reply
#6
(2022-10-03, 00:31)garydale Wrote: Hey Dangelus, can you remove the "solved" tag since it isn't? 

I have removed the tag. Sorry to hear you are still having issues.
Always read the Wiki, FAQ and search the forum before posting.
Read/follow the forum rules.
Reply
#7
I guess you are using the desktop version of Raspberry Pi OS?
If so, is the lite version maybe an option?

Does Kodi find the sound devices? -> Debug log -> https://paste.kodi.tv/
Reply
#8
Kodi finds many sound devices and I've tried them all. I gather they are for analogue outputs as well as the HDMI sound. Since I only have the HDMI cable hooked up, I'd expect that the HDMI options would be correct but I tried the others anyway.

LibreElec was pretty much plug & play until the sound stopped working. That's why I switched (back) to the Raspberry Pi OS. I originally had Raspian installed but couldn't get around the overscan problem - not seeing the menu made it unworkable. I tried LibreElec and was happy enough with it until I lost the sound. But that got me used to working with partially-visible options... Now I have the menu icons set to very large so I can almost see the main drop-down menu. With the OS working, I could verify that the problems wasn't the hardware.

I tried the 64bit OS but 64bit Kodi wouldn't let me use widevine and the 32bit Kodi wouldn't even install under multiarch so I'm using 32bit OS and 32bit Kodi. The OS produces sound but Kodi won't - except for one day when I got sound after changing a /boot/config.txt option. The next day the sound was gone again.

I can't see the Lite version helping since the OS has sound while Kodi on LibreElec and Kodi on the desktop doesn't. It would help if there was a "use OS sound" option rather than Kodi apparently trying to talk directly to the sound hardware.
Reply
#9
Currently there are four major sound systems on Linux, ALSA, Pulseaudio, Jack and Pipewire. Pipewire is the newest and shall replace all three, however it is not there yet. Jack is more for professionals. ALSA and Pulseaudio are currently the most used in consumer Linux installations.

ALSA is the base system, it provides also all the audio driver. It has the big disadvantage, that it does not allow multiple applications to connect to one audio output, which is a problem in Desktop environments.
Pulseaudio is a so called sound server. It hooks onto the ALSA sound cards and is a middle ware between the application and ALSA. Pulseaudio accepts connections from multiple applications, mixes them and sends the result to the ALSA sound card.     

Kodi can connect to both. In desktop environments, it usually connects to Pulseaudio, as it assumes also other applications are using the sound system, like youtube. In headless installations like Raspberry pi OsLite, Libreelec and others, it usually connects directly to ALSA. 

For further troubleshooting you need to figure out, what sound system Kodi is using in your setup. If Kodi is using ALSA as output on Raspberry desktop, it will not work as Pulseaudio is blocking the device. But youtube will work as it uses Pulseaudio. It is possible to see this in the debug log.

In OsLite, you do not have such problems as pulseaudio is not installed by default. On top it would be the better choice if you are planning to use the raspberry as pure Kodi box, so not using the desktop, and on top might solve your overscan problem.

You can overwrite Kodi's default behavior on which sound system to use by setting the environment variable KODI_AE_SINK=PULSE or KODI_AE_SINK=ALSA before Kodi start, e.g. in a startup script.
Reply
#10
The best solution for overscan is to disable it on the TV. (It may be called "just scan", "screen fit", "HD size", "full pixel", "unscaled", "dot by dot", "native" or "1:1", among other names).

kodi (assuming you are on RPiOS bullseye) by default will disable pulseaudio when launched. That allsows kodi access to features like passthrough.
You could try launching kodi with "kodi --pulse" which will leave pulse running. Then make sure the audio output settings are set to pulseaudio in kodi.
Reply
#11
(2022-10-06, 12:45)popcornmix Wrote:    "The best solution for overscan is to disable it on the TV. (It may be called "just scan", "screen fit", "HD size",
"full pixel", "unscaled", "dot by   dot", "native" or "1:1", among other names)."

My tv doesn't have any of those settings. It apparently tries to emulate a CRT in every respect. Believe me, I've been through all the menu settings. Sad


kodi (assuming you are on RPiOS bullseye) by default will disable pulseaudio when launched. That allsows kodi access to features like passthrough.
You could try launching kodi with "kodi --pulse" which will leave pulse running. Then make sure the audio output settings are set to pulseaudio in kodi.
Reply
#12
"kodi (assuming you are on RPiOS bullseye) by default will disable pulseaudio when launched. That allsows kodi access to features like passthrough.
    You could try launching kodi with "kodi --pulse" which will leave pulse running. Then make sure the audio output settings are set to pulseaudio in kodi."

Sorry, somehow my previous reply posted when I hit the wrong key and I can't edit it.

Anyway, I haven't touched my Pi in almost a week because there was no sound and also because the Netflix addon didn't work. The author fixed the Netflix addon and it's a long weekend here in Canada so I gave it another shot. I switched my AV receiver over to the Pi and had sound again! To be clear, this had nothing to do with me. I didn't have sound the last time I tried it but did this time. The Pi was running the entire time and still had Kodi running when I switched to it.

I'm not going to say this issue is resolved because I got sound back previously only to lose it again. However, with sound and Netflix both working, I'm happy - at least for now. If it goes again, I'll try you solution of leaving pulse running.

Thanks.
Reply
#13
And after 2 days, my sound has vanished again. And again, I did not touch any of the settings between when it worked and when it didn't.

I tried launching as "kodi --pulse" and got the pulse-audio settings showing up in the Audio settings but they didn't give me sound either. Also, I notice that the --pulse option isn't in the man page for kodi, but it definitely did what popxornmix said wrt giving me the pulse options.

I did confirm that I still had working sound at the Raspberry Pi OS level. I could play back a Youtube video through Chromium and the sound was there.

I tried going back in to Kodi through the normal menu option and resetting the sound settings to what worked previously, but still no sound.

So to recap: I have sound from the Pi OS to my external sound system. However sound from Kodi seems to come and go for unknown reasons.

The issue appears to be getting worse. I watched at least 2.5 seasons of Stranger Things when running LibreElec before I lost the sound. This was followed by weeks of no sound before I started experimenting with Raspberry Pi OS. Since then I've had a couple periods running Kodi on Raspberry Pi OS, none lasting more than 2 days, where I had sound with more than 3 weeks where I didn't.

I'd suspect that Kodi's playing around with the sound system (as per popcornmix) has a role, but I wouldn't expect that to be the case with LibreElec. However it is possible that that the LibreElec team doesn't modify Kodi enough in that regard.

At any rate, it appears to be a Kodi problem as the only common denominator and because the Raspberry Pi OS does have working sound.
Reply
#14
And on the third day after the sound quit, I got it back. I had tried Kodi yesterday and still no sound but today, I was able to watch the latest episode of The Rings of Power with full sound. That provided a clue as to the problem. When I started watching it, I had Arabic subtitles that I had to reconfigure back to English (within the Prime add-on). This suggests that the Prime add-on had been updated and that it may have been interfering with all Kodi sound.

After watching the episode, I shut down Kodi and restarted it. My TV room became filled with the various beeps and bloops that the Kodi interface emits that weren't there before I restarted it. Whatever was causing the sound outage required the Kodi restart to fully fix. This again suggests that it was an add-on update that was the culprit.
Reply
#15
It was a good run while it lasted. I've been using Kodi on my Pi4 for about 2 months - although not often during that time. I've watched a few Netflix shows in the last week without problems, except that once the sound output was set to its lowest setting (-60db). I thought maybe the no sound had come back but I always check the volume and other sound settings and that stood out.

I also had to suffer through a widevine update. I appreciate the work that makes it possible to do this, but there must be a better way than running a 32bit library and crippling the rest of the system to do it.

The big problem though was today the sound has gone again. It's not the volume nor the sound stream. And it's just Kodi sound. This is beyond frustrating.
Reply

Logout Mark Read Team Forum Stats Members Help
No sound from Kodi on my Raspberry Pi 40