HOWTO fix screen tearing
Screen tearing is a problem with some combinations of drivers and some window-managers such as Xfce 4.12's xfwm. Luckily, it's easily fixable by adding a minor snipplet to Xorg's configuration file.
Create one of the following configuration files in
/etc/X11/xorg.conf.d/ (create that folder if it does not exist, there's no such folder on Ubuntu by default but it does look for it and read files in it) to avoid screen tearing.
Some rare Intel CPUs will additionally need
"AccelMethod" "uxa". That is usually not the case but that's what you need to add if the above configuration does not completely eliminate screen tearing on Intel GPUs:
If you are using a not ancient AMD GPU you're using the "amdgpu" driver and you need this:
If you're using something rather old like a HD7850 you're using the "radeon" driver and you need:
Grep the X log if you are unsure what driver you are using:
grep drivers /var/log/Xorg.0.log
That will produce a line such as:
[ 24.285] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so
[ 21.857] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
|Question: Why do you need to add this to X's configuration?
AMD graphics developers have no good answers and don't want to talk about it. Intel developers won't go near this quesiton with a 10-foot pole.
Now, imagine the setting was reversed and named something like