RPI3B+ Audio dropouts when playing audio

Hi folks,

Been using OSMC/raspbmc for quite a while across many different Raspberry Pis but I’m now getting an issue with audio drop outs.

Music files are stored on a NAS and accessed via samba, mysql server stores the library information, all on hard wired ethernet network. Issue occurs on a Raspberry Pi 3B+. Initially the same SD card was in a 3, I then transferred it into the 3B+, when I was having problems I tried a full wipe and reimage but that didn’t help out. Running latest OSMC version available via My OSMC with Aeon Nox skin. Hooked up via HDMI to a Yamaha AV receiver and then on to a Panasonic TV.

Drop outs appear apparently randomly during audio playback only, there are no dropouts during video playback. I had thought that the dropouts were only occuring during mp3/m4a playback (about 3/4 of my library) but it does appear that there are also dropouts when playing flac (remaining 1/4 of library) albeit much more rare. I would say that mp3/m4a experience dropouts 3 or 4 times a track on average, although sometimes this is much worse. Flac experiences dropouts maybe only once every 3 or 4 tracks.

Logs here of me playing a track that had 2 dropouts during its length. One occurred within first 30 seconds, one occurred towards the end. I had a quick glance at the logs but can’t see anything obvious…

https://paste.osmc.tv/uvinezadab

Audio playback is probably the main role of this raspberry pi, that and watching the occasional movie, and I’ve never really had any problems before.

On a slightly related topic, I always used to run the fullscreen audio playback (“back” from home screen) but now can’t as the screen saver doesn’t seem to kick in there any more. I have black after 1 minute because screen burn on a plasma tv is too easy. Can someone point me at the right setting to enable screensaver over fullscreen audio playback?

Thanks!

We recommend using ‘Best Match’ and not using ‘Keep audio device alive’ or ‘Send low volume noise’ unless you really have to.

Thanks, I’ll change them and see if they have any impact.

As it’s a fresh image though, are those set by default? I don’t remember setting them specifically but I could be mistaken.

The defaults are Optimised, keep alive (1 min) and low volume noise on. Just like you have set atm.

Don’t know why.

Thanks for that,

Although changing the settings to those recommended by grahamh have had no effect and I’m still getting dropouts. Music playback only, video is totally fine.

Thanks,

The log you posted is playing an m4a it seems and there’s loads of debug messages from ffmpeg. Could you repeat that with a vanilla mp3 so I can compare it with what my Pi3+ is saying, please?

Please just reboot, play the track and post the log url for complete logs.

Sorry, been a long time since I updated this thread - various life reasons.

I am still having the problems with dropouts, Rpi 3B+ running latest release of OSMC.

Fresh logs are here:
https://paste.osmc.tv/lipawaxoxa

One track was played with a dropout near the beginning (before screensaver kicked in) and then 2 or 3 towards the end of the track.

thanks.

Sorry, I uploaded a new log file and edited the above post to reflect as I realised that the first file I uploaded was full of errors relating to the weather provider - now fixed.

I seem to be having a similar problem on a Pi 3. I have OSMC/Kodi 17.6/Estuary Mod V1 skin. OSMC is the June release.

I’ve had my setup running for over 15 months regularly playing random music without any problem but in the last couple of days when a new track starts it stutters for a while then settles down. Video is never a problem. I don’t have automatic updates set so I can’t see what has caused this to happen all of a sudden.

The set up is Rasp Pi 3 > HDMI to TV > TV Optical Out to Powered Speakers. Media is on a USB Hard Drive connected to the Pi. Controls is via TV CEC. Ethernet is wired.

Music is played randomly via Party Mode and a Screen Saver shows pictures randomly from the same hard drive

Here’s a log the last time this happened and any help would be much appreciated.

This is still an ongoing problem, now running the July 2018 update.

If there is no concrete solution to this can someone let me know how to adjust the music playback buffer? It’s probably worth noting that I have in the past had stuttering when playing back videos but this was fixed by adjusting buffering and cache sizes in advanced settings xml. At that time though I didn’t have any problems playing back music. In fact this is the only problem I’ve had playing back audio since back in the days before gapless playback and when there was a bug that meant playlists wouldn’t automatically play the next track in the list unless you manually advanced.

I still have the issue you describe with my RPi3. Size of buffer and read ahead have no effect on fixing the audio dropouts. I seem to notice it more on files with EAC3 audio but it still occurs on DTS audio tracks as well. Just less often. It was never an issue until the kernel bump from 4.9.x. It’s annoying but I haven’t found any other way to fix it other than a kernel rollback which is not a good solution.

There might be a solution for this shortly.

Sam

Hmm, cryptic. Glad that it’s on the radar though as I’d rather not mess about rolling the kernel back if I can avoid it.

Worth switching to nightlies or will it be in the next update?

Cheers

I’m down to test anytime you’re ready Sam.

Not trying to be cryptic, but it may not resolve your issue.
Any solution will be rolled out as a regular update, so stay tuned.

Sam

Hi

Hopefully the issue is now addressed with the following commit:

I’d appreciate it if you could test this and provide feedback before we potentially release this as an update to other users. To test this update:

  1. Login via the command line
  2. Edit the file /etc/apt/sources.list
  3. Add the following line: deb http://apt.osmc.tv stretch-devel main
  4. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  5. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.

Sam

Thanks Sam, I appreciate you looking into this and the detailed guide for grabbing the update. I will test it out tomorrow morning (UK time).

Cheers

Hi Sam

I too had this problem.
Applied your fix and it all seems fine.

Thank you

Happy Days

Duncan

Hi Sam,

I’ve tested this for a while this morning. Unfortunately I’m still having the same problem. Maybe they are less frequent but it might be psychosomatic. MP3s and M4A files have intermittent cut outs. Sometimes there can be a coupleod minutes between drops, sometimes 2 or 3 drops within 15 second periods. FLAC files play more smoothly but still suffer from drops but maybe only once every few tracks.

Files are on an old Netgear NAS, everything connected up with gigabit ethernet, the Raspberry Pi is the slowest network device in the chain. All still very capable of streaming large 1080p videos including full DTS or Dolby 7.1 soundtrack for example with no dropouts or problems.

I was having this problem originally on the RPi 3 and now the 3B+. Although it doesn’t narrow it down much, with the Pi3 I was having no problems until one of the updates in late 2017 or early 2018 - possibly February or March. (Everything was in storage and not used during that period first update after coming out of storage was probably March 2018)

I previously thought I had noticed a correlation between increased system activity and the prevalence of drop outs. I tried stressing the system (switching between different views, performing artist and song searches) but couldn’t seem to affect it so maybe that element has improved (I note the Github comment about busy systems)

Viewing top via ssh while doing this, it pushed the main kodi.bin process above 100% CPU utilisation. Free RAM remained at about 250MiB.

Apologies for long rambling answer, hope it’s useful.
Cheers

Have you limited the Ethernet speed to 100 MBit (as GigE on Pi3+ has problems)? Have you tried playing the files from SD card?

Also if issue still happens after the update suggest to provide updated debug logs