Stuttering and bad performance across entire Plasma desktop with Wayland on NVIDIA

I have updated from Fedora 39 to Fedora 41 two days ago and have done some troubleshooting, including the correction of fault GRUB config generation scripts, rebuilding the proprietary NVIDIA driver manually and fixing v4l2loopback. Those are beside the point. The main issue is that my entire desktop feels sluggish. The built-in performance monitor desktop effect of KDE Plasma shows a frame rate that is constantly above my monitor’s refresh rate with 75Hz. It doesn’t feel like it’s really that high, though. Another thing is that in games, that use built-in V-Sync options (some force it), have horrendous frame consistency, frame pacing and frame rates. So is it possible that either V-Sync is currently broken on Wayland when using the latest NVIDIA driver and/or Plasma 6.2.4? (Note: I am using an NVIDIA GeForce RTX 3070 Ti) Or could there be issues with explicit sync? Or is it more likely to be an error on my side? It would appreciate any assistance and feedback. It would be great to know whether others with a similar setup experience the same kinds of issues. Thank you in advance!

First we would need to know the hardware and drivers used.
Please post the output of inxi -Fzxx and dnf list --installed \*nvidia\*.
Post those by copy & paste the text then highlight the pasted text and click the </> button so the result retains the on-screen formatting.

Output from the inxi command:

System:
  Kernel: 6.12.4-200.fc41.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.43.1-4.fc41
  Desktop: KDE Plasma v: 6.2.4 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 41 (KDE Plasma)
Machine:
  Type: Desktop Mobo: Micro-Star model: MAG Z590 TOMAHAWK WIFI (MS-7D08)
    v: 1.0 serial: <superuser required> UEFI: American Megatrends LLC. v: 2.60
    date: 05/25/2022
CPU:
  Info: 8-core model: 11th Gen Intel Core i9-11900K bits: 64 type: MT MCP
    arch: Rocket Lake rev: 1 cache: L1: 640 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 800 min/max: 800/5100:5300 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800
    14: 800 15: 800 16: 800 bogomips: 112128
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070 Ti] vendor: Palit Microsystems
    driver: nvidia v: 565.77 arch: Ampere pcie: speed: 16 GT/s lanes: 16 ports:
    active: none off: DP-1,HDMI-A-1 empty: DP-2,DP-3 bus-ID: 01:00.0
    chip-ID: 10de:2482
  Device-2: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-10:5 chip-ID: 05a3:9331
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: nvidia
    unloaded: modesetting,nouveau alternate: fbdev,nv,vesa gpu: nvidia
    d-rect: 3840x1080 display-ID: 0
  Monitor-1: DP-1 pos: primary,left res: 1920x1080 size: N/A
  Monitor-2: HDMI-A-1 pos: right res: 1920x1080 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 2 drv: swrast
    gbm: drv: nvidia surfaceless: drv: nvidia wayland: drv: nvidia x11:
    drv: nvidia inactive: device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 565.77
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2
    display-ID: :0.0
  API: Vulkan v: 1.3.296 surfaces: xcb,xlib,wayland device: 0
    type: discrete-gpu driver: N/A device-ID: 10de:2482 device: 1 type: cpu
    driver: N/A device-ID: 10005:0000
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:43c8
  Device-2: NVIDIA GA104 High Definition Audio vendor: Palit Microsystems
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:228b
  Device-3: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-10:5 chip-ID: 05a3:9331
  Device-4: Micro Star USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-5:4 chip-ID: 0db0:4240
  API: ALSA v: k6.12.4-200.fc41.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Ethernet I225-V vendor: Micro-Star MSI driver: igc v: kernel
    pcie: speed: 5 GT/s lanes: 1 port: N/A bus-ID: 04:00.0 chip-ID: 8086:15f3
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wi-Fi 6E AX210/AX1675 2x2 [Typhoon Peak] driver: iwlwifi
    v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 05:00.0 chip-ID: 8086:2725
  IF: wlp5s0 state: down mac: <filter>
  IF-ID-1: br-4b70109f9e0d state: down mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: ham0 state: unknown speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-4: tailscale0 state: unknown speed: -1 duplex: full mac: N/A
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-14:9 chip-ID: 8087:0032
  Report: hciconfig ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 2.73 TiB used: 1.2 TiB (44.0%)
  ID-1: /dev/nvme0n1 vendor: Kingston model: SNVS1000G size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 46.9 C
  ID-2: /dev/sda vendor: Seagate model: ST2000DM008-2UB102 size: 1.82 TiB
    speed: 6.0 Gb/s serial: <filter> temp: 38 C
Partition:
  ID-1: / size: 457.5 GiB used: 354.65 GiB (77.5%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-2: /boot/efi size: 96 MiB used: 47.5 MiB (49.5%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 2 MiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 48 GiB available: 46.91 GiB used: 8.68 GiB (18.5%)
  Processes: 497 Power: uptime: 8h 28m wakeups: 2 Init: systemd v: 256
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 107
    Compilers: clang: 19.1.5 gcc: 14.2.1 Shell: Bash v: 5.2.32
    running-in: konsole inxi: 3.3.36

Output from the dnf list command:

akmod-nvidia.x86_64                       3:565.77-1.fc41 <unknown>
kmod-nvidia-6.12.4-200.fc41.x86_64.x86_64 3:565.77-1.fc41 @commandline
nvidia-gpu-firmware.noarch                20241210-1.fc41 <unknown>
nvidia-modprobe.x86_64                    3:565.77-1.fc41 <unknown>
nvidia-persistenced.x86_64                3:565.77-1.fc41 <unknown>
nvidia-settings.x86_64                    3:565.77-1.fc41 <unknown>
nvidia-texture-tools.x86_64               2.1.2-10.fc41   <unknown>
xorg-x11-drv-nvidia.x86_64                3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-cuda.x86_64           3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-cuda-libs.i686        3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-libs.i686             3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-libs.x86_64           3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-power.x86_64          3:565.77-3.fc41 <unknown>
xorg-x11-drv-nvidia-xorg-libs.x86_64      3:565.77-3.fc41 <unknown>

Try rebuilding the driver with sudo akmods --rebuild --force then reboot

I had already (force-)rebuilt the kernel module multiple times using a different command, but I can try that. After asking around a bit more, the problem seems to affect some other people too.

EDIT: I saw in a different post that wiping the cache would be suggested. I’m going to try that too just in case.

I tried that now, but it didn’t do anything. Off to test wiping the cache now…

I just noticed that inxi indicates all your 16 cpu cores are running at minimum speed (800).
What is your power profile set to? Powersaving? Balanced? Performance?

Performance. I assume that the clock speed should change based on load.

The speed appears to be locked at powersave. Try switching from performance mode to power save then after that is saved try switching it back to performance.

It has been known for things to glitch at times and forcing a change has cleared the glitch.

Tried that as well, but when in power saving mode, it’s even worse and going back up to performance changes nothing.

I find Resources to be helpful when I want to see what speeds my CPU cores are clocking up/down (you definitely can do it on the command line, but I find this less tedious).

Try monitoring your clock speeds with something like that open while you experience the issue. Make sure under performance mode it’s reaching the speeds you would expect.

All CPU cores fluctuate between clock-speeds of 800MHz and 5.1GHz. Is that normal? (When running VKCube and my PC is in performance mode)

Yep, that seems normal! In my experience, performance mode makes it so that your CPU cores clock all the way up if they have any work to do and clock all the way down when idle. That’s in contrast to the other modes like balanced which will gradually clock up to 100% speed depending on how much load it’s under.

The built-in performance monitor desktop effect of KDE Plasma shows a frame rate that is constantly above my monitor’s refresh rate with 75Hz. It doesn’t feel like it’s really that high, though.

Regarding this, if you haven’t already, try changing your refresh rate to something else and then changing it back to your desired refresh rate. Once in a rare while I’ve encountered a bug where my refresh rate says 144hz but it’s very clearly not. Toggling it between two seems to fix that. Might not be your issue, but worth a shot!

I believe that I had already tried that (for one monitor at least). It always feels weird and still, the frame rate for most games that use V-Sync is abysmal. It’s inconsistent and not what V-Sync is supposed to be like at all. Even in glxgears and vkcube.

There have been some updates to Plasma components, Wayland and EGL and stuff, but it’s still pretty bad. Isn’t there anything else I can check or any other hints?

Hey @AlphaCraft9658 - sorry I don’t have a ton of insight as I’m not a KDE user, so I’m unfamiliar with its quirks. That being said, here’s what I might do:

Determine if it’s a driver issue or something else:

Try switching to the Nouveau drivers and see if the issue persists. If the issue isn’t present when not using the Nvidia drivers, try uninstalling them and reinstalling them (preferably from RPM Fusion as that’s what most folks here use).

If you still have the issue even when not using the Nvidia drivers, then something else is afoot. A good test from that point would be to boot up a live USB of Fedora 41 and see if the issue persists there. If it does, there’s a good chance the issue is hardware related. If it does not, then there’s probably some package/config in your current setup that’s causing the issue. This is where I would test a fresh installation and begin to replicate the setup and see when the issue starts happening again to identify what the culprit is.

Considering you mentioned you upgraded from 39 to 41, there’s a chance just doing a fresh installation will solve the issue, but try the suggestions above first before you blow everything away (unless that’s not an issue and you want to jump right in).

1 Like

I have tested it with Nouveau, and it seems not to happen there. It only is really bad when moving my mouse cursor a lot, especially across XWayland windows. Reinstalling the NVIDIA driver (assuming I did it correctly) did not seem to have solved the problem. And also on the proprietary drivers, moving the mouse cursor across XWayland windows degrades the frame rate when using V-Sync. It definitely doesn’t happen on X11 natively, but is apparently an issue exclusive to NVIDIA’s proprietary drivers and Wayland, and it appears that I am not the only one with this issue, and others have installed Fedora 41 freshly.

I’m also experiencing this issue. Seems to be a combination problem of Plasma, Wayland and Nvidia drivers. Which is great, since that’s… kind of my setup. :')

1 Like

This worked for me well enough to share: Solution: NVIDIA 470 drivers and high kwin_wayland CPU usage cause sluggish system (KDE)

This is essentially a fallback to nouveau or X11. Don’t want both. Nouveau is basically useless for gaming right now and even the desktop is pretty slow, if not sluggish, and X11 has big issues with the floating panels and is generally not that well optimized anymore. My assumption, based on the symptoms and current solutions, is that it has to do with the proprietary NVIDIA GPU drivers having some bug in maybe the explicit sync implementation or something, which should hopefully resolved pretty soon.

1 Like