Desktop Lag/Stuttering while gaming

Hello,

Since is about KDE Plasma and Nvidia GPU, maybe you have to do what i do.
Open in Kate the /etc/X11/mhwd.d/nvidia.conf and in the Section "Device" replace the line Option "NoLogo" "1" with:

    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline = On}

Save it then create the file kwin.sh to use the triplebuffer, from terminal run:
echo "export KWIN_TRIPLE_BUFFER=1" | sudo tee /etc/profile.d/kwin.sh

Reboot after that and set the Compositor to OpenGL 3.1

Sometimes the for the kwin.sh is actually required to use:

export KWIN_TRIPLE_BUFFER=1
export __GL_YIELD=USLEEP
export __GL_MaxFramesAllowed=1

With this in place, do not try to run wayland session !

Some other situations/systems require that the nvidia.conf to have a fixed layout for Section "Screen", hence the metamodes goes there and all depends on the ports used and their order.

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Your GPU Name Model"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: 1920x1080_60 +0+0 {ForceCompositionPipeline=On}, DVI-D-0: 1920x1080_60 +1920+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Yes, there is a difference between ForceCompositionPipeline and ForceFullCompositionPipeline and i don’t recommend to have them both enabled, and the ForceFull be used only if the other fails …

1 Like