cosmic-epoch icon indicating copy to clipboard operation
cosmic-epoch copied to clipboard

cosmic-greeter uses 100% cpu when the display is asleep

Open estokes opened this issue 8 months ago • 4 comments
trafficstars

as of cosmic-greeter 0.1.0~1742842290~24.04~f826b8c I've noticed the fan on my laptop (lemur pro) going crazy when the display is asleep. If I switch to another VT and run htop I can see that cosmic-greeter is constantly using 100% of a single core.

I'm fairly sure I've reproduced this in an empty session, however I normally have brave, emacs, terminals, signal and discord running when my screen locks, and with that setup it happens every time.

I did have my display set to 48hz refresh to save a tiny bit of power and I've just undone that to see if it stops triggering this (it's a stretch, but who knows).

estokes avatar Mar 24 '25 20:03 estokes

I managed to catch it and get a perf report, you can get some idea what the process is doing, I'll spare you the full 128k, but here are the relevant bits,

# Overhead  Command          Shared Object                Symbol
# ........  ...............  ...........................  .........................................
#
     3.95%  cosmic-greeter   [kernel.kallsyms]            [k] fput
     3.63%  cosmic-greeter   [kernel.kallsyms]            [k] _copy_to_user
     3.50%  cosmic-greeter   [kernel.kallsyms]            [k] entry_SYSRETQ_unsafe_stack
     3.29%  cosmic-greeter   [kernel.kallsyms]            [k] _copy_from_user
     3.19%  cosmic-greeter   libc.so.6                    [.] pthread_mutex_lock
     2.67%  cosmic-greeter   [vdso]                       [.] 0x0000000000000c46
     2.55%  cosmic-greeter   [kernel.kallsyms]            [k] do_epoll_ctl
     2.47%  cosmic-greeter   [kernel.kallsyms]            [k] entry_SYSCALL_64
     1.67%  cosmic-greeter   cosmic-greeter               [.] 0x000000000021ddc1
     1.57%  cosmic-greeter   [kernel.kallsyms]            [k] call_function_single_prep_ipi
     1.41%  cosmic-greeter   [kernel.kallsyms]            [k] x64_sys_call
     1.39%  cosmic-greeter   cosmic-greeter               [.] 0x0000000000d378d3
     1.38%  cosmic-greeter   cosmic-greeter               [.] 0x000000000022386f
     1.35%  cosmic-greeter   [kernel.kallsyms]            [k] fdget
     1.34%  cosmic-greeter   [kernel.kallsyms]            [k] vfs_read
     1.31%  cosmic-greeter   [kernel.kallsyms]            [k] _raw_spin_lock_irq
     1.26%  cosmic-greeter   [kernel.kallsyms]            [k] __raw_spin_lock_irqsave
     1.17%  cosmic-greeter   [kernel.kallsyms]            [k] put_itimerspec64
     1.05%  cosmic-greeter   cosmic-greeter               [.] 0x0000000000d3542c
     1.02%  cosmic-greeter   [kernel.kallsyms]            [k] entry_SYSCALL_64_after_hwframe
     0.96%  cosmic-greeter   libc.so.6                    [.] pthread_mutex_unlock
     0.86%  cosmic-greeter   [kernel.kallsyms]            [k] apparmor_file_permission
     0.81%  cosmic-greeter   libc.so.6                    [.] 0x0000000000188bd3
     0.79%  cosmic-greeter   cosmic-greeter               [.] 0x0000000000cfc567
     0.71%  cosmic-greeter   [kernel.kallsyms]            [k] security_file_permission
     0.70%  cosmic-greeter   [kernel.kallsyms]            [k] entry_SYSCALL_64_safe_stack
     0.69%  cosmic-greeter   [kernel.kallsyms]            [k] syscall_return_via_sysret
     0.69%  cosmic-greeter   [kernel.kallsyms]            [k] ep_item_poll.isra.0
     0.69%  cosmic-greeter   cosmic-greeter               [.] 0x000000000036c741
     0.68%  cosmic-greeter   [kernel.kallsyms]            [k] get_itimerspec64
     0.68%  cosmic-greeter   cosmic-greeter               [.] 0x0000000000cfc4ec
     0.66%  cosmic-greeter   cosmic-greeter               [.] 0x0000000000717630
     0.65%  cosmic-greeter   libc.so.6                    [.] 0x0000000000188a0d
     0.64%  cosmic-greeter   [kernel.kallsyms]            [k] mutex_lock

estokes avatar Mar 24 '25 23:03 estokes

I also confirm that 48 vs 60 hz doesn't matter. And, it doesn't stop doing it when the display wakes up, it keeps going until I unlock the display.

estokes avatar Mar 24 '25 23:03 estokes

I’ve encountered the same issue: after the screen turns off, the fan spins wildly. I suspect it’s caused by abnormal CPU usage. When I wake the screen, the fan gradually slows down. However, I’m unsure if this is directly related to cosmic-greeter.

zero-hugo avatar Mar 26 '25 09:03 zero-hugo

I too experience the same issue on my Thinkpad X1 Gen 9, the fan spin loudly and once the screen is fully awake, the spinning gradually slow down.

runlevel5 avatar Mar 31 '25 03:03 runlevel5

Same thing with me. When it is in this codition, and I run the top command in a virtual terminal, I see the cosmic-greeter process taking 100 % CPU of one core. When I log back in, the CPU of the cosmis-greeter process goes back to 0.

marchaesen avatar Apr 04 '25 07:04 marchaesen

I'm seeing this on the serw13.

jacobgkau avatar Apr 08 '25 22:04 jacobgkau