ArchLabs Linux

Compton vsync: x_fence_sync ERROR Failed to trigger the fence

Hello! I tried starting comtpon with vsync = “true” in the .config/compton.conf , and it gives the following output:

[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] Option no-dock-shadow is deprecated, and will be removed. Please use the wintype option shadow of dock instead.
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] Option no-dnd-shadow is deprecated, and will be removed. Please use the wintype option shadow of dnd instead.
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] Option menu-opacity is deprecated, and will be removed.Please use the wintype option opacity of popup_menu and dropdown_menu instead.
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] vsync option will take a boolean from now on. “true” is interpreted as “true” for compatibility, but this will stop working soon
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] “clear-shadow” is removed as an option, and is always enabled now. Consider removing it from your config file
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] “paint-on-overlay” has been removed as an option, and is enabled whenever possible
[ 2019-08-25 20:29:06.231 parse_config_libconfig WARN ] “alpha-step” has been removed, compton now tries to make use of all alpha values
[ 2019-08-25 20:29:06.356 x_fence_sync ERROR ] Failed to trigger the fence.
[ 2019-08-25 20:29:06.356 paint_all ERROR ] x_fence_sync failed, xrender-sync-fence will be disabled from now on.

Its the bottoms ones I’m interested in, since I dont seem to have vsync working - at least according to this test site: https://www.vsynctester.com/ and watching a youtube video I can see tearing. I dont notice it much when playing games tho, not really at all?

Im on a GTX 1060 (3gb) nvidia GPU, dedicated GPU (there is no internal to fumble around with), using archlabs obv. perhaps my compton config is old or something? I installed archlabs quite a long time ago.

Firstly, vsync = "true"; doesn’t mean anything and is not valid config for compton, options include:

  • none: No VSync

  • drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some (DRI-based) drivers.

  • opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.

  • opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.

  • opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not guarantee to control paint timing.

  • opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.

See

man compton

Now, to stop tearing with nvidia cards you should disable compton vsync and use the xrender backend

vsync = "none";
backend = "xrender";

Then use the driver vsync instead, try running this command

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

If it works you can make the change permanent by creating /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
        Identifier "Nvidia Card"
        Driver     "nvidia"
        VendorName "NVIDIA Corporation"
        BoardName  "GeForce GTX 1060"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
    Option         "AllowIndirectGLXProtocol" "off"
    Option         "TripleBuffer" "on"
EndSection

See here for more info
https://wiki.archlinux.org/index.php/NVIDIA/Troubleshooting#Avoid_screen_tearing

If you prefer to do this via the nvidia driver GUI see here
https://wiki.archlinux.org/index.php/NVIDIA#Using_NVIDIA_Settings

Hi,many configurations in compton.conf are obsolete.
from an eye here:
https://wiki.archlinux.org/index.php/Compton

OK thanks alot! ill look into this and try what you suggest :slight_smile:

Hmm! Something happened when running the nvidia command (and also changing the config as you suggested), but it does not seem to have solved vsync, I still get red/cyan on the test page. Performance in general seems worse too. tbh I only notice this very rarely so I guess Ill just ignore the tearing for now ^^