Kodi Community Forum

Full Version: Video freezes, then fast forwards to catch up (Ubuntu on Chromebox)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I've been running Kodi on Ubuntu on a Chromebox for a while without problems. When Kodi 17.2 came out, it wasn't working on Ubuntu 14.04, I thought something was wrong with my setup and went about messing with everything. I ended up starting fresh by getting rid of all my user data and even upgraded to Ubuntu 16.04.

Now Kodi runs, but when I'm watching video (local files), the video will sometimes freeze for about 30 seconds or a minute, then it will fast forward itself to catch up. During the time it's frozen the subtitles continue to play fine and the CPU doesn't seem to be higher than normal. Some files cause freezes while some don't, it seems consistent that the ones that do freeze are .mkv. Sometimes 20 minutes will pass without a freeze, other times only 3 minutes.

I've tried tinkering with all the rendering options and video settings I can think of but haven't been able to change the behavior.

My setup details are below followed by a pastebin link of a debug log that ran during a freeze+fast forward event. Any help would be appreciated, let me know if more information is needed. Thanks.

Kodi version: 17.3 (installed from team-xbmc/ppa using apt)
Version information:
Build: Kodi 17.3 Git: 20170525-nogitfound
Compiled: Nov 4 2012
Ubuntu version: 16.04
Architecture (output of uname -m): x86_64
Kernel (output of uname -r): 4.4.0-78-generic
Memory:1.8 GiB
Processor: Intel Celeron 2955U @ 1.40GHz x 2
Graphics: Intel Haswell Mobile
Disk: 13.6 GB

pastebin: https://pastebin.com/mHU2GgZN
i've seen that a lot when using the iplayertv plugin in 18a, but not local files
Does anyone have any guesses? I see this in the log a bunch but don't know what to make of it

Code:
CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 4366, Bufferlevel: 1, dropped: 1
21:31:04.543 T:140108191749888   DEBUG: CVideoPlayerVideo::CalcDropRequirement - hurry: 1
21:31:04.551 T:140108191749888   DEBUG: Previous line repeats 2 times.
21:31:04.551 T:140108191749888   DEBUG:

Also this:

Code:
21:31:05.143 T:140109626914560   DEBUG: ActiveAE::SyncStream - average error -9.224439 below threshold of 30.000000
21:31:06.148 T:140109626914560   DEBUG: ActiveAE::SyncStream - average error 532.715865 above threshold of 100.000000
21:31:06.655 T:140109626914560   DEBUG: ActiveAE::SyncStream - average error 0.715865, last average error: 532.715865

Are those any indication of what might be going on?
Check what the kernel says (dmesg) when it happens - it seems to me like a GPU hang.
Thanks for the advice! It looks like the only thing new in dmesg after a freeze is something like this:

usb 2-1: reset SuperSpeed USB device number 3 using xhci_hcd

My video files are on an external USB 3.0 harddrive so maybe something weird is going on there.
Oh, maybe I spoke too soon, it just did it again and I caught this:

[24308.566896] snd_hda_codec_hdmi hdaudioC0D0: HDMI: ELD buf size is 0, force 128
[24308.566942] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 0
[24421.629550] snd_hda_codec_hdmi hdaudioC0D0: HDMI: ELD buf size is 0, force 128
[24421.629584] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 0
[24497.303761] usb 2-1: reset SuperSpeed USB device number 3 using xhci_hcd
[24501.021341] snd_hda_codec_hdmi hdaudioC0D0: HDMI: ELD buf size is 0, force 128
[24501.021361] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 0
[24508.314131] snd_hda_codec_hdmi hdaudioC0D0: HDMI: ELD buf size is 0, force 128
[24508.314150] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 0
[24510.167384] snd_hda_codec_hdmi hdaudioC0D0: HDMI: ELD buf size is 0, force 128
[24510.167414] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 0
Try hardcoding your EDID information - this forum or libreelec's wiki has information about it, hint: drm_kms_helper - but I don't think this is the root issue. I'd also give kernel 4.11.3 a chance, easily installable via ubuntu mainline
I tried that kernel and it still froze. This is what dmesg had it in this time:

Code:
[ 1669.260076] perf: interrupt took too long (3965 > 3963), lowering kernel.perf_event_max_sample_rate to 50250
[ 2393.000354] traps: kodi.bin[5485] general protection ip:7f1b5d169ef7 sp:7f1b2cc7e370 error:0 in libcrypto.so.1.0.0[7f1b5d04e000+21a000]
[ 3991.634965] perf: interrupt took too long (4961 > 4956), lowering kernel.perf_event_max_sample_rate to 40250
[23314.189836] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd
[33666.008378] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd

I'll read about how to hardcode EDID information.
I switched to a USB 2.0 cable on my external harddrive and haven't had any freezes since. It looks like it's a problem with USB 3.0 on my setup. I'm fine with just using USB 2.0, its good enough for what I need as far as I can tell. The root problem isn't fixed but no one will know any difference.

Thanks for your help fritsch, without seeing the dmesg stuff I wouldn't have thought to try USB 2.0.