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).

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

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.

OpenSuse Tumbleweed, Plasma 6.0.3

From the ps output it looks like kscreenlocker_greet does use more CPU than expected, but not terribly a lot, and I don’t see how 10% CPU usage should trigger the fan.

That being said, if you can run perf to see what is going on, and post the results there - that would be very helpful in understanding what is going on.

To use perf. make sure you have the correct linux-tools package installed: install the basic linux-tools-common package then run perf and it will tell you what you actually need to install.

Then run the following command, provide your password, then lock the screen (change the first sleep to something more if you want to lock after idle or something:

sudo true; sleep 10; sudo perf record -p $(pidof kscreenlocker_greet) -g -- sleep 30

After 30 seconds, unlock the screen and run perf report -n --stdio | cat and paste the output of that here.

What I’ve noticed, is that after locking the session and switching to a console and running htop, I can see plasmashell --no-respawn periodically ramping one CPU up to about 100% for several seconds, and then relenting for about ten seconds before repeating the burn. My CPU fan ramps up and down accordingly.

This would be on OpenSUSE Tumbleweed 20240412 KDE Plasma 6.0.3.

(Interestingly - different issue: when I just did this experiment today, after unlocking the session, my panel was blank and the background and desktop icons are missing. The panel still worked if I guessed and clicked where the launcher, calendar, etcetera is located. Entering Edit-Mode and switching floating off/on fixed the panel, but I had to re-login to get the other stuff back.)

On further tests…

I logged in remotely via ssh and ran htop.

I only see excessive CPU consumption if I switch away from the lock screen to a console. Even doing so without logging into the console is enough.

When switched to a console, but not logged in, I did see the greeter as well as plasmashell periodically consuming entire CPU’s.

(I should have also mentioned I’m running X11 on nvidia-proprietary 550.67.)

Based on the screenshot it’s using close to 25% of a i5-11400F processor. I know the 'ps -e" shows less.

Results of perf report -n --stdio | cat is to big to paste in a comment. Linked here: perf.data - Pastebin.com

Thank you

The output doesn’t show the function names and there are more lines than expected - I also expected a graph instead of a list.

I think it’s because you don’t have the kscreenlocker debug symbols installed - can you please try to install then add the run the perf capture again?

I did not found debug symbols, installed “kscreenlocker6-devel” instead. but still I only got a wall of text.

I don’t know how OpenSUSE handles debug symbols. KDE has a tool called drkonqi-pk-debug-installer that is supposed to install debug symbols automatically - maybe you should take a look at it.

The same happens here

Kernel: 6.8.5-arch1-1 arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.0.3 Distro: EndeavourOS

CPU: AMD Ryzen 9 5900HX with Radeon Graphics

Graphics:
Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
driver: amdgpu v: kernel
Display: x11 server: XOrg v: 21.1.13 with: Xwayland v: 23.2.6 driver: X:
loaded: amdgpu unloaded: modesetting dri: radeonsi gpu: amdgpu resolution:
1: N/A 2: 2560x1440

Before, During and After screenlock (sorry, only allowed to 1 picture, so gif)
myimage

the temp goes +60 and the fan starts.

‘drkonqi5’ is already installed, and there are no other ‘drkonqi…’ packages available.

Regarding debug symbols on OpenSUSE: maybe this article will help you with that.

@hech your GIF does not show kscreenlocker at all, and the highest CPU usage shown is 4.3% by X11 - which is very much a low usage. I’m not sure what you think the problem is.

To give a better idea of what is using a system while the screen is locked, I recommend trying this script:

for i in $(seq 1 6); do sleep 10; top -b -n 1 | tail -n+6 | head ; done

This will list the top 8 CPU using processes every 10 seconds for 6 iterations (1 minute - or you can increase the number of iterations or the delay).

If you can try to reproduce the issue while this script is running, and submit the output here - this will be more information for us to help you with.

The problem is like OPs, if I lock the screen, the CPU load gets high and the temp goes from 30 to +60 degrees.
Yes the GIF was a bad idea.
Here is the output from your script:

%Cpu(s):  1,1 us,  0,0 sy,  0,0 ni, 98,3 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14523,8 free,   6980,8 used,  10645,3 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24534,9 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
  17185 hc        20   0   15112   7736   5688 R   9,1   0,0   0:00.01 top
      1 root      20   0   22904  13332   9872 S   0,0   0,0   0:01.49 systemd
      2 root      20   0       0      0      0 S   0,0   0,0   0:00.00 kthreadd
      3 root      20   0       0      0      0 S   0,0   0,0   0:00.00 pool_wo+
      4 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 kworker+
%Cpu(s):  0,6 us,  1,1 sy,  0,0 ni, 98,3 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14515,0 free,   6989,4 used,  10645,4 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24526,2 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   4518 hc        20   0   19,0g 345760  94892 S   9,1   1,1   2:03.60 WebExte+
      1 root      20   0   22904  13332   9872 S   0,0   0,0   0:01.49 systemd
      2 root      20   0       0      0      0 S   0,0   0,0   0:00.00 kthreadd
      3 root      20   0       0      0      0 S   0,0   0,0   0:00.00 pool_wo+
      4 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 kworker+
%Cpu(s):  7,1 us,  6,5 sy,  0,6 ni, 85,1 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14433,0 free,   7071,2 used,  10662,0 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24444,5 avail Mem 

Screenlock starts

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328448 193504 123664 R  72,7   0,6  17:00.04 kwin_x11
    884 root      20   0 1273664 137000  87540 S  36,4   0,4   9:23.82 Xorg
   1023 hc        20   0 1149652  78780  63236 S  18,2   0,2   2:21.18 ksmserv+
   1025 hc        20   0 2582460  94872  72980 S   9,1   0,3   0:23.55 kded6
   1058 hc        20   0 5509576   1,4g 170920 S   9,1   4,5   1:47.69 plasmas+
%Cpu(s):  5,3 us,  8,8 sy,  0,0 ni, 85,3 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14459,4 free,   7034,9 used,  10671,5 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24480,7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328448 193504 123664 R  80,0   0,6  17:04.08 kwin_x11
    884 root      20   0 1259264 137000  87540 S  40,0   0,4   9:26.11 Xorg
   1023 hc        20   0 1149652  78780  63236 S  10,0   0,2   2:21.83 ksmserv+
   1025 hc        20   0 2582460  94872  72980 S  10,0   0,3   0:23.65 kded6
   1134 hc        20   0 1186280  54620  42100 S  10,0   0,2   0:35.30 kactivi+
%Cpu(s):  5,5 us,  7,9 sy,  0,0 ni, 86,1 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14452,0 free,   7041,2 used,  10672,4 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24474,4 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 S  72,7   0,6  17:08.08 kwin_x11
    884 root      20   0 1265416 137000  87540 S  45,5   0,4   9:28.44 Xorg
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:22.49 ksmserv+
   1134 hc        20   0 1186280  54620  42100 S   9,1   0,2   0:35.46 kactivi+
   1135 hc        20   0  227656  22820  20900 S   9,1   0,1   0:35.53 gmenudb+
%Cpu(s):  6,2 us,  4,5 sy,  0,0 ni, 88,6 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14430,5 free,   7062,4 used,  10682,8 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24453,3 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    884 root      20   0 1276792 137000  87540 R  54,5   0,4   9:30.98 Xorg
   1026 hc        20   0 2328452 193504 123664 S  36,4   0,6  17:11.91 kwin_x11
   1250 hc         9 -11  848156  38732  29404 S  27,3   0,1   0:14.53 wireplu+
   2274 hc        20   0 1712492  71872  52104 S  18,2   0,2   0:05.35 audio-r+
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:23.18 ksmserv+
%Cpu(s):  8,5 us,  9,6 sy,  0,0 ni, 81,4 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14450,3 free,   7041,2 used,  10674,2 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24474,4 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  72,7   0,6  17:15.93 kwin_x11
    884 root      20   0 1265416 137000  87540 R  45,5   0,4   9:33.27 Xorg
   1023 hc        20   0 1149652  78780  63236 S  18,2   0,2   2:23.84 ksmserv+
   1135 hc        20   0  227656  22820  20900 S   9,1   0,1   0:35.87 gmenudb+
   1137 hc        20   0 1132292  64896  50776 S   9,1   0,2   0:21.36 org_kde+
%Cpu(s):  6,0 us,  7,7 sy,  0,0 ni, 85,1 id,  0,0 wa,  0,6 hi,  0,6 si,  0,0 st 
MiB Mem :  31515,7 total,  14452,5 free,   7038,9 used,  10674,3 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24476,8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  81,8   0,6  17:19.93 kwin_x11
    884 root      20   0 1265416 137000  87540 S  45,5   0,4   9:35.58 Xorg
   1023 hc        20   0 1149652  78780  63236 S  18,2   0,2   2:24.51 ksmserv+
   1135 hc        20   0  227656  22820  20900 S   9,1   0,1   0:36.03 gmenudb+
   1136 hc        20   0 1134536  64724  50312 S   9,1   0,2   0:19.15 polkit-+
%Cpu(s):  9,2 us,  7,5 sy,  0,0 ni, 83,3 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14454,0 free,   7037,4 used,  10674,3 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24478,3 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 S  63,6   0,6  17:23.94 kwin_x11
    884 root      20   0 1265416 137000  87540 S  36,4   0,4   9:37.84 Xorg
   1058 hc        20   0 5509580   1,4g 170920 S  18,2   4,5   1:48.98 plasmas+
   2456 hc        20   0 3718092 448868 170456 S  18,2   1,4   3:39.12 firefox+
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:25.16 ksmserv+
%Cpu(s):  9,1 us,  8,0 sy,  0,0 ni, 82,4 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14461,4 free,   7025,1 used,  10679,2 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24490,6 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  81,8   0,6  17:27.96 kwin_x11
    884 root      20   0 1265416 137000  87540 R  45,5   0,4   9:40.12 Xorg
   1023 hc        20   0 1149652  78780  63236 S  18,2   0,2   2:25.83 ksmserv+
   1135 hc        20   0  227656  22820  20900 S   9,1   0,1   0:36.36 gmenudb+
   1138 hc        20   0 1135780  65776  51048 S   9,1   0,2   0:18.69 xdg-des+
%Cpu(s):  4,3 us,  6,1 sy,  0,0 ni, 89,0 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14449,1 free,   7037,1 used,  10679,9 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24478,6 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  63,6   0,6  17:31.98 kwin_x11
    884 root      20   0 1265416 137000  87540 R  36,4   0,4   9:42.38 Xorg
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:26.48 ksmserv+
   1134 hc        20   0 1186280  54620  42100 S   9,1   0,2   0:36.45 kactivi+
   1136 hc        20   0 1134536  64724  50312 S   9,1   0,2   0:19.41 polkit-+
%Cpu(s):  6,0 us,  7,2 sy,  0,0 ni, 86,2 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14452,2 free,   7033,7 used,  10679,8 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24482,0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 S  90,0   0,6  17:36.00 kwin_x11
    884 root      20   0 1265416 137000  87540 R  50,0   0,4   9:44.67 Xorg
   1023 hc        20   0 1149652  78780  63236 S  20,0   0,2   2:27.15 ksmserv+
   1137 hc        20   0 1132292  64896  50776 S  10,0   0,2   0:21.84 org_kde+
   1139 hc        20   0  226096  21188  19140 S  10,0   0,1   0:19.69 xembeds+
%Cpu(s):  3,7 us,  7,4 sy,  0,0 ni, 88,3 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14450,1 free,   7035,7 used,  10679,9 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24480,0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  63,6   0,6  17:40.00 kwin_x11
    884 root      20   0 1265416 137000  87540 S  36,4   0,4   9:46.95 Xorg
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:27.80 ksmserv+
   1058 hc        20   0 5509580   1,4g 170920 S   9,1   4,5   1:49.86 plasmas+
   1364 hc        20   0 1144456  70784  54956 S   9,1   0,2   0:21.17 kdeconn+
%Cpu(s):  4,3 us,  6,7 sy,  0,0 ni, 89,0 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14450,1 free,   7035,7 used,  10680,0 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24480,0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 R  72,7   0,6  17:44.00 kwin_x11
    884 root      20   0 1265416 137000  87540 S  45,5   0,4   9:49.26 Xorg
   9010 hc        20   0 2737384 251572 105948 S  18,2   0,8   0:19.53 Isolate+
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:28.47 ksmserv+
   1134 hc        20   0 1186280  54620  42100 S   9,1   0,2   0:36.94 kactivi+
%Cpu(s):  5,6 us,  4,3 sy,  0,0 ni, 89,4 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14457,7 free,   7027,8 used,  10672,8 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24487,9 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328452 193504 123664 S  63,6   0,6  17:48.00 kwin_x11
    884 root      20   0 1265416 137000  87540 R  45,5   0,4   9:51.56 Xorg
   3261 hc        20   0  235004   7680   6784 S  18,2   0,0   0:12.78 at-spi2+
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:29.14 ksmserv+
   1364 hc        20   0 1144456  70784  54956 S   9,1   0,2   0:21.36 kdeconn+
%Cpu(s):  6,1 us,  5,5 sy,  0,0 ni, 86,0 id,  1,8 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14451,2 free,   7032,6 used,  10674,2 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24483,0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328520 193504 123664 S  90,0   0,6  17:52.01 kwin_x11
    884 root      20   0 1265416 137000  87540 R  40,0   0,4   9:53.86 Xorg
   1023 hc        20   0 1149652  78780  63236 S  20,0   0,2   2:29.81 ksmserv+
   3261 hc        20   0  235004   7680   6784 S  20,0   0,0   0:12.85 at-spi2+
   9105 hc        20   0 1134772  79840  65156 S  20,0   0,2   0:03.15 balooru+
%Cpu(s):  4,9 us,  6,1 sy,  0,0 ni, 88,4 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14456,9 free,   7026,5 used,  10674,4 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24489,2 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328520 193504 123664 R  81,8   0,6  17:56.04 kwin_x11
    884 root      20   0 1265416 137000  87540 R  36,4   0,4   9:56.10 Xorg
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:30.46 ksmserv+
   1025 hc        20   0 2582460  94872  72980 S   9,1   0,3   0:24.94 kded6
   1058 hc        20   0 5509580   1,4g 170920 S   9,1   4,5   1:50.75 plasmas+
%Cpu(s):  5,9 us,  7,1 sy,  0,0 ni, 86,4 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14456,6 free,   7026,7 used,  10674,5 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24488,9 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328520 193504 123664 S  72,7   0,6  18:00.06 kwin_x11
    884 root      20   0 1265416 137000  87540 R  45,5   0,4   9:58.35 Xorg
    643 root      20   0  343372  22452  19124 S   9,1   0,1   0:04.47 Network+
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:31.11 ksmserv+
   1058 hc        20   0 5509580   1,4g 170920 S   9,1   4,5   1:50.96 plasmas+
%Cpu(s):  5,4 us,  7,2 sy,  0,0 ni, 86,8 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14458,8 free,   7024,4 used,  10674,9 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24491,2 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1026 hc        20   0 2328520 193504 123664 S  72,7   0,6  18:04.10 kwin_x11
    884 root      20   0 1267464 137000  87540 R  36,4   0,4  10:00.59 Xorg
   1023 hc        20   0 1149652  78780  63236 S   9,1   0,2   2:31.76 ksmserv+
   1058 hc        20   0 5509580   1,4g 170920 S   9,1   4,5   1:51.18 plasmas+
   1134 hc        20   0 1186280  54620  42100 S   9,1   0,2   0:37.75 kactivi+
%Cpu(s):  1,1 us,  1,1 sy,  0,0 ni, 97,2 id,  0,0 wa,  0,6 hi,  0,0 si,  0,0 st 
MiB Mem :  31515,7 total,  14545,4 free,   6937,8 used,  10658,6 buff/cache     
MiB Swap:   2048,0 total,   2048,0 free,      0,0 used.  24577,9 avail Mem 
Screenlock ended
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    884 root      20   0 1248952 122592  73132 S   9,1   0,4  10:01.05 Xorg
   2456 hc        20   0 3718092 452808 170456 S   9,1   1,4   3:40.64 firefox+
      1 root      20   0   22904  13332   9872 S   0,0   0,0   0:01.50 systemd
      2 root      20   0       0      0      0 S   0,0   0,0   0:00.00 kthreadd
      3 root      20   0       0      0      0 S   0,0   0,0   0:00.00 pool_wo+

@guss77 I’m getting similar results to @hech. The very first output is before I locked the screen. Regarding the debug I activated the repo and installed the debug packages, and ran the commands again, yet I got the same kind of output.

for i in $(seq 1 6); do sleep 10; top -b -n 1 | tail -n+6 | head ; done

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 2107 neo       20   0 6442812 624076 197856 S 53.33 3.843  15:18.56 plasmashell
 1452 root      20   0 1205924 117996  68748 S 6.667 0.727   2:28.62 Xorg.bin
 1980 neo       20   0 4161400 244828 133384 S 6.667 1.508   2:37.91 kwin_x11
    1 root      20   0   23148  14596  10780 S 0.000 0.090   0:02.18 systemd
    2 root      20   0       0      0      0 S 0.000 0.000   0:00.00 kthreadd
    3 root      20   0       0      0      0 S 0.000 0.000   0:00.00 pool_workqueue_release
    4 root       0 -20       0      0      0 I 0.000 0.000   0:00.00 kworker/R-rcu_g
    5 root       0 -20       0      0      0 I 0.000 0.000   0:00.00 kworker/R-rcu_p

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1452 root      20   0 1224204 126060  76812 R 62.50 0.776   2:33.94 Xorg.bin
 1980 neo       20   0 4161408 244340 133384 R 62.50 1.505   2:43.91 kwin_x11
 2107 neo       20   0 6442812 624076 197856 S 62.50 3.843  15:24.80 plasmashell
 1972 neo       20   0 1097276  77936  63400 S 18.75 0.480   0:12.51 ksmserver
 2397 neo       20   0 1541756 288844  67268 S 12.50 1.779   0:03.50 DiscoverNotifie
 2777 neo       20   0 1096984  72676  59360 S 12.50 0.448   0:01.76 akonadi_contact
12349 neo       20   0 2993848 251476 158452 S 12.50 1.549   0:01.25 kscreenlocker_g
  679 root      20   0  194344  71424  70272 S 6.250 0.440   0:03.08 systemd-journal

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1980 neo       20   0 4071252 244260 133384 R 66.67 1.504   2:50.76 kwin_x11
 1452 root      20   0 1213324 126060  76812 S 60.00 0.776   2:40.03 Xorg.bin
 2107 neo       20   0 6442812 624076 197856 S 60.00 3.843  15:31.14 plasmashell
 1972 neo       20   0 1097276  77936  63400 S 26.67 0.480   0:14.45 ksmserver
 2777 neo       20   0 1096984  72676  59360 S 13.33 0.448   0:01.94 akonadi_contact
  679 root      20   0  218820  81664  80512 S 6.667 0.503   0:03.45 systemd-journal
 2145 neo       20   0 1143360  62280  47272 S 6.667 0.384   0:31.48 kactivitymanage
 2148 neo       20   0 1159148  67968  54748 S 6.667 0.419   0:02.14 org_kde_powerde

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1980 neo       20   0 4071252 244208 133384 R 62.50 1.504   2:57.60 kwin_x11
 2107 neo       20   0 6442812 624076 197856 S 62.50 3.843  15:37.47 plasmashell
 1452 root      20   0 1216088 126060  76812 S 56.25 0.776   2:46.10 Xorg.bin
 1972 neo       20   0 1097276  77936  63400 S 18.75 0.480   0:16.39 ksmserver
12349 neo       20   0 3035032 255420 158452 S 12.50 1.573   0:02.64 kscreenlocker_g
 1799 neo       20   0 1093792  73212  59544 S 6.250 0.451   0:01.90 kwalletd6
 2145 neo       20   0 1143360  62280  47272 S 6.250 0.384   0:31.79 kactivitymanage
 2292 neo       20   0  235160   8056   7288 S 6.250 0.050   0:01.87 at-spi2-registr

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1980 neo       20   0 4071252 243936 133384 S 62.50 1.502   3:04.44 kwin_x11
 2107 neo       20   0 6440764 624076 197856 S 62.50 3.843  15:43.80 plasmashell
 1452 root      20   0 1222232 126060  76812 S 56.25 0.776   2:52.19 Xorg.bin
 1972 neo       20   0 1097276  77936  63400 S 18.75 0.480   0:18.34 ksmserver
12349 neo       20   0 2916208 255420 158452 S 12.50 1.573   0:03.29 kscreenlocker_g
 1799 neo       20   0 1093792  73212  59544 S 6.250 0.451   0:02.07 kwalletd6
 2101 neo       20   0  194536  22448  20016 S 6.250 0.138   0:02.02 kscreen_backend
 2150 neo       20   0  194356  21580  19532 S 6.250 0.133   0:02.09 xembedsniproxy

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1980 neo       20   0 4071252 244380 133384 S 73.33 1.505   3:11.29 kwin_x11
 2107 neo       20   0 6442812 624076 197856 S 66.67 3.843  15:50.11 plasmashell
 1452 root      20   0 1222232 126060  76812 S 60.00 0.776   2:58.27 Xorg.bin
 1972 neo       20   0 1097276  77936  63400 R 20.00 0.480   0:20.29 ksmserver
 1979 neo       20   0 2084420  95360  75428 S 6.667 0.587   0:03.73 kded6
 2396 neo       20   0 1087976  66796  53548 S 6.667 0.411   0:03.98 kaccess
 2619 neo       20   0 1089680  69456  55972 S 6.667 0.428   0:03.28 akonadi_control
 2777 neo       20   0 1096984  72676  59360 S 6.667 0.448   0:02.48 akonadi_contact

Yea, so kwin_x11 is eating your CPU. I’m pretty sure I saw that behaviour before - gimme a min to look it up.

BTW, @fbm224 & @hech - can you both share the output of kinfo and of qdbus org.kde.KWin /KWin supportInformation (that last one is pretty big)?

This is most probably KDE bug 484606 – High CPU usage on kwin_x11/Xorg when screen is off .

If you can - run the perf record script I suggested above, with kwin_x11 as the target instead of the screen locker process, and submit the results in the bug report.

kinfo
Operating System: openSUSE Tumbleweed 20240412
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0
Kernel Version: 6.8.5-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × 11th Gen Intel® Core™ i5-11400F @ 2.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5600 XT

qdbus6 org.kde.KWin /KWin supportInformation
Información sobre KWin:
La siguiente información se debe usar al solicitar ayuda, por ejemplo en https://discuss.kde.org.
Proporciona información sobre la instancia que se ejecuta actualmente, qué opciones se están usando,
qué controlador OpenGL y qué efectos están activos.
Por favor, envíe la información proporcionada a continuación de este texto de introducción a un
servicio de bandeja de pegar como https://paste.kde.org en lugar de pegarla en hilos de ayuda.

==========================

Version
=======
KWin version: 6.0.3
Qt Version: 6.7.0
Qt compile version: 6.7.0
XCB compile version: 1.16.1

Operation Mode: X11 only

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_X11_XCB: yes
HAVE_GLX: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 12101012
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.kwin.aurorae
Theme: __aurorae__svg__Silvery-Color-Dark-Aurorae
Plugin recommends border size: No
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 9, 2
decorationButtonsRight: 6, 3, 4, 5
borderSize: 3
gridUnit: 12
font: Montserrat Alternates,13,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
smallSpacing: 3
largeSpacing: 12

Output backend
==============
Name: KWin::X11StandaloneBackend

Cursor
======
themeName: Breeze_Dark_Teal
themeSize: 32

Options
=======
focusPolicy: ClickToFocus
xwaylandCrashPolicy: 1
xwaylandMaxCrashCount: 3
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
activeMouseScreen: true
placement: 5
activationDesktopPolicy: SwitchToOtherDesktop
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 20
snapOnlyWhenOverlapping: false
rollOverDesktops: false
focusStealingPreventionLevel: 1
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: MouseRaise
commandActiveTitlebar2: MouseNothing
commandActiveTitlebar3: MouseOperationsMenu
commandInactiveTitlebar1: MouseActivateAndRaise
commandInactiveTitlebar2: MouseNothing
commandInactiveTitlebar3: MouseOperationsMenu
commandWindow1: MouseActivateRaiseAndPassClick
commandWindow2: MouseActivateAndPassClick
commandWindow3: MouseActivateAndPassClick
commandWindowWheel: MouseNothing
commandAll1: MouseUnrestrictedMove
commandAll2: MouseToggleRaiseAndLower
commandAll3: MouseUnrestrictedResize
keyCmdAllModKey: 16777250
condensedTitle: false
electricBorderMaximize: false
electricBorderTiling: false
electricBorderCornerRatio: 0.009999999776482582
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
compositingMode: 1
useCompositing: true
hiddenPreviews: 1
glSmoothScale: 2
glStrictBinding: true
glStrictBindingFollowsDriver: true
glPreferBufferSwap: AutoSwapStrategy
glPlatformInterface: 1
windowsBlockCompositing: true
allowTearing: false

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 200
reActivateThreshold: 1000
actionTopLeft: 1
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 5
actionLeft: 0

Screens
=======
Active screen follows mouse:  yes
Number of Screens: 1

Screen 0:
---------
Name: HDMI-1
Enabled: 1
Geometry: 0,0,1920x1080
Scale: 1
Refresh Rate: 100000
Adaptive Sync: incapable

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 5600 XT (radeonsi, navi10, LLVM 18.1.2, DRM 3.57, 6.8.5-1-default)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.3
OpenGL platform interface: GLX
OpenGL shading language version string: 4.60
Driver: Unknown
GPU class: Unknown
OpenGL version: 4.6
GLSL version: 4.60
Mesa version: 24.0.3
X server version: 1.21.1
Linux kernel version: 6.8.5
Direct rendering: Requires strict binding: yes
Virtual Machine:  no
OpenGL 2 Shaders are used

Loaded Effects:
---------------
screenshot
outputlocator
colorpicker
blur
sessionquit
logout
login
windowaperture
slideback
slide
magiclamp
squash
morphingpopups
maximize
fullscreen
frozenapp
kwin4_effect_hexagon
sheet
dialogparent
tileseditor
overview
highlightwindow
blendchanges
startupfeedback
kscreen

Currently Active Effects:
-------------------------
blur

Effect Settings:
----------------
screenshot:

outputlocator:

colorpicker:

blur:

sessionquit:
pluginId: sessionquit
isActiveFullScreenEffect: false

logout:
pluginId: logout
isActiveFullScreenEffect: false

login:
pluginId: login
isActiveFullScreenEffect: false

windowaperture:
pluginId: windowaperture
isActiveFullScreenEffect: false

slideback:

slide:
horizontalGap: 45
verticalGap: 20
slideBackground: true

magiclamp:

squash:
pluginId: squash
isActiveFullScreenEffect: false

morphingpopups:
pluginId: morphingpopups
isActiveFullScreenEffect: false

maximize:
pluginId: maximize
isActiveFullScreenEffect: false

fullscreen:
pluginId: fullscreen
isActiveFullScreenEffect: false

frozenapp:
pluginId: frozenapp
isActiveFullScreenEffect: false

kwin4_effect_hexagon:
pluginId: kwin4_effect_hexagon
isActiveFullScreenEffect: false

sheet:
duration: 300

dialogparent:
pluginId: dialogparent
isActiveFullScreenEffect: false

tileseditor:
activeView: 
delegate: 
animationDuration: 200

overview:
activeView: 
delegate: 
animationDuration: 300
layout: 1
ignoreMinimized: false
filterWindows: true
organizedGrid: true
overviewPartialActivationFactor: 0
overviewGestureInProgress: false
transitionPartialActivationFactor: 0
transitionGestureInProgress: false
gridPartialActivationFactor: 0
gridGestureInProgress: false
desktopOffset: 
searchText: 

highlightwindow:

blendchanges:

startupfeedback:
type: 1

kscreen:


Loaded Plugins:
---------------
krunnerintegration
nightcolor

Available Plugins:
------------------
BounceKeysPlugin
StickyKeysPlugin
buttonsrebind
krunnerintegration
nightcolor
screencast


I think I finally got the kind of result you expected, could you please confirm before I upload it to the bug report?

It looks like there are still missing symbols - specifically for kwin_x11 - there are too many unknown sections.

That being said, it looks like most of the time is spent in the kernel.kallsyms section, for which you have a good report and it looks like it spends way too much time in polling and waiting - which I don’t think should be the case.

I believe this perf report will be useful to the developers, but I recommend looking a bit more into getting the debug symbols installed.

Thank you for your help.

I added to this bug: can’t post a link, (Well it can be cheated with \.)
https://bugs.kde.org/show_bug.cgi?id=484323#c16
it seems to fit better to the error.
Strange not allowing to link to a bug on kde’s own system.
Even X.org is a link :upside_down_face: