KDE - Tearing with NVIDIA GPU

Hi,

I know that this topic has been discussed several times already, but everything I have read so far didn´t help.

My proplem is, that I occur tearing in every game I´ve tried so far (Witcher 3 (DXVK); GTA 5 (DXVK); Shadow of the Tomb Raider (Native)) and everything I´ve read and tried so far didn´t help.

I´ve tried:

  • Tripple Buffering
  • Experimenting with the Compositor-settings
  • __GL_YIELD=USLEEP (kwin.sh)
  • Forcing Composition Pipeline (not Full)
  • "Sync to VBlank" On/Off
  • "Allow FLipping" On/Off
  • Installing kwin-lowlatency from the AUR

only "Force Composition Pipeline" helped, but made the games so sluggish, that playing was really no fun.

Also, the games automatically stop the compositing while they are running. When I turn on the Compositor then manually (Alt-Shift-F12) the tearing disappears, but the games behave like "Force Composition Pipeline" would be on.

Another thing I´ve noticed is, that if I turn VSync off ingame, i become tearing all over the screen. If I turn it on, the tearing only appears at the top of the screen, always on the same position (if a browser would be open, it would be in the URL).

I hope someone has an idea to fix this.

I´m running the latest Manjaro KDE Version with the newest stable kernel (5.7.9) on a Ryzen 5 2600X with a GTX 1080 (Proprietary NVIDIA-Driver 440xx) and a Dual Monitor Setup.

Long shot; Have you tried Feral's Gamemode?
You could also try driver 450 beta.

So, I´ve installed gamemode and enabled it in Lutris, but it doesn´t make a significant difference (if at all). I´ve checked that it´s running by "gamemoded -s". This also applies for Shadow of the Tomb Raide (native), there it was running automatically.

I´ve also tried installing the "nvidia-full-beta-all" packages (opencl, utils, lib32...) through the pacmac-manager and had to remove the current nvidia 440xx packages manually, but after installing everything I´ve got rewarded with a black screen after boot. So I´ve reinstalled the old packages and I´m back where I´ve started. (Maybe the black screen appeared because I didn´t remove the mhwd-nvidia-440xx package?)

May be the problems is the Ryzen processor you have. There have been several posts about different issues with Ryzen which will be adressed in kernel 5.8.

Try these settings:

For KDE Compositor do the same as the image do not allow application to block composition and disable the integratd vsync.

For Nvidia Settings, first thing is only enable your main screen if you have multiple, simplify the setup for now (and later enable it when you have proper setup with one screen).
Then enable the Advanced Settings by clicking the Advanced... button and make sure to use Full Composition Pipeline, select the resolution (not auto), select the proper refresh rate (for example mine has two separate 60 Hz available, one being in reality 59.88 Hz and the other 59.95 Hz, don't ask me why but this is the output of xrandr command, and the proper one for me is 59.95, so what is shown as 60 Hz (2) in Nvidia Settings). This is important to have the real monitor refresh rate here or else you will have tearing no matter what you do.
After that, what I do is apply the settings and quit, and relaunching nvidia settings with sudo privileges to write the config file with command sudo nvidia-settings then you enable Advanced Settings, verify everything is in order, and click the Save to X configuration file button and browse to the nvidia config file. Be sure to not save to the default path but to /etc/X11/mhwd.d/nvidia.conf instead.

After that you need to REBOOT.

This may not seem important but from my experience you have to reboot if you want things like Composition Pipeline to properly work.

Once rebooted start Nvidia Setting one more time to verify everything stayed liked configured previously. From here in theory this is the 'base setup' and it should be good to go for gaming.

Then start a game and try. Different games can have different results, but first, do not use Vsync in game, and make sure you can always have MORE frames per second when playing than the monitor refresh rate. This way you are sure you can at least sync to the monitor refresh rate. Then you can test with or without Vsync enabled in game, and also see sometimes game have FPS limiter so maybe try to set this limit to your monitor refresh rate it can help.

I have great performance with KDE, Nvidia and Proton/Lutris so you should too with better GPU. I struggled a lot with tearing in web browser or games in the past but by doing these settings everything is fine now. The important thing was to have Nvidia Composition Pipeline work properly, and depending on games have some settings or startup options.

PS: for gamemode to work properly make sure all tests pass OK with command gamemoded -t

So, I´ve tried your settings (interestingly I have more compositorsettings available than you:

) and it just runs fine. Witcher 3 runs great, no matter if VSync is enabled or not, Shadow of the Tomb Raider runs perfect while VSync is off and gets very (in German you would say "schwammig" - "spongy" (don´t know wether this expression exists in English)) and unplayable, when it´s turned on. My second Monitor give me a performance hit in Witcher 3 from 80-90 to 70-80 FPS, but that´s ok.

Just GTA V is unplayable now. It lags and makes jumps, although DXVK HUD is showing me 40-50 (sometimes close to 60) FPS, no matter if VSync is on or off...

Forum kindly sponsored by