Solved Tearing with Intel HD4000
#1
I'm using ubuntu 13.10 and have problems getting xbmc to play nice with video playback.

Using window mode playback is fine, but in fullscreen mode I have massive tearing and slow playback (both 12.2 and GIT), I've spent the better part of the day trying to figure out how to get smooth perfect playback, but no success.

Finally I found the option "TearFree" to add in xorg and finally the tearing is gone. However, playback is not smooth, it cannot sustain the framerate it's supposed to. 50hz video is playing at 38-45 fps.

lower hz content is playing at the right fps, but still it's not perfect. And I notice the missed counter going crazy.

Any suggestions ?

EDIT: Cpu usage is at all times low on all 8 cores.
Reply
#2
Please check this how too it fixed my hd2500 tearing on 1080i. Harder to play than 1080p.
http://forum.xbmc.org/showthread.php?tid=165707
Good luck. Make sure you disable window compositing. That is triple buffering frames. Tears a lot. Too much!
Reply
#3
Thanks for your suggestion!

Unfortunatly there is no build for ubuntu 13.10 vaapi-vpp

If I disable compositing will unity work ?
Reply
#4
Hi, yes it should. Just less special affects and should be reversible. Compiz should do the trick. I am not on unity any more. Xubuntu is my desktop choice for now. You might have to look a bit for some tuts. Wish I could offer more.
If they have not built one for saucy, you can go about building it yourself. Builds on Intel machines are very fast. Make sure you u use make -j4 if you have a quad or 4 thread machine.
You can follow

http://wiki.xbmc.org/index.php?title=HOW..._for_Linux
But when you clone it point Git to the source wsnipex is using. That branch. You might have to ask him. His ppa likely has the dependencies you need to build, too. Building is low risk. Just takes patience.
I would try disabling compositing first.
Reply
#5
it seems composite is tied into 13.10, I added

Code:
Section "Extensions"
    Option "Composite" "Disable"
EndSection

to xorg.conf and it left me without a login screen, only background was loaded.

Next step I tried xubuntu-desktop, and first impression of the enviroment is nice, but unfortunatly xbmc experience was far worse, I got slow playback, massive tearing and a new one - terrible audio sync.
Reply
#6
I ran xbmc standalone on a seperate X session and got perfect playback. I guess I will look into running a seperate X session on each monitor output on my gfx card, it would be the perfect solution I think - hope it's possible.
Reply
#7
In xubuntu you just have to choose settings -> windows manager tweaks -> compositor tab then deselect enable display compositing. Please try fernet mentas builds on Gotham not frodo. sudo apt-add-repository ppa:wsnipex/xbmc-fernetmenta-master
You still need vaapi drivers for Intel. They are way better. Buffering, vaapi... Glad you got it sorted. Ubuntu compositing was the reason for my switch to xubuntu. I tried mainline frodo and it was no where as good as fernertmentas branches. For audio try analog sound first. You need new kernels for HD HDMI goodness.
Reply
#8
(2013-10-21, 20:32)KRA77 Wrote: I got slow playback, massive tearing and a new one - terrible audio sync.
Forgot to mention. Frodo with audio engine goes nuts if audio is set up wrong on xubuntu/pulse. On a new install. I usually first kill compositing. Go to settings system audio set to analog even if hdmi and set 2.0. Reset this later once all a OK. System video vertical sync to always- to kill tearing. Back to setting menu and set match refresh rate for a clearer picture. Sync playback to display to on. Video sync dupe/drop.
You can try https://launchpad.net/ubuntu/+source/intel-vaapi-driver to get vaapi to work. For 24p sync
/home/xbmc/.xbmc/userdata/advancedsettings.xml
Code:
<advancedsettings>
   <loglevel hide="false">0</loglevel>
  <cputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
  <gui>    
    <algorithmdirtyregions>3</algorithmdirtyregions>
    <nofliptimeout>0</nofliptimeout>
  </gui>    
<video>
  <latency>
    <delay>0</delay>
    <refresh>
      <min>23</min>
      <max>24</max>
      <delay>175</delay> <!-- set to zero or adjust if audio seems out of sync with 24p movies -->
     </refresh>
  </latency>
</video>
</advancedsettings>
Reply
#9
Theres a lot to be said for sticking to 12.04 LTS for an XBMC machine.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
Thanks for suggestion guys, I must admit I have too much love for bleeding edge to stick with a LTS release.

I've also found that part of my problem is related to a dual monitor setup. Especially vsync seems to be linked to primary monitor only.
My goal is to have xbmc on hdmi2 and my desktop on hdmi1 and use both at same time.

Out of frustration, late last night I test Windows7, and preliminary test showed no tearing and butter smooth playback. But I don't want windows Sad Also I had problem where xbmc would just minimize when not in focus, and "fullscreen window mode" doesn't play smooth.

Also, can't seem to find a solution for running seperate X session on each HDMI port, seems you need 2 graphic cards for that.
Reply
#11
use the build from my fernetmenta-master ppa, they do support multi monitor.
Reply
#12
What to you mean by support multi monitor ?

I was using the Team XBMC Nighly PPA, in your sig

ppa:wsnipex/xbmc-fernetmenta-master is different ?
Reply
#13
@KRA77
https://launchpad.net/~wsnipex/+archive/...nta-master
deb http://ppa.launchpad.net/wsnipex/xbmc-fe...ter/ubuntu saucy main
deb-src http://ppa.launchpad.net/wsnipex/xbmc-fe...ter/ubuntu saucy main
https://launchpad.net/~team-xbmc/+archive/xbmc-nightly
deb http://ppa.launchpad.net/team-xbmc/xbmc-nightly/ubuntu saucy main
deb-src http://ppa.launchpad.net/team-xbmc/xbmc-nightly/ubuntu saucy main
yes different. as far as i know-- fernetmenta master has lots of nice fixes that seem to go to main line eventually. win7 does work well- good mature drivers. a little bit of research you should be able to get saucy going. good vaapi drivers are essential. building your own from git gives you freedom to off road a bit.
Reply
#14
Thanks for more suggestions guys, I'm stoked. The build from fernetmenta-master ppa is freaking awsome !!

I've tried 24p, 50i and 50p - all worked perfect, xbmc in fullscreen on one output and deskop on another, seamless using mouse and keyboard on both. This is just what I've been looking for.
Reply
#15
I just like to update here, I had done so much testing - different settings, tweaks and config files, and I rather liked Xubuntu over normal Ubuntu so I did a fresh install of Xubuntu to get rid of all my previous efforts and get a clean install.

I then continued to install compton to get tear free composition in Xubuntu.

And the important part, I still have perfect tearfree and smooth playback

no tweaks, no xorg settings, no special drivers, no disable compositing. Just this special XBMC build.
Reply

Logout Mark Read Team Forum Stats Members Help
Tearing with Intel HD40000