There's a lot of bugs regarding tearing of windows because Xfwm uses a subpar method of compositing, it should use GLX in order to avoid tearing, there's no other option. All other compositing window managers do that, and they look much better. Even compton using the xrender method for compositing has less tearing than Xfwm with compositing. See bug #7237, bug #10416, bug #6371, bug #10407.
Actually there is another option: DRI3 and Present. This is a better solution than GLX because it doesn't require a powerful 3D card to completely eliminate tearing and doesn't destroy performance in games. If you still want an OpenGL compositor, turn off the xfwm4 compositor and give Compton a try.
What progress?
Does the bug presents in xfce 4.12? Also the bug occurs on my desktop with Nvidia drivers, on my notebook with intel graphics card everything works good
Take a look at https://bugzilla.xfce.org/show_bug.cgi?id=11642 A great progress was made
For those who use NVidia there is a solution, that fixes tearing in any compositor: Generate /etc/X11/xorg.conf via sudo nvidia-xconfig Write to /etc/X11/xorg.conf Section "Device" Identifier "Device0" Driver "nvidia" Option "Metamodes" "HDMI-0: 1920x1080 { ForceCompositionPipeline = On }" VendorName "NVIDIA Corporation" EndSection HDMI-0: 1920x1080 is for my configuration. If you configuration differs - edit this line https://devtalk.nvidia.com/default/topic/823711/linux/tearing-add-frame-buffer-please/?offset=7#4503217 I'm sure AMD has something similar. Try Option "TrippleBuffer" "True" too.
Experimental support for OpenGL/GLX has been added to git master. Note that comment #0 is not necessarily correct, OpenGL/GLX does not guarantee to be tear-free, it still depends on the driver and hardware.
Hi Olivier, Is this help to avoid tearing with Nvidia proprietary drivers ? If yes how can I do it ? Else is there a way to avoid tearing with Nvidia proprietary drivers? I use xfwm4 4.12.3 from here ppa:unit193/xfce on Xubuntu 15.04 x64
(In reply to jeremy9856 from comment #7) > Is this help to avoid tearing with Nvidia proprietary drivers ? Unfortunately not, for some reason that I do not (and don't want to) understand, NVidia proprietary driver behaves differently, I've been told. > If yes how can I do it ? > Else is there a way to avoid tearing with Nvidia proprietary drivers? Yes, there is, I reckon it's even mentioned in this very same bugzilla in comment 5 - But I have not tested and have no intention to install the proprietary driver on my system with compatible hardware.
I already tried a few days ago { ForceCompositionPipeline = On } and "TrippleBuffer" but that didn't work. I tried again and this time it worked. May I ask you why you seem to hate the best GPU drivers on Linux ?
(In reply to jeremy9856 from comment #9) > May I ask you why you seem to hate the best GPU drivers on Linux ? No, you may not. I'll leave this comment to you. Appearance can be deceiving, I don't hate nor love anything hardware related and will certainly not go into any discussion about value of any specific hardware or vendor in a public xfce bugzilla, this is certainly most irrelevant here.
I think it's relevant to talk about a xfce bug with this hardware on the xfce bugzilla... I think it's normal to use the official driver for your hardware and you lack of respect to the user of xfce when you don't care if it's working or not for them.
It works with nouveau and this is what matters - This bug is about implementing GLX and this is done, so this bug is fixed. Hardware/driver specific issues are irrelevant here, xfce is hardware agnostic and there will be no code added/changed to support and specific driver, even less proprietary ones. Your comments about respect of users are completely irrelevant in a bugzilla.
Ok you are stubborn so I stop here.
(In reply to jeremy9856 from comment #13) > Ok you are stubborn so I stop here. Being insulting won't help your cause, I'm afraid. You asked a question in comment 7, that was already answered in comment 5 and yet I kindly replied your question in comment 8. You even even stated in comment 9 that it worked... The rest is just background noise at best.
I'm really sorry and I apologize, I was upset. The option in comment 5 is a workaround but it's at the cost of 20 to 30% performance loss. Is it possible that you agree to make it works for all Nvidia users that need official drivers ? Maybe you can have some infos from the nvidia developers here ? https://devtalk.nvidia.com/default/board/98/ I don't want to try to force you of doing anything but I think it's important for a lot of users.
On nvidia, it appears that xfwm4 fails to find a matching visual for the frame buffer config it's expecting and thus disable GLX so obviously it won't help with tearing. You can see that by starting xfwm4 (from git master) from a terminal, it will complain that it "Cannot find a matching GLX config, vsync disabled". Relaxing the requirements does not help either, even if it can find a matching visual, nothing shows up on screen (which is a lot worse than tearing).
@jeremy I do not use this option anymore, cause video card won't produce smooth picture anymore. Playing cs go has become uncomfortable. The best solution is to use "compton --backend glx --vsync opengl". And do not forget to disable xfce compositor (wm effects) and put compton to autoload. I will post my compton settings with configured shadows if you want to. @olivier Xfwm finds glx if after running it reenable compositor. I used this workaround for some time period
(In reply to yanpaso from comment #17) > I will post my compton settings with configured shadows if you want to. This is a bug in xfce bugzilla database, not a mailing list nor a forum about how to use compton or any other software, please, keep focused and don't pollute the bug with such comments, post in a forum instead. > Xfwm finds glx if after running it reenable compositor. I used this > workaround for some time period Quite frankly, this is nonsense, this is not the same code you tried anyway. The list of available visuals won't change, no matter how many times you try.
Tearing was occurring because GL support was not enabled on NVidia proprietary driver because xfwm4 could not find a suitable GL FB config. Can you retry with current code from git master? I have tear-free compositing working here with GL support on proprietary NVidia driver with current code.
I will try in a week
Just ran 4.12.0git.5b4ddd6 with vsync enabled, tearing still exists. Maybe I should do something additional? Nvidia driver 352, kernel 3.16.
(In reply to yanpaso from comment #21) > Just ran 4.12.0git.5b4ddd6 with vsync enabled, tearing still exists. Maybe I > should do something additional? You need to enable "Allow flipping" and "Sync to VBlank" in OPenGL settings from nvidia-settings. Enabling "Synchronize drawing to vertical blank" should not even be needed in xfwm4-tweaks. You may want to run xfwm4 from a terminal to see if it logs any error regarding OpenGL support.
These options were already turned on in driver settings. Sync drawing in xfwm4-tweaks makes no effect. Tearing still exists. Try to watch this video fullscreen in chrome or VLC https://youtu.be/cuXsupMuik4
(In reply to yanpaso from comment #23) > These options were already turned on in driver settings. Sync drawing in > xfwm4-tweaks makes no effect. Tearing still exists. > Try to watch this video fullscreen in chrome or VLC > https://youtu.be/cuXsupMuik4 Yes, that's the same video I use to test tearing so I know about it and it's tear free here. Can you try with mozilla instead (I don't know about vlc, but I had tearing with chrome independently of the compositor in the past). Can you also do this as per comment 22: > You may want to run xfwm4 from a terminal to see if it logs any error > regarding OpenGL support.
(In reply to yanpaso from comment #23) > > Try to watch this video fullscreen in chrome or VLC ^^^^^^^^^^ Oh wait, fullscreen override redirect windows may get unredirected, ie it's not using the compositor so vsync code in xfwm4 may not be used at all. What it *not* fullscreen ?
I ran xfwm4 --replace in terminal, output is empty except "Waiting for current window manager (Xfwm4) on screen :0.0 to exit: Done" Tearing immediatly appears when you quickly drag windows from left to right. Switching off and on Effects (xfce-compositor) in xfwm4-tweaks cures this trouble a bit. Firefox with adobe flash 11 has worse situation: there are about 7 little breaks all along the white stripe. No matter full screen or not. In chrome and VLC only one break, no matter full screen too. I will record video in a minute
(In reply to yanpaso from comment #26) > I ran xfwm4 --replace in terminal, output is empty except "Waiting for > current window manager (Xfwm4) on screen :0.0 to exit: Done" Which seems ok, otherwise it would have complained. Can you post the output of "xfwm4 --version" just to be sure? > Tearing immediatly appears when you quickly drag windows from left to right. > Switching off and on Effects (xfce-compositor) in xfwm4-tweaks cures this > trouble a bit. Placebo effect most likely. > Firefox with adobe flash 11 has worse situation: there are about 7 little > breaks all along the white stripe. Sorry I did not mean adobe flash player, you don;t need this to play videos on youtube. > No matter full screen or not. In chrome > and VLC only one break, no matter full screen too. I will record video in a > minute No need, a video capture is unlikely to demonstrate anything.
Created attachment 6313 Nvidia bug report >Can you post the output of "xfwm4 --version" just to be sure? $ xfwm4 --version This is xfwm4 version 4.12.0git.5b4ddd6 (revision 5b4ddd6) for Xfce 4.10 Released under the terms of the GNU General Public License. Compiled against GTK+-2.24.23, using GTK+-2.24.23. Build configuration and supported features: - Startup notification support: Yes - XSync support: Yes - Render support: Yes - Xrandr support: Yes - Xpresent support: No - Embedded compositor: Yes - Epoxy support: No - KDE systray proxy (deprecated): No >Sorry I did not mean adobe flash player, you don;t need this to play videos on youtube. With firefox HTML player all the same behavior I was capturing via iphone, so you will see tearing https://youtu.be/lZmbYTUqxpw I also ran # sh /usr/bin/nvidia-bug-report.sh
(In reply to yanpaso from comment #28) > Nvidia bug report Not needed. > >Can you post the output of "xfwm4 --version" just to be sure? > $ xfwm4 --version > [...] > - Epoxy support: No ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ => Without epoxy you don't have OpenGL support so you are not testing anything useful here!! Just wasting time... Please majke sure to have epoxy devel installed and xfwm4 built with epoxy support before testing.
Installed libepoxy-dev, recompiled, reinstalled, ran - no tearing! I have even suspended and woken up PC. Thanks a lot for fix
(In reply to yanpaso from comment #30) > Installed libepoxy-dev, recompiled, reinstalled, ran - no tearing! I have > even suspended and woken up PC. Thanks for testing, closing then - Seems to work reasonably well enough with both open source and closed source driver. Only hardware/driver not tested is ATI/fglrx.
Thanks a lot for fixing this !
*** Bug 11642 has been marked as a duplicate of this bug. ***
Too bad this feature is still not in a release. Can you confirm it will be in 4.14 ? Thanks !