My screen is lagging and somewhat flickering, refresh rate seems low, with an NVIDIA Geforce GTX 1060 graphics card and compositing turned on. This happened after upgrading to Xubuntu 19.10, and is still present in Xubuntu 20.04 (xfwm 4.14.1 (revision 44809c49)). When I follow the suggestions of https://forum.xfce.org/viewtopic.php?id=13233 and restart xfwm4 with option --vblank=off, the situation is improved. I am not sure if it is perfect. some transitions are still slow. Happy to try and help diagnose the problem, if I have the time. Using Xubuntu for many years now but not an expert in its low-level aspects.
In fact, compared to my older laptop which is also running Xubuntu with compositing, I still notice screen tear after setting --vblank=off.
> I still notice screen tear after setting --vblank=off. That's to be expected, "vblank off" will cause screen tearing, that's what vblank is about.... Are you using the nvidia closed source drive, or the open source nouveau or modesetting driver?
I'm afraid for NVidia closed source driver, only GLX is supported so its either "glx" or "off" (which gives tearing of course), so it's a wontfix. Note that for modesetting and nouveau, there is a bug in the driver that prevents Xpresent from working, see https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues/529
nvidia closed source. In previous installations of Xubuntu I tried going to the open source nouveau driver which seemed to improve things (but perhaps because the compositor was disabled without me noticing?). However now when I try to use the open source nouveau driver I only seem to get a 1024x768 resolution.
When I use Compton (a suggestion I received here: https://askubuntu.com/questions/1230340/why-does-my-nvidia-graphics-card-in-combination-with-xfce-compositor-have-poor-p) everything runs smoothly with this nvidia driver.