On Startup No Sound for Music - But Videos Have Sound
#1
I have been using Kodi for several years now, for the most part with no problems.  I have Kodi 18.9 on a dedicated Ubuntu 18.04 LTS 64 bit pc.  A few weeks ago, I noticed an intermittent problem where when I started Kodi if I tried to play music there would be no sound.  You can go from album to album, song to song, doesn't matter which you choose, there is no sound.  But if I switch and play a video, then there is sound.  Further, after I play a video, I can then go back and play music and there is sound.  So a summary of the problem is that, on startup, there is no sound playing music.  The sound works for videos, and it will work for music if you play a video first, but I can't start it and play music before I play a video and still have sound.

At first I thought this might be a hardware problem.  But since Kodi video sound is fine, and it is only Kodi music sound that has a problem, I concluded this might be a Kodi issue.

As I said, the problem is intermittent, so it took me a while before I could capture a debug log.  But I was finally able to capture the problem in a log.

The debug is posted here geqomovuti (paste)

In the session captured by the log, I started off playing music, and there was no sound, but then I played a video and the sound came on.

One final note, this problem might be more likely to occur after Kodi has been turned off for an extended period of time.  I am not sure however.  This is just an impression formed based on what has happened.  Again, since the problem has been intermittent I can't really study it.
Reply
#2
Hmmm, log doesn't show any errors as far as I can see so my initial guess would be that it's pulseaudio related.  What happens if you start Kodi from a terminal and suspend pulse first?
pasuspender -- env KODI_AE_SINK=ALSA kodi  Do you get audio then ? (You will have to revisit your audio settings and select the correct output).
Learning Linux the hard way !!
Reply
#3
(2020-10-29, 10:14)black_eagle Wrote: Hmmm, log doesn't show any errors as far as I can see so my initial guess would be that it's pulseaudio related.  What happens if you start Kodi from a terminal and suspend pulse first?
pasuspender -- env KODI_AE_SINK=ALSA kodi  Do you get audio then ? (You will have to revisit your audio settings and select the correct output).
That command produces an error:

pasuspender -- env KODI_AE_SINK=ALSA kodi
Error: /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm not found[/syntax]

Also, how does a pulseaudio setting account for the fact that this only happens when playing music?  As I said, I can go from song to song to song, with no audio, and then as soon as I play a video there is sound and then I can go back and play music and hear the audio.  I am admittedly not that tech or code savvy, but doesn't this sound like a difference in how Kodi starts the audio after it has been suspended (i.e., after sitting idle for long time)?  Again, once the audio starts, it is not a problem.  Is there a difference in the manner in which Kodi initiates audio for videos vs. music?  Could this be the problem?
Reply
#4
(2020-10-29, 20:24)SoCalMichael Wrote: Is there a difference in the manner in which Kodi initiates audio for videos vs. music? 

Yes, there is.  There are two different players, one for video + audio and one for audio only.  I mentioned pulse for a couple of reasons, the first being that I have never experienced this but I use ALSA.  The second being that your logs shows pulse opening the audio output when playing music as 2 channel pcm but when playing video it opens 6 channels in passthrough.  Is it possible that your device (AVR/TV etc) is shutting down it's audio input and that simply sending a signal to it is not enough to wake it back up but that the change of mode from 2 channel to 6 is ?

If that's the case then Kodi has a setting to stop your receiving equipment from going to sleep (audio wise).  See https://kodi.wiki/view/Settings/System/A...vice_alive  If you don't have that enabled, it might be worth turning it on and seeing if it helps.
Learning Linux the hard way !!
Reply
#5
When you don't get audio from music do the GUI sounds as you navigate the UI stop as well? as GUI sounds are in PCM so this might be a PCM vs passthrough (as the video has AC3 audio in your log) issue where there's problems with PCM but not passthrough formats. Do you have any videos with AAC/flac/mp3 audio? as these would be output as PCM.
Reply
#6
(2020-10-30, 12:14)jjd-uk Wrote: When you don't get audio from music do the GUI sounds as you navigate the UI stop as well? as GUI sounds are in PCM so this might be a PCM vs passthrough (as the video has AC3 audio in your log) issue where there's problems with PCM but not passthrough formats. Do you have any videos with AAC/flac/mp3 audio? as these would be output as PCM.

Yes.  The GUI sounds are not there either.

I've found a workaround.  I Ubuntu Settings, Power, I set blank screen to "Never" and in Privacy I set screen lock to "off."  This has taken care of the problem and music audio now comes through all the time.

That being said, it is kind of weird that I would have to change these settings.  Kodi should be able to initiate the audio by itself.  But it is working now, and I love Kodi, so I can't complain.
Reply

Logout Mark Read Team Forum Stats Members Help
On Startup No Sound for Music - But Videos Have Sound0