Kodi Community Forum
Solved Video output judders every 5 seconds - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Solved Video output judders every 5 seconds (/showthread.php?tid=371707)



Video output judders every 5 seconds - pyksy - 2023-01-30

Logfile: https://pastebin.com/2HamJhmr

Issue: the video output judders every 5 seconds. The judder shows frame N, then duplicate frame N, then the the next frame and then skips a frame, as in:  ..., N-2, N-1, N, N, N+1, N+3, N+4, ...

It always happens every 5 seconds, no matter the resolution or frame rate or video format. Even the screensaver (I'm using shadertoy) judders every 5 seconds. I get no judder when running any other opengl apps, like for example glmark2.

I'm running Kodi 20.0 from Christian Marillat's multimedia repository (kodi_5:20.0-dmo2; "Git:20230116-nogitfound") on Debian Unstable. The judder issue was already present in Kodi 19, but this is the first time I'm really investigating the issue. CPU/GPU is an Intel i5-10400T processor, chipset is H470, in a Lenovo ThinkCentre M70q. Current kernel is 6.1.0-3-amd64 from Debian.

In the attached logfile I launch Kodi and then do nothing until the screensaver kicks in (delay is set to 1 minute). Every 5 seconds the screensaver judders as described above and these SwapBuffers related debug lines get printed to the debug log:
2023-01-30 23:17:15.238 T:10924 debug <general>: CGLContextEGL::SwapBuffers: sync check blocking
2023-01-30 23:17:15.255 T:10924 debug <general>: CGLContextEGL::SwapBuffers: sync sleep: 16272


The issue manifests with default user configuration (.kodi directory removed), though the logfile is from my real environment.

I'm not sure what further info would be useful, so please let me know if there's something else that I can provide.


RE: Video output judders every 5 seconds - fritsch - 2023-01-30

a) Can you disable omlsync again via your advancedsettings.xml? Better?
b) What happens here is that your Desktop / Driver what so ever refuses to swapBuffer, which is why you see this sync sleep there, to force a swap. You are running the modesetting driver, right? And no chance for you to switch back to the intel driver?


RE: Video output judders every 5 seconds - pyksy - 2023-01-31

Hi fritsch,

thank you for looking into my issue.

a) setting omlsync to false does not fix the juddering, there just are no error messages printed to the debug log anymore.
b) I'm not sure what this means, so I need to investigate and get back to you. FWIW package xserver-xorg-video-intel is installed and xserver-xorg-video-modesetting is not installed.


RE: Video output judders every 5 seconds - pyksy - 2023-01-31

And in case it helps, here's the Xorg.log https://pastebin.com/p6wpm0u3


RE: Video output judders every 5 seconds - pyksy - 2023-01-31

Hi again fritsch,

so the answer to b) was yes, I was using the modesetting driver, and yes, switching to the Intel driver does indeed fix the juddering problem.

Thank you so much for your help! This issue is now solved.


RE: Video output judders every 5 seconds - fritsch - 2023-01-31

Yeah - welcome. Problem is: It's broken since many years ... but basically no one cares about the modesetting X11 driver -> filing a bug with your distribution might be a good thing to do. It obvously misses frames ...


RE: Video output judders every 5 seconds - fritsch - 2023-01-31

Please mark your thread solved.


RE: Video output judders every 5 seconds - izprtxqkft - 2023-01-31

well that was excellent
@pyksy kudos on providing all the information and performing tasks as a system admin as needed
@fritsch kudos on identifying the problem from the information and acting swiftly

i wish i could make this a poster for how support should go


RE: Video output judders every 5 seconds - fritsch - 2023-01-31

Upstream driver issue reported: https://gitlab.freedesktop.org/xorg/xserver/-/issues/928


Video output judders every 5 seconds - Klojum - 2023-01-31

Thread marked solved.