Kscreenlocker_greet high CPU use

Hi, whenever I lock the screen or it turns off when not using it, it seems that at least “kscreenlocker_greet” process loads the CPU, which triggers the fan. I have disabled indexing for search. Using Build20240326, I think this started after the Plasma 6 update. There may be other culprit(s).

I know this because I used a script to log “ps -e -o pcpu,pmem,args --sort=pcpu” what processes were running high when the screen is locked.

------IDLE

%CPU %MEM ARGS jue 28 mar 2024 07:46:15 CST
 0.1  0.0 [kworker/u24:52-gfx_0.0.0]
 0.1  0.0 [kworker/u24:54-btrfs-endio-write]
 0.1  0.0 [kworker/u24:91-gfx_0.0.0]
 0.2  0.2 /usr/bin/ksmserver
 0.9  0.5 /usr/bin/Xorg.bin
 1.1  1.5 /usr/bin/kwin_x11
 1.3  0.7 /usr/bin/konsole
 1.9  1.0 /usr/bin/dolphin
 2.3  1.1 /usr/bin/kate
 3.5  3.4 /usr/bin/plasmashell

 ------IDLE + Firefox

%CPU %MEM ARGS jue 28 mar 2024 07:52:10 CST
 0.3  0.6 /usr/libexec/kf6/kioexec
 0.8  0.7 /usr/bin/konsole
 0.8  0.9 /usr/lib64/firefox/firefox
 1.0  0.5 /usr/bin/Xorg.bin
 1.0  0.9 /usr/bin/dolphin
 1.1  1.5 /usr/bin/kwin_x11
 1.5  1.1 /usr/bin/kate
 2.6  1.3 /usr/lib64/firefox/firefox
 3.7  3.4 /usr/bin/plasmashell
 6.4  3.3 /usr/lib64/firefox/firefox

------ Manual Lock Screen

%CPU %MEM ARGS jue 28 mar 2024 07:45:09 CST
 0.1  0.0 [kworker/u24:93-btrfs-endio-write]
 0.1  0.0 [kworker/u24:0-btrfs-endio-write]
 0.9  0.6 /usr/bin/Xorg.bin
 1.1  1.5 /usr/bin/kwin_x11
 1.1  0.2 mplayer
 1.4  0.8 /usr/bin/konsole
 2.2  1.0 /usr/bin/dolphin
 2.5  1.1 /usr/bin/kate
 3.5  3.4 /usr/bin/plasmashell
 7.9  1.4 /usr/libexec/kscreenlocker_greet

------ Manual Lock Screen, Firefox running.

%CPU %MEM ARGS jue 28 mar 2024 07:54:12 CST
 0.7  0.7 /usr/bin/konsole
 0.8  0.9 /usr/bin/dolphin
 0.9  1.0 /usr/lib64/firefox/firefox
 1.0  0.6 /usr/bin/Xorg.bin
 1.1  1.5 /usr/bin/kwin_x11
 1.1  1.3 /usr/lib64/firefox/firefox
 1.5  1.1 /usr/bin/kate
 2.8  3.3 /usr/lib64/firefox/firefox
 3.7  3.5 /usr/bin/plasmashell
15.7  1.5 /usr/libexec/kscreenlocker_greet --immediateLock
%CPU %MEM ARGS jue 28 mar 2024 07:54:22 CST
 0.8  0.7 /usr/bin/konsole
 0.9  0.9 /usr/bin/dolphin
 0.9  1.0 /usr/lib64/firefox/firefox
 1.0  0.6 /usr/bin/Xorg.bin
 1.1  1.3 /usr/lib64/firefox/firefox
 1.2  1.5 /usr/bin/kwin_x11
 1.5  1.1 /usr/bin/kate
 2.8  3.3 /usr/lib64/firefox/firefox
 3.7  3.5 /usr/bin/plasmashell
10.0  1.5 /usr/libexec/kscreenlocker_greet --immediateLock
%CPU %MEM ARGS jue 28 mar 2024 07:54:32 CST
 0.8  0.7 /usr/bin/konsole
 0.9  0.9 /usr/bin/dolphin
 0.9  1.2 /usr/lib64/firefox/firefox
 1.0  0.6 /usr/bin/Xorg.bin
 1.0  1.3 /usr/lib64/firefox/firefox
 1.2  1.5 /usr/bin/kwin_x11
 1.6  1.1 /usr/bin/kate
 2.8  3.3 /usr/lib64/firefox/firefox
 3.7  3.5 /usr/bin/plasmashell
 8.5  1.5 /usr/libexec/kscreenlocker_greet

Also took a screenshot of the system monitor where it shows it’s affecting all cores.

Thank you.

It seems to be related to this really old bugs.

https://bugs.kde.org/show_bug.cgi?id=316348

https://github.com/sddm/sddm/issues/323

WARNING NOTE: before playing with this problem, backup ~/.config or use a test user account. While experimenting with the screen lock my session fell to bits and my desktop config became corrupted. I had to restore parts of ~/.config from last nights backup.

Are you seeing core dumps? I just tried the screen lock on TW-20240325 KDE6/X11/Nvidia-550.54 and I see a series of core dumps which was periodically burning the CPU:

% coredumpctrl
...
Fri 2024-03-29 06:55:10 NZDT  2513  500 500 SIGSEGV present      /usr/bin/plasmashell                                     22.4M
Fri 2024-03-29 15:01:24 NZDT  3056  500 500 SIGSEGV present      /usr/bin/plasmashell                                     38.6M
Fri 2024-03-29 15:02:05 NZDT  4248  500 500 SIGSEGV present      /usr/bin/plasmashell                                     37.5M
Fri 2024-03-29 15:03:04 NZDT  4499  500 500 SIGSEGV present      /usr/bin/plasmashell                                     37.2M
Fri 2024-03-29 15:03:35 NZDT  4759  500 500 SIGSEGV present      /usr/bin/plasmashell                                     33.7M
Fri 2024-03-29 15:04:16 NZDT  4971  500 500 SIGSEGV present      /usr/bin/plasmashell                                     36.7M
Fri 2024-03-29 15:04:56 NZDT  5145  500 500 SIGSEGV present      /usr/bin/plasmashell                                     36.7M
Fri 2024-03-29 15:05:01 NZDT  5309  500 500 SIGSEGV present      /usr/bin/plasmashell                                     22.6M
Fri 2024-03-29 15:05:25 NZDT  5514  500 500 SIGSEGV present      /usr/bin/plasmashell                                     22.1M
Fri 2024-03-29 15:23:23 NZDT  2541  500 500 SIGSEGV present      /usr/bin/plasmashell                                     26.1M
Fri 2024-03-29 15:23:25 NZDT  3915  500 500 SIGSEGV present      /usr/bin/plasmashell                                     28.8M
Fri 2024-03-29 15:51:50 NZDT  5429  500 500 SIGSEGV present      /usr/bin/plasmashell                                     47.0M
Fri 2024-03-29 15:52:30 NZDT 13188  500 500 SIGSEGV present      /usr/bin/plasmashell                                     36.2M

The above are not all from one test. I carried out a series of tests due to the session sometimes falling apart.

I ran coredumpctl debug on the last one, but it didn’t produce any clues I could work with:

coredumpctl debug 
...
(gdb) where
#0  0x00007f70d6e949ec in __pthread_kill_implementation () at /lib64/libc.so.6
#1  0x00007f70d6e41176 in raise () at /lib64/libc.so.6
#2  0x00007f70da155b93 in KCrash::defaultCrashHandler(int) () at /lib64/libKF6Crash.so.6
#3  0x00007f70d6e41240 in <signal handler called> () at /lib64/libc.so.6
#4  0x00007f70d82c8fd0 in QOpenGLContext::isValid() const () at /lib64/libQt6Gui.so.6
#5  0x00007f70d82c9902 in QOpenGLContext::doneCurrent() () at /lib64/libQt6Gui.so.6
#6  0x00007f70d82c99f6 in  () at /lib64/libQt6Gui.so.6
#7  0x00007f70d78e81e9 in QThreadStorageData::finish(void**) () at /lib64/libQt6Core.so.6
#8  0x00007f70d7a0314e in  () at /lib64/libQt6Core.so.6
#9  0x00007f70d78e5788 in  () at /lib64/libQt6Core.so.6
#10 0x00007f70d6e92bb2 in start_thread () at /lib64/libc.so.6
#11 0x00007f70d6f1400c in clone3 () at /lib64/libc.so.6

If this happens after I next update TW, I’ll raise a bug, feel free to raise one sooner.

I think it’s something else. I ran it, but found no correlation, on the few events that it showed.

So you’re not seeing any coredumps reported by coredumpctl?

There are a few, but i’m pretty sure it’s not related, the last one was on Tuesday, and I’ve experienced the issue several times today.

1 Like

Maybe there is more than one bug here, maybe the screenlocker AND plasmashell have different issues.

When switching to a konsole (cltr-alt-f1), I see plasmashell consuming 10 seconc bursts of CPU. I logged bug 1222174 - Switching to text console causes KDE6/X11 plasmashell high CPU usage.