"/usr/lib/kscreenlocker_greet" takes lots of CPU and make fan noise

I recently installed Manjaro on my ThinkPad X1 Carbon generation 6. The processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz, Memory: 15.5 GiB of RAM, Graphics Processor: Intel® UHD Graphics 620.

I found that when the screen is open and I do my work, the fan is very quiet, I hardly notice any fan sound.

But whenever I lock the screen, the fan starts to spin and makes a loud noise. After quite a while, the fan noise is still on.

I did some experiments to run the command ps -eo pid,args,%cpu,time --sort=-%cpu when the screen is in both unlocked and locked states.

I found that immediately after I lock the screen, process /usr/lib/kscreenlocker_green can take 86.5% of CPU.

After I use settings to turn off compositing in “Display & Monitor → Compositor” by unchecking the “Enable on startup” and restarting the laptop, after I lock the screen, the fan is very quiet.

Just want to report this issue here and hope it can be improved.

I want to post my Python script here to output the log, in case anyone wants to investigate:

import subprocess
import time
from datetime import datetime


# ps -eo pid,args,%cpu,time –sort=-%cpu
command_str = "ps -eo pid,args,%cpu,time --sort=-%cpu"
command = command_str.split()


def run_command_and_save_output():
    while True:
        # Get current time formatted as YYMMDD:HHMMSS
        timestamp = datetime.now().strftime("%y%m%d___%H%M%S")
        filename = f"{timestamp}.txt"

        # Run the command and capture output
        try:
            result = subprocess.run(command, capture_output=True, text=True, check=True)
            output = result.stdout
        except subprocess.CalledProcessError as e:
            output = f"Error running command: {e}"

        # Save output to file
        with open(filename, "w") as f:
            f.write(output)

        print(f"Saved output to {filename}")

        # Wait for 5 seconds before next run
        time.sleep(5)

if __name__ == "__main__":
    run_command_and_save_output()

Welcome to the Manjaro community @Jacob123

I don’t have that option on my Plasma system. My guess is that you are using Plasma on X11, rather than Wayland. You can check your session type by running the following command:

echo $XDG_SESSION_TYPE

If it reveals you are using X11, then you should try switching to Wayland:

You can change your Plasma session from X11 to Wayland by selecting the session type at the login screen (Wayland is the default for Plasma).

If you have set up autologin to skip the password screen, you can change to a Wayland session by opening System Settings → Colors & Themes → Login Screen (SDDM) → Behavior.

If that doesn’t fix the issue, then further investigation may be required, for which some system information would be very useful:

inxi -zv8

Further reading:

As a new or infrequent forum user, please take some time to familiarise yourself with Forum requirements, and the many ways to use the forum to your benefit:


Update Announcements

The Update Announcements contain important information and a Known Issues and Solutions section that should generally be checked before posting a request for support.

System Information

Output of this command (formatted according to forum requirements) may be useful for those wishing to help:

inxi --filter --verbosity=8

or the short form:

inxi -zv8

Be prepared to provide more information and outputs from other commands whenever asked. It’s equally important to provide as much actionable information as possible in your first post, rather than simply indicating there is a problem.

Required reading
Resources

Regards.

There seem to be many screenlocker related issues reported to KDE during the last half year; this is only one example. A quick Internet search will reveal many more.

While you may receive some helpful advice in Manjaro forums, going to the source (KDE) might be the better option.

Regards.

I believe you are referring to kscreenlocker_greet a minor typo :slight_smile:

kscreenlocker has been updated to 6.4.0 in unstable branch and it is likely the issue you are experiencing has been solved as I was not immediately able to reproduce the described issue.

The initial cpu usage when locking the screen is expected.

In my short test - the CPU usage dropped to an acceptable value after a very short period of time.

Cool script by the way :+1:

 $ ls *.txt | sort | xargs grep -e '/usr/lib/kscreenlocker_gree'
250621___111222.txt:  24023 /usr/lib/kscreenlocker_gree 21.1 00:00:00
250621___111227.txt:  24023 /usr/lib/kscreenlocker_gree  7.5 00:00:00
250621___111232.txt:  24023 /usr/lib/kscreenlocker_gree  4.7 00:00:00
250621___111237.txt:  24023 /usr/lib/kscreenlocker_gree  3.3 00:00:00
250621___111242.txt:  24023 /usr/lib/kscreenlocker_gree  2.6 00:00:00
250621___111247.txt:  24023 /usr/lib/kscreenlocker_gree  2.1 00:00:00
250621___111252.txt:  24023 /usr/lib/kscreenlocker_gree  1.8 00:00:00
250621___111257.txt:  24023 /usr/lib/kscreenlocker_gree  1.6 00:00:00
250621___111302.txt:  24023 /usr/lib/kscreenlocker_gree  1.4 00:00:00
250621___111307.txt:  24023 /usr/lib/kscreenlocker_gree  1.2 00:00:00
250621___111312.txt:  24023 /usr/lib/kscreenlocker_gree  1.1 00:00:00
250621___111317.txt:  24023 /usr/lib/kscreenlocker_gree  1.0 00:00:00
 $ mbn info kscreenlocker -q
Branch         : archlinux
Name           : kscreenlocker
Version        : 6.4.0-1
Repository     : extra
Build Date     : Wed 18 Jun 2025 11:48:18 
Packager       : Tomaz Canabrava <tcanabrava@archlinux.org>
Branch         : unstable
Name           : kscreenlocker
Version        : 6.4.0-1
Repository     : extra
Build Date     : Wed 18 Jun 2025 11:48:18 
Packager       : Tomaz Canabrava <tcanabrava@archlinux.org>
Branch         : testing
Name           : kscreenlocker
Version        : 6.3.5-1
Repository     : extra
Build Date     : Thu 08 May 2025 09:58:11 
Packager       : Tomaz Canabrava <tcanabrava@archlinux.org>
Branch         : stable
Name           : kscreenlocker
Version        : 6.3.5-1
Repository     : extra
Build Date     : Thu 08 May 2025 09:58:11 
Packager       : Tomaz Canabrava <tcanabrava@archlinux.org>