Marco, compositing and Nvidia

April 2nd, 2020

It’s quite a mess for MATE desktop users who have Nvidia at the moment. The default software compositor – required for window shadows – doesn’t play nicely together with Nvidia’s idea of the vsync, and thus there’s nasty tearing almost everywhere, maybe apart from fullscreen games. Using Nvidia’s own compositor solves this issue, but having them both on at the same time is detrimental to game framerates and causes unnecessary stutter.

Here’s a little script I made to remedy the issue to a certain extent. Call it compositor.sh or whatever you see fit, and then use it with on/off to turn compositing on or off. Even better when bound to hotkeys that let you quickly switch between a tearfree good-looking desktop mode and a fast game mode:

#!/bin/sh
case $1 in
on)

    gsettings set org.mate.Marco.general compositing-manager true
    nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline=On }"
    ;;
off)
    gsettings set org.mate.Marco.general compositing-manager false
    nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline=Off }"
    ;;
esac

It of course needs to be executable too (chmod a+x compositor.sh) and preferably in the path.

Filed under: linux,softat

Kommentin kirjoitus

(pakollinen)

(pakollinen, ei näytetä)

(pakollinen)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

RSS feed for comments on this post.