If you're experiencing screen tearing in Xfce 4.10, you'll be glad to know there's a patch that fixes this, which you can install right away.
The patch adds Sync to VBlank support to the Xfwm compositor and while it's not perfect, it should fix most of the tearing on computers using Intel GPUs (might work with AMD as well). Here are the pros and cons of using this patch, according to the bug report where the patch was submitted:
- No tearing when dragging windows
- No tearing when resizing windows
- No tearing when using the flash plugin in firefox
- No tearing in windowed OpenGL applications
- Uses less resources since the fps is limited to the display refresh rate
- Tested only using Intel gpu, but might also work with AMD. It doesn't work with Nvidia
- Blocks xfwm's main loop while waiting on the vertical blank
- Tearing still happens about 10 pixels below the top of the display but since this space is usually only occupied by the title bar, it's only visible when dragging a window across the drop of the screen
There's also a small bug and enabling sync to vblank from the GUI doesn't work, but this can easily be done with a single command.
I don't experience any screen tearing in Xfce so I couldn't properly test this, but the patch has been tested by WebUpd8 reader Johann Todorovic on a Dell Inspiron Laptop with Intel i5-2410M CPU and 4 GB of RAM running Ubuntu 12.10, and he confirms that it works, just as described in the bug report (see info above):
With the default Xfwm4 and the compositor on, I play 3 videos (avi and mp4) in Parole. All of them with permanent horizontal screen tearing. The same issue with flash videos in Youtube. With the default Xfwm4 and the compositor off, the tearing is even worse.
Then, i download and install your Xfwm4 patched deb. And enable the Vsync [...].
After restarting the wm, with the compositor "on", I performed the test with the same videos, and the reproduction is practically perfect! Tearing of video and flash reproduction, in full screen is almost imperceptible, and limited to the top of the screen "about 10 pixels below the top of the display".
[...] I'm very glad with the results, the patch works and it's a good improvement!
Install Xfwm4 with patch for compositor Vsync support
To install Xfwm4 with the patch for vsync support in Ubuntu 13.04 or 12.10, use the following commands:
sudo add-apt-repository ppa:webupd8team/experiments sudo apt-get update sudo apt-get upgrade
If you're using Ubuntu 12.04 with Xfce 4.10 or some other Debian-based Linux distribution, you can download the debs below (not tested):
Once installed, log out, then log back in and enable sync to vblank using the following command (remember, setting this from the UI doesn't work):
xfconf-query -c xfwm4 -p "/general/sync_to_vblank" -s true
For other Linux distributions, you can get the patch via Xfce Bugzilla.
Thanks to Johann Todorovic for the tip!