Lower FPS and massive input delay on AppImage version of GeforceNOW on KDE with Wayland

Hello there,

today I installed Debian Trixie (the current testing version). I have a laptop with an integrated intel GPU and a dedicated NVidia GPU (RTX 3070 mobile) that is hardwired to the external monitor output.
Additionally, I am using Wayland because this setup has massive problems with X11. Due to a regression in the integrated video graphics driver which is still not fixed, I think, executing any video demanding application on X11 will make the video output freeze and lag. This has gotten even worse. That is why I am using Wayland.
Unfortunately, in the past there was a massive problems with external monitors under KDE. The external monitor would lag and I would, at least according to glxgears, have less than 20 fps. The mouse was lagging visibly.
From what I can see this has gotten considerably better, although I have a feeling that this is not completely fixed, yet.
My problem now is with GeforceNOW, or rather the appimage version which is basically a wrapper for chromium if I understand it correctly.
When playing some games, like the Oblivion Remaster or Doom The Dark Ages there is a very noticeable input delay when the application is running on the external monitor. I need only move the window to the laptop screen and the problem goes away. Move it back to the external monitor and it’s back.
Now there might be several culprits here. It might be related to Wayland, or to NVidia or to KDE. The thing is that I have also tested this on Gnome with Wayland and the problem does not appear. From what I can see it might be related to KDE.
Does anyone know anything about it or maybe knows a fix for this?

Here are the details from “About this system”:

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.12.27-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 31.1 GiB of RAM
Graphics Processor 1: Mesa Intel® UHD Graphics
Graphics Processor 2: zink Vulkan 1.3
Manufacturer: LENOVO
Product Name: 20YS0004GE
System Version: ThinkPad T15g Gen 2i

Cheers

Hi! The links below seem to be the best references I can find on this particular issue, and seem to indicate that there is some underlying NVIDIA driver issue that can potentially be worked around:

The key update from the NVIDIA GitHub issue was:

Quick update here: We now think we fully understand the issue. The short version is that when the GPU is in a low power state (e.g. idle desktop) then there’s an extra bit of latency between the various components when a per-frame notification is delivered from the display hardware all the way up to the compositor. This causes us to just miss the vblank interval and drop a frame, which is why the framerate gets cut exactly in half. These delays are bigger with GSP in the picture than when it is disabled, so the issue does not reproduce on the legacy driver mode*.

We’re still looking into what a proper fix will be, but the two short term workarounds we found are to either run the GPU at a slightly higher pstate (P4-P5 seems sufficient, depending on the HW) or to deliver the events to kwin on a fixed timer instead.

And the workaround suggested, at least a while back, was to use the KWIN_DRM_DEVICES environment variable to specify using the discrete GPU.

Hopefully something there helps you on the right track :slight_smile:

Thank you very much for the elaborate post. I have learned a lot.
I tried setting KWIN_DRM_DEVICES and I do see /usr/bin/kwin_wayland now appearing when running nvidia-smi but the performance with GeforceNOW has not improved.
Also, I have to correct myself. When I tested this with Gnome it was actually running on X11. Turns out that Gnome with Wayland stopped working completely on Debian 13 and Gnome was actually running on X11, t hat’s why the performance on the external monitor was so good. Since the old problems with freezing in X11 still persist so this is a no go.
Anyway, from what I can see now that is actually not a KDE problem but rather a Wayland or most likely a NVidia problem that has to be fixed by NVidia. I guess the only solution now is to wait for a newer drivers that actually fix this issue.
I will monitor the links you gave me, though. Maybe I have overlooked something or maybe someone will come up with some new trick to mitigate this issue.
Thanks!

1 Like