Skip to content

Computer not sleeping #20

Answered by cerebrate
samchouse asked this question in Q&A
Oct 15, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

That is a somewhat difficult question to answer.

imp itself does not intentionally do anything to keep the computer awake. (In fact, if anything, it goes out of its way to minimize the potential impact it has on making the system appear non-idle; the script that does the job sleeps for an hour at a time to avoid creating any CPU load. And obviously, as a WSL process, it can't call SetThreadExecutionState() to mark its thread as no-display-sleep or no-system-sleep even if it wanted to.)

However, that said, Windows itself determines when to sleep by looking for "user or application activity". The details of this are obscure, but it does include both user input and, more relevantly, network …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@samchouse
Comment options

Answer selected by samchouse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants