Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage when Windows Screens Sleep #8403

Open
tanj opened this issue Jan 4, 2025 · 3 comments
Open

High CPU usage when Windows Screens Sleep #8403

tanj opened this issue Jan 4, 2025 · 3 comments

Comments

@tanj
Copy link

tanj commented Jan 4, 2025

When my windows system sets the screen to sleep the alacratty process ramps up CPU usage which then stops when the screen is woken. This may have the same source as this firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1924932

If I close alacritty and then lock the screen and wait for the screen to sleep then I get a nice quite cpu. If I leave alacritty running and lock the screen and wait for the screen to sleep then the CPU fan ramps up as soon as the screens sleep. Perfmon trace shows alacritty is being a problem here.

I have found three apps that seem to be affected by what ever the root cause of this is. The three apps are:

  • alacritty
  • littlebigmouse
  • firefox

When testing this firefox and littlebigmouse were not running.

System

OS: Windows 11 Pro (10.0.26100 Build 26100) [24H2]
Version: alacritty --version : alacritty 0.14.0

Logs

perfmon screenshot. Screens go to sleep at 10:45:11 and dwm (purple) and alacritty (teal) ramp up
image

@chrisduerr
Copy link
Member

You're saying three apps are affected by this, but your screenshot suggests that dwm has the same issue, is that correct?

Could you try getting the examples of https://github.com/rust-windowing/glutin to work? I suspect these should show the same problem.

@kchibisov
Copy link
Member

it just looks like busy drawing loop.

@tanj
Copy link
Author

tanj commented Jan 5, 2025

dwm is window's desktop window manager. It spikes because of the offending programs.

When I run the example: cargo run --example window in glutin The process runs at the same level whether the screen is asleep or not, but does cause dwm to increase processor usage when the monitors go to sleep.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants