out of curiosity I tried the compton compositor with XFCE. I do not see any visual difference compared to the out-of-the-box compositor of XFCE.
And with regard to performance I see that CPU usage with compton goes up to 35 % if I constantly move a mpv window while playing a video. While the CPU usage is less than 15 % if I use the XFCE compositor.
So what is the reason why people use compton with XFCE?
i use compton with some heavy settings like window transition stepping so windows fade in and out smoothly, transparency on unfocused windows, vsync and it sits under %2 . i would have to check about when watching a video.
also, if you have xrender set as the backend it will use a lot more cpu whereas opengl backend uses the gpu for compositing
I usually disable the compositor when playing games (Mod+T in i3).
I can post my nvidia compton config later if you want. It's not perfect but eliminates tearing almost completely.
You can already try with vsync=opengl-swc (EDIT: I think it's the same as =true).
Also try starting compton with --experimental-backends switch.
I gave it a try without ForceCompositionPipeline and the differences between compositors is even more dramatic.
First of all I can confirm tearing in XFCE if no compositor is active. This does not surprise me.
I use a mpv window with a 720p video stream to test the tearing. I move this window around in circles.
Both compositors, XFCE out-of-the-box and compton, successfully eliminate tearing. That is true for the mpv window and in steam (X4 Foundations)
But when I monitor CPU usage while moving the window I see a big difference. With XFCE out-of-the-box the CPU usage for the xorg process is 6-12 %. For the compton compositor the CPU usage is 80+ %.
My conclusion: I am happy with the XFCE out-of-the-box compositor and I do not need ForceCompositionPipeline. This setting was a left over from some time ago when I used cinnamon and I felt the need to activate it for steam.
Besides screen tearing compton offers more configuration options (e.g. exclude certain applications from compositing effects) and especially the fork https://github.com/tryone144/compton with kawase-blur has more blur options.
I also didn't experience any high cou-loads with compton
Primarely: I have no need for it; I have had no noticeable screen tearing in Xfce on Nvidia during the 1.5 years I have been using Linux
Secondarely: It does NOT play well with menus and popups. Menus in Firefox, for example, get a thick border around them and the shadow is off by several millimeters, as does popups for say notifications. Especially notable if using blur effects.
I don't think there is a clear answer. But in my experience, compton is better at more graphics intensive work (4K 60fps videos, interlaced videos, gaming). xfwm4 is better for basic desktop work and 30fps videos.
I go through periods where I use xfwm4 (maybe for desktop zoom feature or when 4.14 came out), but then I switch back to my compton setup because I see micro stutter while doing something and find it is smoother with compton.
But compton is a headache also. There are so many options to play with that it's like a puzzle. You change one setting and try to do something like watch a video while moving another window over that video smoothly and think everything is good. But then you realize later in some random game there is very bad stutter now. So I end up constantly messing with different options in compton depending on what I am doing. Sometimes I change it so many times I think I am going crazy.
Settings that affect performance the most are (I guess there really is not that many):
Setting to avoid is use-damage = true . This makes desktop widgets start flashing randomly on my card.
And then you can also complicate it more playing with nvidia xorg options like triplebuffer and ffcp. Maybe a 1050ti is different, but I have to use ffcp on my GTX 780. No matter what vsync I use (xfwm or compton), there is always a line about 2/3 high on the screen if a video is playing in mpv (and I also test with mpv options opengl-waitvsync and opengl-swapinterval as well).
And if you are getting 80% cpu with compton, that is some config issue (or there are multiple compositors running, or a panel theme issue). Try with no config at all, then start adding things one by one. But you should not be using the vsync option in compton. Even the dev says not to use it in the compton optimization guide. You might as well just use xfwm4 if you are going to use compton's vsync. I don't know why it is enabled in the template and so many example configs.
All the vsync options were deprecated except for on and off in version 6.0.
You can fix Firefox with this option. And the shadow exclude options from mbod's post above for the notifications.
I cannot comment on Xfce, but here on i3, I have a maximum of 11% of CPU usage when moving an mpv window with a video playing.
I think it's once again a configuration setting.
EDIT: it's a bit smoother on KDE though.
In the past xfwm's compositor was notorious for tearing and performance issues.
Not to mention that compton was more easily configurable - choose backend, remove shadows, etc.
But recently the xfce compositor was largely rewritten and improved, so the comparison may not hold up anymore.
You may want to make sure you are using the good bits (especially on amdgpu) by switching vblank mode to new 'xpresent'
The compton CPU usage is really giving me a headache. I tried almost all config variances. I tried every setting or commandline paramater mentioned in this thread. I turned off all config files etc. The affect is the same: CPU USage while moving awindow goes above 80 %. And it doesnt matter which window it is. I can be a regular terminal window.
Interesting is the behaviour if I move a glxgears window. With XFCE out-of-the-box I can move it smoothly. It is repainted while being moved and everything looks normal. With compton the window is not repainted while being moved. If I stop the movement the window appeas where the mouse pointer is, but while the mouse is moving the window stays on the spot. Very weird.