Kodi Community Forum

Full Version: Losing sound since Kodi thinks pulseaudio isn't running
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am running Kodi 19.4 on raspberry OS lite 32 bit so no desktop environment. I have an issue that happens every few days where Kodi thinks pulseaudio isn't running as the kodi.log says that it can't create a socket and maybe it's due to pulseaudio not running. I checked by ps -A | grep pulse and it shows it as running with the original pid. As a test I turned on the autospawn in the pulseaudio config file and it started another process of PA but it didn't work so I turned off autospawn. The issue starts after I stop watching something as I can tell since I have GUI sounds turned on and they stop working as well. The issue seems to happen sometime after I connect and then disconnect my bluetooth headphones as the switch happens automatically from BT headphones to HDMI output. I edited the theme and added a restart kodi in the power menu but it takes for ever 5-10 minutes to restart kodi which works as I get sound again. Just wanted to see if someone can point me in the right direction.
Hard to tell what your issue is, without any further information. Pulseaudio can be quite tricky, a lot also depends on the startup scripts. Most reliable result with starting kodi in conjunction with pulseaudo I go with loginctl & linger. This will launch Kodi in a proper user session, that itself will launch pulseaudio in a proper way.

As an example of such startup procedure see here.