You are not logged in.

#1 2012-02-04 18:43:15

darthpenguin
Member
Registered: 2011-09-16
Posts: 80

[SOLVED] vsync tearing issues in xfce4

Hi Guys.

I'm using a Lenovo Thinkpad T400. Video Driver is xf86-video-intel. I'm using xfce4 (because Gnome-Shell sucks IMHO). My problem (and one I never got in Gnome-Shell on the same system) is vsync / tearing issues. Just draging a window across the screen causes bad tearing. If I enable xfce4 compositing the tearing is even worse. If I use compiz --replace then everything looks good but I find compiz causes other issues. Ideally I would just use xfce4 compositing with vsync enabled. Is there any way I can do that? Thank You.

Last edited by darthpenguin (2013-03-30 18:05:34)

Offline

#2 2012-02-04 22:51:39

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] vsync tearing issues in xfce4

I found I had to use Compiz on my Lenovo ThinkPad X220 with the xf86-video-intel driver to fix vsync / tearing issues in Arch XFCE.  Same in Mageia 1 KDE, I had to use Compiz.  In Fedora 16 Gnome I was able to change an environment variable for the clutter/mutter WM to fix this.

I am not having any problems with Compiz and XFCE in Arch.  Not sure what your 'other issues' are.  You could go back to Gnome and use Cinnamon with it to get away from the Gnome shell.  I believe that should work, but I haven't personally tried it.

https://bugzilla.gnome.org/show_bug.cgi?id=657071#c2
http://forums.fedoraforum.org/showthread.php?t=274611

BTW, have you tried using the libva/vaapi driver for intel?

# pacman -Ss libva
extra/libva 1.0.15-1 [installed]
    Video Acceleration (VA) API for Linux
extra/libva-driver-intel 1.0.15-1 [installed]
    VA-API implementation for Intel G45 chipsets and Intel HD Graphics for Intel
    Core processor family.

You can use that with mplayer to enable hardware acceleration.  Not having any luck with vlc though.

# pacman -Ss vaapi
community/mplayer-vaapi 34578-1 [installed]
    A movie player, compiled with vaapi support

Offline

#3 2012-02-06 21:39:03

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: [SOLVED] vsync tearing issues in xfce4

I've never noticed tearing with compositing disabled, but Xfce's compositor cannot sync to the vbl at all because it uses Xrender which doesn't handle that (or so I read.)

Offline

#4 2012-02-06 23:07:42

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] vsync tearing issues in xfce4

I tried with compositing disabled but still had tearing.  Had to use Compiz with XFCE.

Offline

#5 2012-03-20 14:54:30

stratoka
Member
Registered: 2011-08-26
Posts: 38

Re: [SOLVED] vsync tearing issues in xfce4

I`m forced to use compiz to, sadly, anyone who comes with a solution without compiz, he is my guest for a beer.

Offline

#6 2012-03-20 15:30:17

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: [SOLVED] vsync tearing issues in xfce4

Well, according to bug reports on the Xfce bugtracker, the solution seems to be to change Xfwm to use OpenGL instead of Xrender, but no-one wants to do it. It's not on the roadmap for Xfwm 4.10 at least.

Offline

#7 2012-03-28 09:24:58

stratoka
Member
Registered: 2011-08-26
Posts: 38

Re: [SOLVED] vsync tearing issues in xfce4

I posted on one of the developers G+ profile, in hope that it will be taken in consideration. We who have the tearing problem, should contact the developers, probably they will fix this issue. big_smile

Offline

#8 2012-03-28 09:26:59

stratoka
Member
Registered: 2011-08-26
Posts: 38

Re: [SOLVED] vsync tearing issues in xfce4

I have another  strange issue, well it`s not an issue, more of an annoyance, when I install compiz, all my windows appear in the left corner, its annoying as hell! Did you guys experience this or just me?

Last edited by stratoka (2012-03-28 09:27:49)

Offline

#9 2012-04-22 21:16:27

snoxu
Member
Registered: 2010-01-24
Posts: 141

Re: [SOLVED] vsync tearing issues in xfce4

I'm having the same tearing issue when moving or resizing windows. Bummer having moved away from gnome to xfce4

I have hybrid intel/nvidia graphics, only intel drivers installed, issues shows up for me with compositing on and off.

Last edited by snoxu (2012-04-23 02:13:31)

Offline

#10 2012-07-29 04:04:51

darthpenguin
Member
Registered: 2011-09-16
Posts: 80

Re: [SOLVED] vsync tearing issues in xfce4

I still don't know what causes this issue. I suspect that a workaround would be to use compiz but that got a bit complicated. I finally bit the bullet and switched to Gnome 3 / Gnome-Shell.

Offline

#11 2012-11-17 08:13:29

stratoka
Member
Registered: 2011-08-26
Posts: 38

Re: [SOLVED] vsync tearing issues in xfce4

Hi guys, it seems that the Crunchbang developers are working on the v-sync tearing issue. So far i am impressed, they are doing an excellent job. Also compton works with xfce to.
Anyhow here is the link: http://crunchbang.org/forums/viewtopic. … 35#p272535

Offline

#12 2013-03-30 18:01:44

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

About compton, by default it doesnt fix anything. This is the mighty trick

compton --vsync opengl

I've been searching for this for like 6-7months after trying absolutely almost everything including compton. Not sure about 3D games, but compositing works, is fast and there is NO TEARING AT ALL. No matter what is the video output for video players, NO TEARING!!! Maybe the tearing is minimal, but I haven't seen any tear spikes since using compton with opengl.

cat /etc/X11/xorg.conf.d/20-intel.conf 
Section "Device"
   Identifier "Intel Graphics"
   Option "SwapbuffersWait" "true"
   Option "AccelMethod"  "sna"
   Option "TearFree" "true"
EndSection

If compton doesnt work try experimenting with this, but it should work!

Last edited by kellerman (2013-03-30 20:22:52)

Offline

#13 2013-03-30 18:14:26

darthpenguin
Member
Registered: 2011-09-16
Posts: 80

Re: [SOLVED] vsync tearing issues in xfce4

Okay, so someone has finally provided a solution to this issue. In the AUR there are two packages meant to replace xfwm4. I don't know why there are two. I only needed to install one. But after installing and running a simple command in bash (the package tells you what to do following the installation) video tearing has been fixed. I can finally re-position my windows without cringing smile

https://aur.archlinux.org/packages/xfwm4-vsync/  <--- I installed this one

https://aur.archlinux.org/packages/xfwm4-vsync-vblank/

Since I have started working as an IT tech administering large numbers on Win XP and Win 7 machines I have noticed that these OSs (Win 7 only if you turn off Aero -- which we do) suffer from the same glaring problem. Personally, I would refuse to release a desktop environment that did this.

Last edited by darthpenguin (2013-03-30 18:14:44)

Offline

#14 2013-03-30 20:40:59

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

Nice find! The compton solution might be useful for Openbox or other light WM users who would like to use compositing and not to expect the tearing as this is a common problem not only in XFCE. I like also seeing a little bit of lightweight eye candy - like shadows under windows (which makes easier to understand where the window is if there are more than 1 window on the screen, by the way lol big_smile ) or some simple transparency under the panel... smile

By the way, I tried this test http://www.youtube.com/watch?v=ceX18O9pvLs directly from youtube via flash with compton enabled. When fullscreen there were only a little tearing on the very top of test video. Fully acceptable to me and for example when viewing normal fluid videos in youtube at fullscreen the tearing is not noticable at all. When not fullscreen (1366x768) it's perfect. How is the test with xfwm4-vsync? smile

EDIT: Just tried the package and now I know that it includes the tiling patch too! And that the compositor has that option to sync to vblank. Results look like to be the same, tried myself smile In this case I'll stick to compton as it's more configurable.

Last edited by kellerman (2013-03-30 22:54:26)

Offline

#15 2013-04-13 08:40:04

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 314

Re: [SOLVED] vsync tearing issues in xfce4

kellerman wrote:

How is the test with xfwm4-vsync? smile

Doesn't work for me with Nouveau. hmm Simply has no effect.

Offline

#16 2013-04-13 11:58:05

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

Thorsten Reinbold wrote:
kellerman wrote:

How is the test with xfwm4-vsync? smile

Doesn't work for me with Nouveau. hmm Simply has no effect.

Both compton and xfwm4-vsync doesnt work? With xfwm4-vsync you must go to xfwm4-tweaks-settings and enable compositor and 'sync to vblank' option, did you do that?

Offline

#17 2013-04-13 14:31:51

felipense
Member
Registered: 2013-04-05
Posts: 62

Re: [SOLVED] vsync tearing issues in xfce4

The tearing is awesome when you see 1080p movies in vlc. Looks like a ppt file.

edit: the first aur package not solve this issue. .

Last edited by felipense (2013-04-13 14:34:50)

Offline

#18 2013-04-13 14:53:23

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: [SOLVED] vsync tearing issues in xfce4

I started using Compton as a compositor instead of Xfwm’s compositor one week ago, and it’s working very well for me (Core i3 1st gen with Intel HD graphics). My command line (started in .xinitrc) is:

compton -c -f -o 1.0 -I 0.1 -O 0.1 -C -i 0.95 -z --vsync opengl --unredir-if-possible --shadow-exclude "! name~=''" -b

The important bit with regards to tearing is "--vsync opengl". It also worked with "--vsync drm", but I felt it was slightly better with opengl. There is still some tearing sometimes, but it’s rare enough not to be annoying (at least with VLC and Flash videos).

The other option that may be useful to Xfwm users is “--shadow-exclude "! name~=''"”. It removes the “black window” effect when you use alt-tab with shadows enabled.

Supposedly the ultimate solution is to use Compton’s new OpenGL backend (“--backend glx --paint-on-overlay --vsync opengl-swc” according to RichardGv on the AUR), but when I tried the glx backend there was a lot of lag on my display.

Edit: I tried again the glx backend, this time with the options suggested by RichardGv, and there is much less lag than when I first tried it, but still it looks like a 30 fps refresh instead of the 60 fps I seem to be getting with the (default) xrender backend.

Edit 2: with --glx-no-stencil in addition, I’m back to 60 fps, but still a one-frame lag.

Last edited by stqn (2013-04-14 00:46:01)

Offline

#19 2013-04-13 17:06:31

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

A week ago or smth I hooked my laptop to external monitor via hdmi. The resolution was 1920x1200, and there was tearing. On 1366x768 it was less visible.
But when I played video through vaapi, the tearing was minimal just on the top of screen.
compton with vsync was enabled all the time.

compton --backend glx --paint-on-overlay --vsync opengl-swc

actually works very well, there is a bit of lag, but not huge. but seems to be no tearing at all (this time for real)

Last edited by kellerman (2013-04-13 17:15:04)

Offline

#20 2013-04-14 03:09:43

bwat47
Member
Registered: 2009-10-07
Posts: 637

Re: [SOLVED] vsync tearing issues in xfce4

kellerman wrote:

A week ago or smth I hooked my laptop to external monitor via hdmi. The resolution was 1920x1200, and there was tearing. On 1366x768 it was less visible.
But when I played video through vaapi, the tearing was minimal just on the top of screen.
compton with vsync was enabled all the time.

compton --backend glx --paint-on-overlay --vsync opengl-swc

actually works very well, there is a bit of lag, but not huge. but seems to be no tearing at all (this time for real)

So you are saying the latest compton-git with glx backend has no tearing at all on intel, not even near the top? If so thats great news, and I can finally go back to XFCE

Offline

#21 2013-04-14 10:58:56

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

bwat47 wrote:
kellerman wrote:

A week ago or smth I hooked my laptop to external monitor via hdmi. The resolution was 1920x1200, and there was tearing. On 1366x768 it was less visible.
But when I played video through vaapi, the tearing was minimal just on the top of screen.
compton with vsync was enabled all the time.

compton --backend glx --paint-on-overlay --vsync opengl-swc

actually works very well, there is a bit of lag, but not huge. but seems to be no tearing at all (this time for real)

So you are saying the latest compton-git with glx backend has no tearing at all on intel, not even near the top? If so thats great news, and I can finally go back to XFCE

Yes! This time, not even at the top, flash/html5 videos work well within the browser too. I'll try this on my external monitor (1920x1200) later, but on 1366x768 it's really fine! Only problem is a little delay (when moving windows for example), you can feel it a bit more than with 'compton --vsync opengl', but it seems to be acceptable to me. If I want extra responsiveness, then I can go back to '--vsync opengl' or simply kill compton.

Last edited by kellerman (2013-04-14 10:59:29)

Offline

#22 2013-04-14 14:28:00

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: [SOLVED] vsync tearing issues in xfce4

kellerman wrote:

Only problem is a little delay (when moving windows for example), you can feel it a bit more than with 'compton --vsync opengl', but it seems to be acceptable to me.

Did you try --glx-no-stencil? Here it helps a lot. (Not sure if you have seen my second edit above.)

Offline

#23 2013-04-14 16:31:49

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [SOLVED] vsync tearing issues in xfce4

stqn wrote:
kellerman wrote:

Only problem is a little delay (when moving windows for example), you can feel it a bit more than with 'compton --vsync opengl', but it seems to be acceptable to me.

Did you try --glx-no-stencil? Here it helps a lot. (Not sure if you have seen my second edit above.)

You mean

compton --backend glx --paint-on-overlay --glx-no-stencil --vsync opengl-swc &

or

compton --backend glx --glx-no-stencil --vsync opengl-swc &

Hard to see the difference here, but it seems to be a little bit better maybe (with both variants).

Last edited by kellerman (2013-04-14 16:33:17)

Offline

#24 2013-04-14 17:16:36

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: [SOLVED] vsync tearing issues in xfce4

I meant first one. Not that it matters now that you’ve tried wink.

Offline

#25 2013-04-14 17:55:42

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 314

Re: [SOLVED] vsync tearing issues in xfce4

kellerman wrote:
Thorsten Reinbold wrote:
kellerman wrote:

How is the test with xfwm4-vsync? smile

Doesn't work for me with Nouveau. hmm Simply has no effect.

Both compton and xfwm4-vsync doesnt work? With xfwm4-vsync you must go to xfwm4-tweaks-settings and enable compositor and 'sync to vblank' option, did you do that?

I know where the option is. But it isn't stored. When I choose 'sync to vblank', close xfwm4-tweaks-settings and open it again, the setting is off like before.

Offline

Board footer

Powered by FluxBB