Solved Linux: Video smooth but jerk severely every 15 minutes?
#1
Hi,

I dont know if this is the same problem as http://forum.xbmc.org/showthread.php?tid=203316 and I didn't want to hijack his thread so i thought i would post the video symptoms I am seeing and see if anyone can offer an explanation?

I have googled and checked the forums and i think i understand about the 23.976 vs 24hz/60hz problems but please feel free to educate ;-)

I have smooth picture at 24hz and 60hz, the TV adapts quite nicely and shows the correct hz. But when i play anything ( 23.976,24,60hz) every 14 minutes or so i get a huge 10 frame or so gap where the picture jumps This seems to happen at all source hz. . I enabled the video info 'o' option and the error rate was reporting as between 0 and 4%, there didn't seem to be any problems that I could identify and i have tried copying the films to memory SSD too to rule out network.

I have followed the smooth video guides and have set always auto adjust frame rate and 24hz (tried 60hz too) and various other options. (quite happy to post screen shot/debug log if as needed).

here is a section of the log file that i think is relevant to start with:

Code:
21:59:15 T:140287045666560   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
21:59:15 T:140285342365440   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:841509.414000, should be:32000.000000, error:-809509.414000
21:59:15 T:140287045666560   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
21:59:15 T:140285367543552   DEBUG: CVideoReferenceClock: Attaching glX context
21:59:15 T:140285342365440   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:139403.239000, should be:32000.000000, error:-107403.239000
21:59:15 T:140285367543552   DEBUG: CVideoReferenceClock: detected 1 vblanks, missed 75, refreshrate might have changed
21:59:15 T:140285367543552   DEBUG: CVideoReferenceClock: Received RandR event 89
21:59:16 T:140285367543552   DEBUG: CVideoReferenceClock: output of nvidia-settings -nt -q RefreshRate3: 23.976 Hz
21:59:16 T:140285367543552   DEBUG: CVideoReferenceClock: Detected refreshrate by nvidia-settings: 23.976000 hertz, rounding to 24 hertz
21:59:16 T:140285367543552   DEBUG: CVideoReferenceClock: detected 7 vblanks, missed 13, refreshrate might have changed
21:59:19 T:140285342365440   DEBUG: CDVDPlayerAudio:: Duplicating packet of 32 ms
21:59:20 T:140285359150848   DEBUG: CPullupCorrection: detected pattern of length 1: 41708.33, frameduration: 41708.333333


PS: Its a Zotac D2550 AMD motherboard and GT680 onboard Nvidia GPU
XBMC is 13.2 Git.0f3db05 (Compiled Aug 17 2014)
Have Tried Nvidia driver 304 and 340

Thanks in advance for any help/advice.

*Solved*
In the end there were two problems, jerky video and sound not passing through properly.

Symptoms:
- Video jerking severly every 14-20 minutes or so and lines in the log file saying 'vblank, missed' (of more than 5 frames or so).
- Sound weak and from wrong speakers, Sound Settings were not showing TrueHD and DTS MA

The solution was four steps and can be found in the various posts in this thread:

1. Installed FernetMenta's repo of an early XBMC 14, it contains some video buffer tweaks that hopefully will go into trunk at some point.
2. Installed Nvidia 3.40 video drivers
3. Downloaded the marantz.bin EDID from forum (you cans search the forum)
4. Used a new xorg.conf to fix resultion and sound device issues (DFP-1) and to load the working EDID.

THANKS to both fritsch and FernetMenta for their time and patience in solving this issue Smile
.

result:

No video jerks (vblank, missed) lines in the xbmc.log and therefore smooth picture right through.
24hz,50hz,60hz/fps video all smooth and no problems.
Sound Settings now shows TrueHD and DTS-MA
All Sound including DTS-MA and True-HD working and through correct speakers
Reply
#2
Post the full log, please. Also the output off /usr/lib/xbmc/xbmc-xrandr is relevant.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
As requested. blimely your a busy bloke fritsch, where do you find the time? glad you do though Smile

The log is quite big, i paused the video just after the problem hit, so it shouldn't be too hard to find i hope.

logfile: https://db.tt/CTqJ2t6c

xrandr: http://paste.ubuntu.com/8218123/

ps for anyone wondering the xrandr output was obtained as follows:

Code:
DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr|pastebinit
Reply
#4
Modes are fine.
You can disable vaapi, it's not used on your hw.

Can you update the kernel to .15 or even .16?

Looks like audio driver stops wanting data at a point.

Will be mostly AFK. Greetings from gran canaria :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Greetings from the UK mate Wink I can certainly try - does this thread look sensible to try or is there an easier/more relevant way?

http://ubuntuforums.org/showthread.php?t=311158
Reply
#6
Google 'ubuntu mainline' find the thee DEB files in 3.16.x folder (_all _ generic for headers and _image for your arch) and installiert them.

Also update && upgrade your ubuntu via apt-get first.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
(2014-09-02, 22:03)omegadcuk Wrote: I have followed the smooth video guides and have set always auto adjust frame rate and 24hz (tried 60hz too) and various other options. (quite happy to post screen shot/debug log if as needed).

What guides, would you have a link. Those guides on this forum a rather outdated and may be wrong with current versions.

Are you saying 24hz is ok and 23.976 is not?
Reply
#8
Thanks for the reply FernetMenta - Guide was probably the wrong term, more like helpful posts! Annoyingly i can't find the specific ones again, they were just various posts suggesting things like use Auto Adjust Frame rate and Sync Video resample Audio etc.

Regardless of what video player settings I try everything suffers a sudden Jerk every 14-20 minutes or so. Its not a deal breaker but is really distracting (for me lol) and I'm sure that at one point on 12.x it was smooth right through most 23/24/60 hz TV and films.

PS: I have tried re-installing XBMC and leaving video alone, as well as tweaking settings one at a time..

As fritsch said i am looking at uprading to 3,16,x. will post back with results when done.

Anything else i can do to help look into this please let me know, I will help where I can.
Reply
#9
oh dear that didn't go well lol.

Installed Kernel 3.16 using the following:

this upgraded everything to the latest stable releases and seemed fine after a reboot:
Code:
sudo apt-get update
sudo apt-get upgrade

this was the kernel update which appeared to go well:
Code:
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb
sudo dpkg -i linux*.deb

But now XBMC fails to load and it just goes to the Ubuntu login screen - which appears to work fine.

Have tried toggling the boot to XBMC option on login, just jumps back to Ubuntu login screen.

xbmc.log doesn't even appear to have been created Undecided

I will start googling xbmc not starting up and see what i can sort out, but if anyone has any ideas?
Reply
#10
check /var/log/Xorg.0.log, maybe the nvidia drivers need a reinstall
Reply
#11
reinstall the nvidia driver. if you don't have nvidia-kernel-dkms, the driver could not be recompiled for the new kernel.

Again Smile
Are you saying 24hz is ok and 23.976 is not?
Reply
#12
just got back from a walk lol. Will re-install nvidia shortly and post back.

ah sorry i see your question now - apologies :-)

"Are you saying 24hz is ok and 23.976 is not?"

No, its all the same mate.

The info reports 23.976hz as the source rate. I am playing video in 24hz mode on the TV.
It is acceptable in terms of smoothness but jumps 7 or so frames every 14 minutes or so

With a true 24hz source (according to 'o'), TV switches to 24hz again, but the same happens.

With a 60 hz source the TV adapts to 60hz but jerks in the same way.

The timing of the jump varies from 8 minutes to 20 odd minutes, depends on the content i think?
Also I seem to have a choice:

- perfectly smooth video all the way through and sound goes out of sync.
- jerks every so often but sound is in sync.
Reply
#13
Your tv tells 24 for both: 24.0 and 23.976 fps. If you post the xbmc-xrandr _while_ playing we see what mode it is really running.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
will do when i can get XBMC running again. Reinstalling Nvidia (remove/install) didn't work.

googling lol

hmmm ok this line in the xorg.0.log does not look good:

Failed to load the NVIDIA kernel module

could be a clue methinks? lol,

Code:
[    10.150] (WW) "glamoregl" will not be loaded unless you've specified it to b                               e loaded elsewhere.
[    10.150] (II) "glx" will be loaded by default.
[    10.150] (WW) "xmir" is not to be loaded by default. Skipping.
[    10.150] (II) LoadModule: "glx"
[    10.153] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/libglx.so
[    10.261] (II) Module glx: vendor="NVIDIA Corporation"
[    10.262]    compiled for 4.0.2, module version = 1.0.0
[    10.262]    Module class: X.Org Server Extension
[    10.262] (II) NVIDIA GLX Module  304.117  Tue Nov 26 21:45:09 PST 2013
[    10.262] Loading extension GLX
[    10.262] (II) LoadModule: "nvidia"
[    10.262] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_dr                               v.so
[    10.272] (II) Module nvidia: vendor="NVIDIA Corporation"
[    10.272]    compiled for 4.0.2, module version = 1.0.0
[    10.272]    Module class: X.Org Video Driver
[    10.281] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check                                your

googling, more going to do a full re-install tomorrow night if nothing pops up.

Thanks for all your replies guys, i really appreciate the help.
Reply
#15
Right XBMC is back up and running. Had to un-install Kernel 3.16 for now though and re-install/full do upgrade etc.

Will play some movies and post results as requested when i get the chance.

Thanks again guys!
Reply

Logout Mark Read Team Forum Stats Members Help
Linux: Video smooth but jerk severely every 15 minutes?0