Forum
Audio only stutter - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: Audio only stutter (/thread-2877.html)

Pages: 1 2 3 4


RE: Audio only stutter - Nachteule - 8th Apr, 2018 09:07 PM

Ok, so did it work before you have had your kernel update issue ?


RE: Audio only stutter - Skywatch - 8th Apr, 2018 10:20 PM

I hope you don't mind me jumping back in here, but could you copy some music files from the HDD to the SD card and try playing them from the sd card? That would help see if the issue is in the usb route to storage. Just a thought.

Also, do you have a spare sd card that you could put a fresh image on to see if maybe there is corruption on the current card that only affects music only playback?

I have a probable corruption issue with one pi2 now where databases no longer load. Everything else works fine except sometimes audio goes out of sync with video. A reboot and it's back in sunc again.
I'm going to rebuild that system from scratch soon.


RE: Audio only stutter - Roy Terhaar - 8th Apr, 2018 11:17 PM

(8th Apr, 2018 09:07 PM)Nachteule Wrote:  Ok, so did it work before you have had your kernel update issue ?

Yes it did work before that issue.
But right now everything seems to be unstable now.
I have no clue what's going on.
Reboot does not seem to work on first try; on second try it does...
And now it refuses to start kodi; it shows the splash screen but it returns to console prompt.
I am going to have some more tries; i will restore a snapshot but I have no time right now so will do that later...

What I also noticed running top is that a mount.ntfs process was still running, probably for the Seagate harddrive (the one that does not contain my music). This drive did not show up in the GUI if you navigate to Video. However if you go to Files if does show up and you can access files. So maybe there is some kind of obscure mount problem too.
I will inform you once I have done some more tests.

(8th Apr, 2018 10:20 PM)Skywatch Wrote:  I hope you don't mind me jumping back in here, but could you copy some music files from the HDD to the SD card and try playing them from the sd card? That would help see if the issue is in the usb route to storage. Just a thought.

Also, do you have a spare sd card that you could put a fresh image on to see if maybe there is corruption on the current card that only affects music only playback?

I have a probable corruption issue with one pi2 now where databases no longer load. Everything else works fine except sometimes audio goes out of sync with video. A reboot and it's back in sunc again.
I'm going to rebuild that system from scratch soon.

Good suggestion; I will also try playing music file from SD card. With and without the external drives (removing the cables).


RE: Audio only stutter - Roy Terhaar - 12th Apr, 2018 09:39 PM

Time to report back Dodgy

What did I do and test so far?
- I have installed a snapshot to get my system stable again
- I have done apt-get update, apt-get upgrade running 4.14.33+ now
- I have removed addons that were not used (just to be sure they don't interfere or use resources)
- Checked audio and video settings once again

I have tested and video files seem to run fine (as expected) so I focused more on the audio files playing flac and mp3 files. I did not notice any difference in the issue; both formats having same stutter issue.
I have tried playing the same audio files from either the external disk or the SD card; form both locations stutter issue exists.

Playing without advancedsettings.xml file will often (not always) display CAESinkPi:AddPackets Underrun (delay:0.00 frames:xxxx) message in kodi.log. Sometimes it will also crash kodi.
If I use following advancedsettings.xml file I don't get any Underrun messages in kodi.log, but the occasional stutter still exist, however kodi does not seem to crash anymore using this setup:

<advancedsettings>
<cache>
<buffermode>1</buffermode>
<memorysize>125829120</memorysize>
<readfactor>40</readfactor>
</cache>
</advancedsettings>

Is it possible that something is claiming/locking the HDMI interface for a moment causing kodi to stutter?
Maybe something in the kernel?

Also found following link using google:
https://discourse.osmc.tv/t/playback-video-sound-stuttering-after-march-5th-update/71323/40
Not sure if it helps in the right direction, but maybe worth mentioning...


RE: Audio only stutter - Nachteule - 12th Apr, 2018 10:42 PM

(12th Apr, 2018 09:39 PM)Roy Terhaar Wrote:  Also found following link using google:
https://discourse.osmc.tv/t/playback-video-sound-stuttering-after-march-5th-update/71323/40
Not sure if it helps in the right direction, but maybe worth mentioning...

Seems that kernel 4.14 is not the best for playing audio.

Found this issue, maybe same problem you have

So, you can install kernel 4.9 from stable repo and see if it makes any difference

Code:
sudo apt-get install linux-image-bcm2836=4.9.91+-1522343430



RE: Audio only stutter - Roy Terhaar - 13th Apr, 2018 08:03 AM

(12th Apr, 2018 10:42 PM)Nachteule Wrote:  
(12th Apr, 2018 09:39 PM)Roy Terhaar Wrote:  Also found following link using google:
https://discourse.osmc.tv/t/playback-video-sound-stuttering-after-march-5th-update/71323/40
Not sure if it helps in the right direction, but maybe worth mentioning...

Seems that kernel 4.14 is not the best for playing audio.

Found this issue, maybe same problem you have

So, you can install kernel 4.9 from stable repo and see if it makes any difference

Code:
sudo apt-get install linux-image-bcm2836=4.9.91+-1522343430
Installing 4.9.91+-1522343430 solves the audio issue; the stutter is now gone!
So for now I will stick with this version until the audio issue gets resolved in some future build.
Thanks again for your help.


RE: Audio only stutter - Skywatch - 13th Apr, 2018 04:51 PM

Great news - Well done. Smile


RE: Audio only stutter - Nachteule - 13th Apr, 2018 10:46 PM

(13th Apr, 2018 08:03 AM)Roy Terhaar Wrote:  
(12th Apr, 2018 10:42 PM)Nachteule Wrote:  
(12th Apr, 2018 09:39 PM)Roy Terhaar Wrote:  Also found following link using google:
https://discourse.osmc.tv/t/playback-video-sound-stuttering-after-march-5th-update/71323/40
Not sure if it helps in the right direction, but maybe worth mentioning...

Seems that kernel 4.14 is not the best for playing audio.

Found this issue, maybe same problem you have

So, you can install kernel 4.9 from stable repo and see if it makes any difference

Code:
sudo apt-get install linux-image-bcm2836=4.9.91+-1522343430
Installing 4.9.91+-1522343430 solves the audio issue; the stutter is now gone!
So for now I will stick with this version until the audio issue gets resolved in some future build.
Thanks again for your help.

Ok, that confirmed my suspicions. I've added a link to your post to this issue


RE: Audio only stutter - Roy Terhaar - 21st Jul, 2018 03:50 AM

Just want to post a little update.
My last working version is on kernal 4.9.96 which works just fine on the audio.

Since 4.14 is supposed to be the latest stable version, I thought let's give it a try.
Unfortunately 4.14.54+ still has the audio stutter issue and if I looked at the other thread where Nachteule posted my issue, it seems that even 4.17 still has this issue.

Apart from this I checked if all my other stuff was still working in 4.14.54+.
I found out that samba is a bit different now:
- it doesn't automatically start at boot anymore
- the service autostart/start/stop feature in xbian-config (cmd line and kodi gui) does not seem to work anymore.
- samba will not start anymore using cmd sudo service (x) start

So something changed there.
I could resolve it however with
sudo nmbd
sudo smbd
and putting these in my boot script

But I wonder how it is supposed to work in 4.14 in xbian and I could not find that much info on it.

If it is a real issue I can start a new thread for this just to not contaminate this thread, but I thought l'll ask first...Undecided

In the mean time I think I will still be using 4.9.96 though.Dodgy

Any reactions/responses please?


RE: Audio only stutter - Nachteule - 21st Jul, 2018 04:16 AM

(21st Jul, 2018 03:50 AM)Roy Terhaar Wrote:  Just want to post a little update.
My last working version is on kernal 4.9.96 which works just fine on the audio.

Since 4.14 is supposed to be the latest stable version, I thought let's give it a try.
Unfortunately 4.14.54+ still has the audio stutter issue and if I looked at the other thread where Nachteule posted my issue, it seems that even 4.17 still has this issue.

Yep, the issue is still there. But I can not wait longer until it fixed. You can revert to 4.9, thats the reason why 4.9 kernel is still available Dodgy

Maybe you can add a post to that issue at github helping the people fixing that issue

Quote:Apart from this I checked if all my other stuff was still working in 4.14.54+.
I found out that samba is a bit different now:
- it doesn't automatically start at boot anymore
- the service autostart/start/stop feature in xbian-config (cmd line and kodi gui) does not seem to work anymore.
- samba will not start anymore using cmd sudo service (x) start

So something changed there.
I could resolve it however with
sudo nmbd
sudo smbd
and putting these in my boot script

But I wonder how it is supposed to work in 4.14 in xbian and I could not find that much info on it.

Nothing been changed, that's the reason why you could not find anything. Just tested, I can enable/disable Samba via xbian-config->Services, works as expected.

Btw, smbd never runs per default, it will be spawned by inetd process if a request comes in. I have added a function to switch between inetd and service mode of Samba, but this part has not been officially released, that function is still dormant.

Quote:If it is a real issue I can start a new thread for this just to not contaminate this thread, but I thought l'll ask first...Undecided

In the mean time I think I will still be using 4.9.96 though.Dodgy

Any reactions/responses please?

I you like you can open new thread, Samba issue is OT here

Revert ot 4.9 is good decision in your case Smile


RE: Audio only stutter - Roy Terhaar - 21st Jul, 2018 04:43 AM

(21st Jul, 2018 04:16 AM)Nachteule Wrote:  Nothing been changed, that's the reason why you could not find anything. Just tested, I can enable/disable Samba via xbian-config->Services, works as expected.

Btw, smbd never runs per default, it will be spawned by inetd process if a request comes in. I have added a function to switch between inetd and service mode of Samba, but this part has not been officially released, that function is still dormant.

In that case there must be something wrong with my inetd configuration, becasue it does not start once I connect from laptop or pc.
Also if nmbd and smbd have been started (see below) and directories are perfectly accessible from the network, xbian-config still reports (with no / no on Autostart / Running columns) that samba has not started...
Clicking further on samba in the menu to change Autostart, (Re)start or Stop options does not change anything in respect to the processes.
---
Terminal
xbian@xbian ~ $ ps -elf | grep nmbd
5 S root 3367 1 0 83 3 - 5411 - 11:43 ? 00:00:05 nmbd
1 S root 3368 3367 0 83 3 - 5271 - 11:43 ? 00:00:00 nmbd
0 S xbian 12348 12143 0 80 0 - 962 pipe_w 20:31 pts/4 00:00:00 grep --color=auto nmbd
xbian@xbian ~ $ ps -elf | grep smbd
5 S root 3380 1 0 83 3 - 8510 - 11:43 ? 00:00:00 smbd
5 S root 3384 3380 0 83 3 - 7983 - 11:43 ? 00:00:00 smbd
1 S root 3386 3380 0 83 3 - 7986 - 11:43 ? 00:00:00 smbd
1 S root 3396 3380 0 83 3 - 8507 - 11:43 ? 00:00:00 smbd
0 S xbian 12407 12143 0 80 0 - 962 pipe_w 20:31 pts/4 00:00:00 grep --color=auto smbd
5 S root 17394 3380 0 83 3 - 8608 - 19:20 ? 00:00:00 smbd
---
I found out that in inetd.conf starting of nmbd and smbd was commented out using 3 ?!? '#' characters. Weird... wonder how that happened...
Now working as you described. Thanks....


RE: Audio only stutter - Roy Terhaar - 10th Aug, 2018 07:10 PM

I am not sure if it helps, but I have recently changed my hardware from rPi 3b to rPi 3b+ and tried once again to update to latest kernel (4.14.58+) and the stutter problem seems to be gone!
I am not sure if that is due to kernel change or hardware change... but I just want to report it back.CoolSmile


RE: Audio only stutter - Skywatch - 11th Aug, 2018 12:41 AM

Thanks for the update - good sharing of info.

My money is on the kernel update as in the early days of I2S DAC on pi it was always a case of crossing fingers whenever an upgrade was installed.

Lets hope you can just enjoy it now. Smile


RE: Audio only stutter - Nachteule - 14th Aug, 2018 04:41 AM

(10th Aug, 2018 07:10 PM)Roy Terhaar Wrote:  I am not sure if it helps, but I have recently changed my hardware from rPi 3b to rPi 3b+ and tried once again to update to latest kernel (4.14.58+) and the stutter problem seems to be gone!
I am not sure if that is due to kernel change or hardware change... but I just want to report it back.CoolSmile

Did you changed sd-card as well? I do not have any good explanatiion why your issue has gone, because it is still not fixed in kernel 4.14 Huh

The major difference between Pi3B and Bi3B+ is the lan driver, maybe the lan driver used for Pi3B (smsc95xx) has bad influence Tongue


RE: Audio only stutter - Roy Terhaar - 14th Aug, 2018 04:53 AM

(14th Aug, 2018 04:41 AM)Nachteule Wrote:  
(10th Aug, 2018 07:10 PM)Roy Terhaar Wrote:  I am not sure if it helps, but I have recently changed my hardware from rPi 3b to rPi 3b+ and tried once again to update to latest kernel (4.14.58+) and the stutter problem seems to be gone!
I am not sure if that is due to kernel change or hardware change... but I just want to report it back.CoolSmile

Did you changed sd-card as well? I do not have any good explanatiion why your issue has gone, because it is still not fixed in kernel 4.14 Huh

The major difference between Pi3B and Bi3B+ is the lan driver, maybe the lan driver used for Pi3B (smsc95xx) has bad influence Tongue

As a matter of fact I did change the SD card, but for a different reason; the Lexar was giving me troubles with the system backup. So I changed it for Samsung Evo plus. So I got unpredictable write errors with the Lexar card; sometimes backup was ok for few days and then it gave me errors. As a workaround I resored a backup that was ok and then it was ok for the next few days. But in the end I needed something more structual so I bought a new one different brand...