Frequent lags and loss of smoothness in KDE Plasma with dual monitors on NVIDIA 3070 Ti (Wayland/X11)

Hello everyone!
I encountered frequent lags and loss of smoothness in KDE Plasma on Wayland (slightly better on X11, but the problem remains) when using two monitors on a system with an NVIDIA 3070 Ti.

Information about the system:

OS: Arch Linux x86_64
Kernel: Linux 6.11.5-arch1-1
Uptime: 3 hours, 52 mins
Packages: 1441 (pacman)
Shell: bash 5.2.37
Display (PHL 242V8): 1920x1080 @ 75 Hz in 24" [External] *
Display (Mi Monitor): 1920x1080 @ 75 Hz in 24" [External]
DE: KDE Plasma 6.2.2
WM: KWin (Wayland)
WM Theme: Breeze
Theme: Breeze (Dark) [Qt], Breeze-Dark [GTK2], Breeze [GTK3]
Icons: breeze-dark [Qt], breeze-dark [GTK2/3/4]
Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
Cursor: breeze (24px)
Terminal: konsole 24.8.2
CPU: AMD Ryzen 9 5900X (24) @ 4.95 GHz
GPU: NVIDIA GeForce RTX 3070 Ti
Memory: 10.17 GiB / 31.25 GiB (33%)
Swap: 0 B / 32.00 GiB (0%)
Disk (/): 76.75 GiB / 425.39 GiB (18%) - ext4
Disk (/mnt/storage): 484.46 GiB / 915.82 GiB (53%) - ext4
Local IP (enp7s0): 192.168.1.141/24
Locale: ru_RU.UTF-8

Monitors:
Main Monitor: Philips 242V8A — 1920x1080 @ 75 Hz, connected via DisplayPort, with adaptive sync support.
Second Monitor: Xiaomi Mi Desktop Monitor 1C — 1920x1080 @ 75 Hz, connected via HDMI, without adaptive sync.

Problem:
The problem consists in the fact not smooth movement of windows on the desktop, lags when scrolling (for example, in the browser), and is especially noticeable when resizing windows.

Steps I’ve Already Tried:
Single Monitor Test: Using only one monitor reduces most of the freezes and lag significantly.
Driver Reinstallation: Completely removed and reinstalled NVIDIA drivers (using pacman -Rdd).
Testing with AMD GPU (RX 5700 XT): When tested with the AMD RX 5700 XT (correct driver installed), everything worked smoothly, even with two monitors.

Additional information:
The issue is present on both the latest proprietary nvidia driver and the open-source nvidia-open driver.
Both drivers were installed from the Arch Linux repositories, and were the latest versions.

This issue doesn’t appear with AMD GPUs, even with dual monitors. It seems specific to NVIDIA, or perhaps KDE Plasma itself in this setup. I’ve also noticed a little better perfomance under X11, but the problem is still present. Any ideas on how to achieve smooth dual-monitor performance with KDE Plasma with NVIDIA would be greatly appreciated!

Thanks in advance for any tips or suggestions (and apologies for any translation errors)!

2 Likes

I think I know what you mean, try to set adaptive sync to never and see if it gets any better.

I have some minor stutter here too with 2 monitors, the stutter goes away temporarily if the GPU goes into a higher P-state. However the stutter isn’t very noticeable here anymore, it’s there but not as apparent.
I use the closed 560 driver with GSP off.

I also use a heavily patched kernel so it might have helped but there’s still an obvious performance issue with the driver and 2 monitors.

Okay, thanks, it really works, but the effect is small. There are fewer lags, especially the lags when changing the size of windows. However, the problem still persists, and it is still very far from the same state as with a single monitor, or with an AMD graphics card.

Yes. the driver needs some optimization regarding this issue. I know of no real way to fix it on user level.
You can also try to disable floating panel and use opaque though:

Can you try launching OBS studio (or Gpu Screen Recorder), launch it so it record some screen, and while recording, check smoothness of the desktop?

Tried in Wayland, Screen record (pipewire) of one of the screens, worked fine, no lag.

I meant @VladTop46 to test it xD

1 Like

I tried running OBS Studio and recording the screen, checking the smoothness of the desktop. Surprisingly, it really works — the smoothness is greatly improved during screen recording. But as it seemed to me, there are still small problems when resizing windows (perhaps seen in the example of the settings window).
I uploaded a video of the moment while I was checking the smoothness, in case you’re interested:

@VladTop46
About resizing windows - in the video it seems smooth for me, but probably I can’t see it, because it’s the youtube video and I can’t help anything about that.

Regarding improved smoothness when recording - that’s very strange and 99% Nvidia’s driver fault IMO. I have similar issue regarding browser scrolling but only on Wayland. Check out the topic I created: my issue (please give it a thumbs up or some comment, it you encounter something like this). When testing my issue I noticed 2 things: when GSP firmware was disabled, it improved smoothness, and also recording with OBS or Gpu Screen Recorder improves smoothness even more.

For now I use closed driver with GSP disabled and I use a little hack workaround regarding recording. I use Gpu Screen Recorder, and I set it up in such a way, that it autostarts via systemd service during boot. And since it starts recording since boot, it greatly improves my desktop smoothness. It also uses basically 0 resources (less than OBS). I recommend checking it out, on the author’s website: https://git.dec05eba.com/gpu-screen-recorder/about/ (it also says how you can setup such a systemd service)

1 Like

I read a little about GSP, and noticed that many people report performance problems when GSP is enabled. I disabled it:
Edit the file /etc/modprobe.d/nvidia-gsp.conf and set the flag:
options nvidia NVreg_EnableGpuFirmware=0
Then rebooted the system. And it completely eliminated the problems with the smoothness of KDE Plasma. Scrolling in browsers has become absolutely smooth, as well as moving and resizing windows. I checked everything with the proprietary nvidia driver package. The nvidia-open package I haven’t checked it yet, but I think for the sake of interest I’ll check it later and write about the result. Thank you all for your help!

1 Like

You can’t turn GSP off with the Nvidia open driver, it’s needed for the driver to function.

1 Like

You can’t disable GSP firmware with nvidia-open package, it is required. If you set flags like you said here, or add kernel option, it simply does nothing - GSP will be enabled.
But that’s bad news, because nvidia-open was said to be more actively developed than closed one. GSP problems need to be fixed Nvidia, before pushing it!

Oh, yes, I completely forgot about it. In any case, for now we can use a proprietary driver with GSP disabled until Nvidia fixes all the problems in nvidia-open.

I have the same issue. In my case, turning off GSP helped, but didn’t really solve the problem.

My setup: Kubuntu 24.10 / Plasma 6.1 / Wayland / Kernel 6.11.0-13-generic / Intel 13800H / RTX4060 Mobile.

To debug this, I have used the following tools:

  • Compositor Desktop effects: show FPS
  • nvtop: monitor GPU usage/frequencies
  • intel-gpu-tools package
  • gpu_screen_recorder
  • https://testufo.com/ to check the performance

With GSP off, I was getting 45 fps while opening https://testufo.com/ in Firefox. Not too bad, but my 4K screen is running at 98hz. As soon as I started gpu screen recorder, the FPS immediately went up to 98 fps, and the desktop felt much more responsive (animations, scrolling). Pausing the recording would immediately take me back to 45 FPS and the laggy desktop.

Looking at nvtop, I noticed the frequency of the Intel GPU shooting up from 300mhz to around 1000mhz as soon as the recording started. The Intel GPU was supposed to be completely off, as my laptop’s USB-C port is wired directly to the RTX4060. But for some reason the Intel GPU is active too.

I decided to test forcing the Intel GPU to stay at a higher speed with “intel_gpu_frequency -c min=1000”. I don’t know why, but it works! If the Intel GPU stays at a higher frequency, the lag immediately disappears. With this workaround I don’t need to keep a screen recording active to get a responsive desktop. The extra power usage is minimal: 1 or 2 extra watts.

I also tested the same scenario on X11. The problem can not be reproduced there. I can see the Intel GPU correctly increasing the frequency when going to https://testufo.com/ . But with wayland, it stays at a very low frequency, creating the issue.

This issue might be related to Poor multi-GPU performance due to CPU-side stalls in gbm_surface_lock_front_buffer · Issue #743 · NVIDIA/open-gpu-kernel-modules · GitHub

1 Like

(This is with GSP off)
In my experience, when the card is in P8 mode (RTX 4070), KDE tends to stutter. Doing anything that makes the performance mode increase, makes KDE smooth again as long as it doesn’t go down to P8 mode again.

In my opinion a desktop shouldn’t lag with a RTX 4070 just because it’s in P8 mode.

I recall KDE 5 was smoother than KDE 6 but a lot of things changed since then.

Can confirm this is happening also on GNOME. X11 is very smooth, but on Wayland there is sometimes some loss of smoothness. Recording one of the displays with OBS “solves” the problem and it’s smooth all the time.

I saw this happening on driver 565, but it’s still happening on driver 570. My card is an RTX 3060 Ti.

Using the open kernel module, so I can’t turn GSP off.

Hi, I have a similar issue but on a Lenovo Legion laptop with external dual-monitors setup, with Nvidia RTX 4060, on X11.

My issues are with certain apps: Android Studio/IntelliJ, Steam and when games are starting up through wine/proton. Didn’t tried native linux games because I don’t own any.

From what I gathered so far, my issues are related to the display connected to the HDMI. If I remove the display from HDMI it works butter smooth. The moment I attach a display to it, I notice the performance drop in everything, even if it’s not lagging.
The monitors I use are a pair of DELL G2722HS, same model, bought the same time.

In 535 driver, Android Studio works fluent, though the Steam and games part is still the same and present on Gnome shell (Ubuntu 24.04).

Update:
Somehow the Android Studio issue is no longer present even in version 550 (550.144.03), on KDE Neon. Forgot to mention, previously that the issues where on KDE Neon.
The Steam and games part is still the same, but since it’s just the startup part, it doesn’t bother me.

My previous setup was:

  • Monitor 1 → through HDMI + HDMI - USB-C adapter (detected DisplayPort)
  • Monitor 2 → through HDMI

Current setup:

  • Monitor 1 → through DisplayPort + DisplayPort - USB-C adapter
  • Monitor 2 → through HDMI

Don’t know if the previous setup was the issue or driver.

Thought it might be worth mentioning here.

I have had lots of intermittent stuttering problems as well, and I found the following (several overlapping issues):

  1. different DEs don’t handle full-screen applications the same, particularly in multi-monitor setups. Even disabling compositing on full-screen windows doesn’t work reliably. With compositing on and VSYNC enabled in XFCE for example, games run at exactly half VSYNC…
  2. nVidia doesn’t reliably detect which display an application is running on for VSYNC purposes…there is an environment variable to force sync to a particular display for a given application. E.g. I have a 165Hz laptop display, and a 75Hz set of external displays…running on the laptop display would get stuck @ 75Hz unless I force the env var to sync to the laptop display.
  3. I had a faulty USB cable generating USB hot-plug interrupts whenever my phone was plugged in, approx. every 3 seconds. This would cause momentary freezes/stuttering. This was difficult to track down, and it’s not clear why this event affects the graphics at all, but I suspect it’s disabling interrupts.
  4. If you have a dual-graphics setup like a laptop, and it has a MUX, and you care about latency, make sure you’re running your app(s) on the GPU that’s driving the display you’re using. PRIME is OK but 1 video frames’ worth of latency is a big hit.

I have since resolved all of these issues and have no more stuttering (for the first time in over a year!). I should mention I’m on the latest nV drivers (570.86.16-8 on Arch Linux), and the open kernel modules.

Ok, was running some more tests on new driver version 570.124.04 released today.

The issue seems mostly fixed. During normal desktop usage, animations and scrolling feel overall smoother and basically on par with X11. However, the lag/loss of smoothness can still happen if I leave my computer for a while. When I return, the first desktop animation or scroll is still a bit laggy, but then it recovers. Probably because the GPU is on the lowest p-state as I leave my computer idle and then on the first input, it needs to recover to go to a higher pstate to restore the normal smoothness. Or at least that’s my very superficial understanding of the issue, I might be completely wrong on that point.

So yeah, definitely an improvement and it doesn’t bother me as much as before. I feel like X11 still behaves slightly better, but Wayland is much more bearable now.

Hopefully it will keep improving with future driver versions.

I tested on GNOME, can anyone check how it’s doing in KDE?