Possible solution for Tearing (Nvidia proprietary)

Hi!

Since my “level” is too low for the tutorial section, I´ll post this here. Would be great if anyone tests this and provides some feedback, thanks!

Problem:

I tried almost every workaround regarding tearing prevention for my nvidia card (GTX1070) under Plasma. Some helped preventing tearing but I still got a lot of stuttering and short “desktop freezes”.

Working solution:

First of all I replaced Kwin with kwin-lowlatency (AUR). Second step was to remove all nvidia-settings and xorg config. Next…

• install kwin-lowlatency and replace Kwin

• remove ~/.nvidia-settings-rc and /root/.nvidia-settings-rc

• remove/rename /etc/X11/xorg.conf

• remove/rename /etc/X11/mhwd/nvidia.conf

Reboot!

After rebooting run nvidia-settings and tick “Allow flipping” under the OpenGL settings tab. Save current configuration and exit.

Last step, compositor settings:

• tick “Allow applications to block compositing” (active),
• untick “Suspend compositor for full-screen windows” (deactivated),
• Minimum latency 0

Hopefully I didn´t forget any step :slight_smile:

1 Like

Just adding this to the Section “Screen” in /etc/X11/xorg.conf.d/90-mhwd.conf

One Screen:

Option         "metamodes" "HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}

2 Screens:

Option         "metamodes" "HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, DVI-D-0: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On}

You must add every screen to this list.

REBOOT

This is one of the “older” solutions I tried first. Afaik this will add some input delay and it didn´t solve the stuttering for my setup. To be honest my next card won´t be a nv-card :slight_smile:

Activating triple buffer helps a lot… Open a terminal and:

kate /etc/profile.d/kwin.sh

And paste:

#!/bin/sh

export KWIN_TRIPLE_BUFFER=1

~/.config/kwinrc
[Compositing]
MaxFPS=60
RefreshRate=60

After have to reboot.

I see that all of you have tested a lot of things, and many of them may have been even more advanced.

As I have configured a laptop last week with Nvidia graphics card, I would like to post here a simple tip that improved the overall experience in my side, and maybe could help those not so experienced in changing config files etc.

So, by changing the Compositor Scale method from Accurate to Smooth under:
System Settings > Display and Monitor > Compositor > Scale method

has improved a lot the experience, and in case this is not enough, someone could also change between Open-souce and proprietary drivers in order to check what works best.

To get rid of tearing with Nvidia GPU it is simple and doesn’t require all of that, first disable all the vsync/anti-tearing features from the OS:

Imgur

then use the official Nvidia Settings Panel to select your resolution and refresh rate properly (do not let Auto, manually override with the proper values) in the Advanced mode of the Nvidia drivers, and make sure to enable Full Composition Pipeline.

Imgur

After applying settings properly make sure to start the nvidia-settings panel again with sudo privileges to save the settings to the nvidia.conf file, in terminal type sudo nvidia-settings.
Review the settings make sure it is as expected, and click the Save to X Configuration File button, browse to the proper configuration file at /etc/X11/mhwd.d/nvidia.conf and save.

NOW REBOOT. This is important as Full Composition Pipeline doesn’t work properly when enabled/disabled on the fly. It will work properly after reboot.

Test the tearing in games, movies, or most obvious to me in long web pages by scrolling down. Without Full Composition Pipeline long web pages would have horrible tearing while scrolling in them (and you can easily increase or decrease scrolling speed to amplify or diminish the tearing).

This is as simple as that, no need to do anything else.

3 Likes

Just want to point out that besides disabling the tearing prevention (in KDE) [and which is known to be finicky with nvidia cards … though more specifically the auto feature] the rest is covered in the wiki:
https://wiki.manjaro.org/index.php?title=Configure_Graphics_Cards#NVIDIA_Proprietary_.28non-free.29_drivers

1 Like