[SOLVED] Screen tearing with Intel HD Graphics on 7.0

Everything about X, Gnome, KDE, ... and everything running on it

[SOLVED] Screen tearing with Intel HD Graphics on 7.0

Postby Nyromith » 2013-05-17 13:40

Hello,

I'm using Debian 7.0 with XFCE, and suffer from tearing when moving windows, watching videos, and when a graphical screensaver is on. Is there a way to turn on Vsync or something similar?

My CPU is Core i5 3570 with HD Graphics 2500.

*Already tried turning composition on and off.

Thanks.
Last edited by Nyromith on 2013-05-20 10:30, edited 1 time in total.
Nyromith
 
Posts: 16
Joined: 2013-05-17 13:29

Re: Screen tearing with Intel HD Graphics on 7.0

Postby vbrummond » 2013-05-17 14:08

Is your chip using sna? To find out:
Code: Select all
grep SNA /var/log/Xorg.0.log


It will say something like 'SNA initialized with Broadwater backend' if so. Enabling SNA causes tearing for me, but I think sandy bridge stuff requires it.
System: Retina 5K iMac, 27-inch, Late 2015 - Intel i5-6600 3.3ghz, 8gb RAM, AMD Radeon R9 M395 2048 MB
OS: Mac OS 10.12
vbrummond
 
Posts: 4417
Joined: 2010-03-02 01:42

Re: Screen tearing with Intel HD Graphics on 7.0

Postby Nyromith » 2013-05-17 14:53

This was not enabled. Tried to enable it and it corrupted the image so I turned it off again.
Nyromith
 
Posts: 16
Joined: 2013-05-17 13:29

Re: Screen tearing with Intel HD Graphics on 7.0

Postby vbrummond » 2013-05-17 15:04

I did say that enabling it would likely cause sync issues, not fix them.

Vsync (SwapBuffersWait) is enabled by default so I am not sure why the driver has any tearing issues. For me it only does when I enable sna. Video does not tear for me, I only notice it as a split cursor while I am typing.
System: Retina 5K iMac, 27-inch, Late 2015 - Intel i5-6600 3.3ghz, 8gb RAM, AMD Radeon R9 M395 2048 MB
OS: Mac OS 10.12
vbrummond
 
Posts: 4417
Joined: 2010-03-02 01:42

Re: Screen tearing with Intel HD Graphics on 7.0

Postby bwat47 » 2013-05-19 22:10

There is no way to get proper tear-free output on modern intel graphics (ironlake and newer) without an opengl compositor. XFCE's compositor only supports xrender which only makes the tearing worse. You may be able to get tear free video playback if you disable xfce's compositing and use mplayer with opengl output. Here's a quote from an intel driver developer:

First note that all Intel hardware up to SandyBridge has functional vsync support with no greater cost than stalling the GPU until the blit can proceed.

The problem is that with the agressive powersaving of SandyBridge and the greater decoupling between the display engine and the GPU, the ability to delay rendering until a particular scanline had passed was assumed to be a legacy feature and the GPU commands to do so were removed. By presuming that all updates would then be through a compositor using pageflipping (i.e. their primary target, Windows Vista/7/8), they were then able to make further power savings. If you use an OpenGL (really DRI2) compositor that only pageflips (i.e. doesn't try to take "advantage" of MESA_copy_sub_buffer), you will not see any tearing, suffer very little jitter, and maximise the power savings of the GPU.

The TearFree option (still in its infancy, and really only a proof-of-principle at this stage) is to make sure that even a bare X only ever pageflips. This is primarily because future hardware will have even more widespread aggressive power savings that assume a compositor, and worst case scenario, the display engine will only be functional with a pageflipping compositor.



Compton is a good way to get total tear-free output in lightweight de's that don't have opengl compositing. its a lightweight compositor that has an opengl backend that is capable of vsync on intel: https://github.com/chjj/compton. I wrote a guide on using it here: http://ubuntuforums.org/showthread.php?t=2144468

Another option is the intel "TearFree" xorg option, but afiak this only works properly on recent kernel/drivers (this option requires SNA to work and I'm not sure if it will work with debian's rather old stock 3.2 kernel, and I've never tried it on debian), and the performance is rather atrocious which is why I prefer usng an opengl compositor: create a file "/usr/share/X11/xorg.conf.d/20-intel.conf" and add
Code: Select all
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
   Option      "TearFree" "true"
EndSection
bwat47
 
Posts: 34
Joined: 2013-03-17 22:33

Re: Screen tearing with Intel HD Graphics on 7.0

Postby Nyromith » 2013-05-20 10:10

Well, I found a solution, but it's awfully non-elegant. Basically it involves upgrading the XFCE window manager to version 4.10 and then install a patch that hasn't been released. Oh, and ignoring a dependency. It's based on this information:
http://crunchbang.org/forums/viewtopic. ... %23p248917
http://www.webupd8.org/2012/10/xfce-syn ... -xfwm.html
http://lists.debian.org/debian-user/200 ... 01097.html

It goes like this:
1. Download and install this:
http://packages.siduction.org/xfcenext/ ... _amd64.deb
2. Download and install this:
http://packages.siduction.org/xfcenext/ ... _amd64.deb
3. Download and force-install this:
https://launchpad.net/~nilarimogard/+ar ... _amd64.deb
4. Edit this file: /var/lib/dpkg/status
On the dependency list remove this dependency: libwnck22 (>= 1:2.22)
5. Relog and run this command:
xfconf-query -c xfwm4 -p "/general/sync_to_vblank" -s true

That's it! Now I have a tear-free XFCE environment with only the bare minimum of required packages. It fixes window tearing, video tearing and almost fixes graphical tearing, although there is one tear line near the top of the screen.

I'll see if there are some bugs, and write here if something stops working.

Hope I won't get into the Debian prison for this kind of solution :?
Nyromith
 
Posts: 16
Joined: 2013-05-17 13:29


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable