Kde plasma 6 wayland lag spikes and high gpu usage on idle

I am running kde plasma 6 on fedora and when running on my rtx 3080 i am having random lag spikes on my desktop, to the point opening system settings occurs lag spikes or occasionally using the terminal.

using nvtop my gpu has an average idle usage of 30% but sometimes it randomly spikes to 80-90%. For my nvidia drivers i am currently using the discrete drivers version 580.

also for nvtop the highest usage pids
are
/usr/bin/plasmashell --no-respawn - gpu 0% (this switches between wayland and the plasmashell)

second is
usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 9 --xwayland-display : 0 --xwayland-xauthority /run/user/1000/xauth_tFicTx --wayland -

I also noticed that this process randomly spikes to 100% CPU usage
any idea to fix this? completely new to Linux so any help is much appreciated!

QT version: 6.9.2
Kernal Version: 6.16
CPU: Ryzen 5 3600
GPU: NVIDIA RTX 3080

Not normal - here’s my 2080 running KDE (clipped from the top of the nvtop window if you want to compare. Should be idling in low single figures and spiking to 100% use should not happen unless you’re actively using it. In fact spikes period should not happen without you having a clear indication of why.

Device 0 [NVIDIA GeForce RTX 2080] PCIe GEN 1@16x RX: 390.0 KiB/s TX: 3.909 MiB/s
 GPU 300MHz  MEM 405MHz  TEMP  45°C  FAN   0%   POW  23 / 215 W
 GPU[||                               5%] MEM[|||||               1.216Gi/8.000Gi]

Post the output of inxi -Fzxx so we get a good look at the kit you’re rurnning on, make sure which drivers are loaded and so forth.

You could also run an fpaste --sysinfo --printonly command and paste the output here as pre-formatted text (the </> button above). If the output is too long then remove the --printonly parameter and it’ll send it to pastebin and give you the URL back.

https://paste.centos.org/view/c03b39e2 - here’s the link and the output for the inxi command - inxi -Fzxx
System:
Kernel: 6.16.12-200.fc42.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 15.2.1
Desktop: KDE Plasma v: 6.4.5 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
Distro: Fedora Linux 42 (KDE Plasma Desktop Edition)
Machine:
Type: Desktop System: Micro-Star product: MS-7C95 v: 1.0
serial:
Mobo: Micro-Star model: B550M PRO-VDH WIFI (MS-7C95) v: 1.0
serial: UEFI: American Megatrends LLC. v: 2.D0
date: 12/12/2022
Battery:
Device-1: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
serial: charge: 10% (should be ignored) status: discharging
CPU:
Info: 6-core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2
rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
Speed (MHz): avg: 3597 min/max: 558/4208 boost: enabled cores: 1: 3597
2: 3597 3: 3597 4: 3597 5: 3597 6: 3597 7: 3597 8: 3597 9: 3597 10: 3597
11: 3597 12: 3597 bogomips: 86402
Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a
ssse3 svm
Graphics:
Device-1: NVIDIA GA102 [GeForce RTX 3080] vendor: eVga.com. driver: nvidia
v: 580.95.05 arch: Ampere pcie: speed: 16 GT/s lanes: 16 ports: active: DP-1
empty: DP-2,DP-3,HDMI-A-1 bus-ID: 2b:00.0 chip-ID: 10de:2206
Display: wayland server: Xwayland v: 24.1.8 compositor: kwin_wayland
driver: gpu: nv_platform,nvidia,nvidia-nvswitch display-ID: 0
Monitor-1: DP-1 model: Mi Monitor res: 3440x1440 hz: 144 dpi: 110
diag: 864mm (34")
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: 580.95.05
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
display-ID: :0.0
API: Vulkan v: 1.4.313 surfaces: N/A device: 0 type: discrete-gpu
driver: nvidia device-ID: 10de:2206 device: 1 type: cpu
driver: mesa llvmpipe device-ID: 10005:0000
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor gpu: nvidia-settings,nvidia-smi
wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
Device-1: NVIDIA GA102 High Definition Audio vendor: eVga.com.
driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
bus-ID: 2b:00.1 chip-ID: 10de:1aef
Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio
vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
lanes: 16 bus-ID: 2d:00.4 chip-ID: 1022:1487
Device-3: C-Media USB Advanced Audio Device
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 bus-ID: 1-5:2 chip-ID: 0d8c:016c
API: ALSA v: k6.16.12-200.fc42.x86_64 status: kernel-api
Server-1: PipeWire v: 1.4.9 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: MEDIATEK MT7921K Wi-Fi 6E 80MHz driver: mt7921e v: kernel pcie:
speed: 5 GT/s lanes: 1 bus-ID: 29:00.0 chip-ID: 14c3:0608
IF: wlo1 state: up mac:
Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel pcie: speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 2a:00.0 chip-ID: 10ec:8168
IF: enp42s0 state: down mac:
Bluetooth:
Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
speed: 480 Mb/s lanes: 1 bus-ID: 1-9:5 chip-ID: 0e8d:0608
Report: btmgmt ID: hci0 rfk-id: 0 state: up address: bt-v: 5.3
lmp-v: 12
Drives:
Local Storage: total: 2.29 TiB used: 344.17 GiB (14.7%)
ID-1: /dev/nvme0n1 model: 512GB PCS PCIe M.2 SSD size: 476.94 GiB
speed: 31.6 Gb/s lanes: 4 serial: temp: 39.9 C
ID-2: /dev/nvme1n1 vendor: Acer model: SSD FA200 1TB size: 931.51 GiB
speed: 63.2 Gb/s lanes: 4 serial: temp: 38.9 C
ID-3: /dev/sda vendor: Crucial model: CT1000BX500SSD1 size: 931.51 GiB
type: USB rev: 3.0 spd: 5 Gb/s lanes: 1 serial:
Partition:
ID-1: / size: 1.37 TiB used: 343.71 GiB (24.4%) fs: btrfs
dev: /dev/nvme0n1p1
ID-2: /boot size: 1004.8 MiB used: 457.4 MiB (45.5%) fs: ext4
dev: /dev/sda2
ID-3: /boot/efi size: 574.8 MiB used: 19.3 MiB (3.4%) fs: vfat
dev: /dev/sda1
ID-4: /home size: 1.37 TiB used: 343.71 GiB (24.4%) fs: btrfs
dev: /dev/nvme0n1p1
Swap:
ID-1: swap-1 type: zram size: 8 GiB used: 3.6 MiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 64.9 C mobo: 49.2 C
Fan Speeds (rpm): N/A
Info:
Memory: total: 40 GiB available: 39.09 GiB used: 6.86 GiB (17.5%)
Processes: 488 Power: uptime: 3h 30m wakeups: 0 Init: systemd v: 257
target: graphical (5) default: graphical
Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 18
Compilers: gcc: 15.2.1 Shell: Bash v: 5.2.37 running-in: konsole
inxi: 3.3.39

Nothing looks too amiss in the fpaste output, apart from the pretty high load average.

* Load average (uptime):
      16:16:10 up  3:28,  2 users,  load average: 6.33, 7.01, 8.14

and the relatively high CPU temperature for a system which I’d expect to be idling.

System Temperatures: cpu: 64.9 C mobo: 49.2 C

Are you aware of what is currently running on this machine and it’s all as you’d expect? I ask this because I’d expect to see load averages under 1 as a rule, unless someone really does have a large package build going on or a kernel recompile and so forth. Maybe you really do have a load of background jobs currently active - I don’t know your use case.

You can see what is actually running or uninterruptible with something like ps -eLo pid,tid,stat,comm,%cpu --sort=-%cpu | awk '$3 ~ /R|D/'. Feel free to post that output as pre-formatted text.

i got this as a result - luis@fedora:~$ ps -eLo pid,tid,stat,comm,%cpu --sort=-%cpu | awk ā€˜$3 ~ /R|D/’
41406 41406 R+ ps 200
678 678 D kworker/u50:10+ 1.8
luis@fedora:~$

  • well i was using kvantum for themes and a few global themes but that is pretty much it.

But I think i was able to narrow down the issue.

I reinstalled my OS a few times to check what is the determining factor and found this.. on a brand new install doing sudo dnf update seems to automatically install the gpu drivers but with some issues.

im presuming drivers are installed since on system settings its naming my gpu with the discrete label on it, and it has cuda installed after doing the update.

and after rebooting it, it has the random spike usages again. so i presume the issue must be coming from the drivers itself potentially

sudo dnf update on a new system probably updates the nvidia-gpu-firmware package, but not the actual Nvidia drivers. Those won’t be installed unless you explicitly install them.

If you want to see for sure what driver is in use, then do fpaste --printonly --videoinfo

In the output, look for ā€œKernel driver in useā€ under your video card - this should state either nvidia or nouveau. In your earlier post it was nvidia, but if you do it on a newly installed system you should see nouveau until you install the drivers and restart.

1 Like

yh i see nvidia is in use in the logs. i was googling for this issue and it might be an issue with kde plasma as other users were having the same problem on kde - Plasmashell uses a lot of GPU memory - Help - KDE Discuss

But that issue was solved over a year ago with 5.27.11.

This not likely what you are seeing as you will be running 6.4.something.

Just had to force reboot my computer due to plasma using all my vram. I have a low end card but KDE has been using almost all my vram since the latest updates.

I normally have two or three sessions open but since the latest Plasma updates, I have a hard time with two sessions open. I suspect some setting in my one session is causing weird issues but kscreenlocker is using over 200 meg for a locked session. Firefox with hundreds of tabs open is using less vram.

From nvtop

3143 xxx 0 Graphic 0% 195MiB 10% 3% 808MiB /usr/lib64/firefox/firefox

13973 XXXX 0 Graphic 0% 212MiB 10% 0% 232MiB /usr/libexec/kscreenlocker_greet --immediateLock --graceTime 5000 --ksldfd 248

Once I open the suspect session, I cannot even move the mouse pointer.
Need to look at it more.

Using plasma 6.5.1-1 with the issue.

Going to remove all config files and see what happens in the third account. Still won’t fix the excessive vram usage by kscreenlocker.

rm

If you replicate this situation, can you use nvtop to kill the impacted session (F9 is the shortcut key) - does that kick things back into life and release the memory consumed or does it appear to be leaked, never to be seen again until a reboot?

For reference, here’s my RTX2080, using Plasma 6.5.1 and the open nvidia drivers. Not sure it’ll help much, but it may give you a reference point for comparison.

    PID  USER DEV     TYPE  GPU        GPU MEM    CPU  HOST MEM Command
   2945 steve   0  Graphic N/A     242MiB   3%     1%   1123MiB /app/zen/zen --name app.zen_browser.zen
   2441 steve   0  Graphic N/A      50MiB   1%     0%    186MiB /usr/bin/Xwayland :0 -auth /run/user/1000/xauth_luQpFt -listenfd 8 -listenfd 9 -displayfd 99 -wm 101 -rootless -enable-ei-portal
   3412 steve   0  Graphic N/A       2MiB   0%     0%    154MiB /usr/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent
   3055 steve   0  Graphic N/A       2MiB   0%     0%    106MiB /usr/bin/akonadi_control
   3415 steve   0  Graphic N/A       2MiB   0%     0%    109MiB /usr/bin/akonadi_followupreminder_agent --identifier akonadi_followupreminder_agent
   3420 steve   0  Graphic N/A       2MiB   0%     0%    109MiB /usr/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent
   3421 steve   0  Graphic N/A       2MiB   0%     0%    157MiB /usr/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent
   3422 steve   0  Graphic N/A       2MiB   0%     0%    114MiB /usr/bin/akonadi_mailmerge_agent --identifier akonadi_mailmerge_agent
   3423 steve   0  Graphic N/A       2MiB   0%     0%    109MiB /usr/bin/akonadi_migration_agent --identifier akonadi_migration_agent
   3424 steve   0  Graphic N/A       2MiB   0%     0%    115MiB /usr/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent
   3425 steve   0  Graphic N/A       2MiB   0%     0%    157MiB /usr/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent
   3426 steve   0  Graphic N/A       2MiB   0%     0%    151MiB /usr/bin/akonadi_unifiedmailbox_agent --identifier akonadi_unifiedmailbox_agent
 178984 steve   0  Graphic N/A       2MiB   0%     0%    217MiB /usr/bin/dolphin
 152973 steve   0  Graphic N/A       2MiB   0%     0%    141MiB /usr/bin/dolphin --daemon
 185430 steve   0  Graphic N/A      82MiB   1%     2%    200MiB /usr/bin/ghostty --gtk-single-instance=true --initial-window=false
   2562 steve   0  Graphic N/A       2MiB   0%     0%    102MiB /usr/bin/kaccess
   2875 steve   0  Graphic N/A       2MiB   0%     0%    136MiB /usr/bin/kalendarac
   2708 steve   0  Graphic N/A       2MiB   0%     0%    151MiB /usr/bin/kdeconnectd
   2496 steve   0  Graphic N/A       2MiB   0%     0%    153MiB /usr/bin/kded6
   2049 steve   0  Graphic N/A       2MiB   0%     0%    133MiB /usr/bin/ksecretd --pam-login 13 14
   2493 steve   0  Graphic N/A       2MiB   0%     0%     97MiB /usr/bin/ksmserver
  11508 steve   0  Graphic N/A       2MiB   0%     0%    116MiB /usr/bin/kwalletd6
   2342 steve   0  Graphic N/A     178MiB   2%     1%    278MiB /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_luQpFt --xwayland
 168226 steve   0  Graphic N/A     127MiB   2%     0%    213MiB /usr/bin/maliit-keyboard
 140600 steve   0  Graphic N/A     168MiB   2%     0%    820MiB /usr/bin/plasmashell --no-respawn
   2819 steve   0  Graphic N/A       2MiB   0%     0%    122MiB /usr/bin/xwaylandvideobridge
   2867 steve   0  Graphic N/A       2MiB   0%     0%    222MiB /usr/libexec/DiscoverNotifier --check-delay 20
  37377 steve   0  Graphic N/A       2MiB   0%     0%    132MiB /usr/libexec/baloorunner
   2563 steve   0  Graphic N/A       2MiB   0%     0%    193MiB /usr/libexec/kf6/polkit-kde-authentication-agent-1
   2565 steve   0  Graphic N/A       2MiB   0%     0%    195MiB /usr/libexec/xdg-desktop-portal-kde