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