Bug 1222405

Summary: KDE lockscreen causes high CPU load
Product: [openSUSE] openSUSE Tumbleweed Reporter: Christian Boltz <suse-beta>
Component: KDE Workspace (Plasma)Assignee: E-Mail List <opensuse-kde-bugs>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Christian Boltz 2024-04-07 13:12:46 UTC
The KDE lockscreen causes a high CPU load. I noticed this because my laptop fan starts to run when the screen gets locked.

top output captured while the screen was locked [1] shows kwin_x11 has 70% CPU usage, and Xorg.bin another 35%.

Besides that, there are a few processes using around 5% of the CPU each.


Detailed top output:

top - 13:17:53 up  1:12,  1 user,  load average: 3,19, 2,58, 1,83
Tasks: 355 total,   2 running, 352 sleeping,   0 stopped,   1 zombie
%CPU(s): 17,9 us, 14,5 sy,  0,0 ni, 67,6 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
MiB Spch: 15915,35+total, 4685,234 free, 6527,062 used, 6000,609 buff/cache
MiB Swap:    0,000 total,    0,000 free,    0,000 used. 9388,289 avail Spch

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     ZEIT+ BEFEHL
 4344 cb        20   0 1831660 177900 110016 R 70,59 1,092  12:40.65 /usr/bin/kwin_x11 --replace
 3370 root      20   0  749548 118196  62984 S 35,29 0,725   8:02.13 /usr/bin/Xorg.bin -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_DDlZwb -noreset -displayfd 16
 4341 cb        20   0  579680  84560  72032 S 5,882 0,519   1:21.86 /usr/bin/ksmserver
 4474 cb        20   0  195292  24684  22508 S 5,882 0,151   0:10.59 /usr/bin/gmenudbusmenuproxy
 4573 cb        20   0  561812  64996  54764 S 5,882 0,399   0:19.37 /usr/bin/kaccess
 4575 cb        20   0 1051088 234900  69092 S 5,882 1,441   0:21.40 /usr/libexec/DiscoverNotifier
 5005 cb        20   0  655628  81056  68460 S 5,882 0,497   0:10.88 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_4
 5007 cb        20   0  729752  82396  69184 S 5,882 0,506   0:12.52 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_6
 5016 cb        20   0 1080552 123876  96264 S 5,882 0,760   0:13.42 /usr/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent
 5031 cb        20   0  570772  72236  60936 S 5,882 0,443   0:11.04 /usr/bin/akonadi_pop3_resource --identifier akonadi_pop3_resource_19
 5406 cb        20   0 4530272 576832 226140 S 5,882 3,539   8:47.09 /usr/lib64/firefox/firefox
 5909 cb        20   0  599256  66552  55972 S 5,882 0,408   0:12.75 /usr/lib/mozilla/kmozillahelper
10991 cb        20   0 2599228 238380 115852 S 5,882 1,463   0:19.97 /usr/lib64/firefox/firefox -contentproc -childID 27 -isForBrowser -prefsLen 51555 -prefMapSize 320619 -jsInitLen 234952 -parentBuildID 20240321230221 -greomni /usr/lib64/firefox/omni.ja -appomni /usr+
11084 cb        20   0 2665584 286988 119208 S 5,882 1,761   1:47.65 /usr/lib64/firefox/firefox -contentproc -childID 28 -isForBrowser -prefsLen 51555 -prefMapSize 320619 -jsInitLen 234952 -parentBuildID 20240321230221 -greomni /usr/lib64/firefox/omni.ja -appomni /usr+
13353 cb        20   0 1931812 286692 142972 S 5,882 1,759   0:55.53 /usr/libexec/kscreenlocker_greet --immediateLock --graceTime 5000 --ksldfd 37
14009 cb        20   0   10956   6784   5632 R 5,882 0,042   0:00.03 top -n1
    1 root      20   0   23368  14948  10696 S 0,000 0,092   0:01.47 /usr/lib/systemd/systemd --switched-root --system --deserialize=41

(all other processes are sleeping at 0% CPU usage)

A "boring" lock screen that just displays a background image shouldn't cause such a high CPU load.


For comparison: after unlocking the screen, both kwin_x11 and xorg.bin are down to less than 1% CPU usage.


I'm not 100% sure when this started, but my best guess is that it was introduced with the update to Plasma 6.

[1] in case you wonder - I started the following before locking the screen:
    while true ; do top -n1 > top-$(date '+%H:%M') ; sleep 60 ; done