brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: powercfg /requests shows what keeps Windows awake

Windows
~/tips/tip-windows-powercfg-requests

powercfg /requests

Lists the programs and drivers that stop Windows from sleeping or turning off the display.

The screen never turns off, or the PC refuses to sleep, and nothing on the screen explains why. Windows keeps a list of programs and drivers that asked for exactly that.

The docs for powercfg describe /requests as enumerating application and driver Power Requests, which are the requests that prevent the computer from automatically powering off the display or entering a low-power sleep mode. Run it in a terminal:

powercfg /requests

The output names the callers that hold requests. If a media player, a download manager or a driver shows up there, you have found who is keeping the machine up.

There is a second command in the same family for a fix without uninstalling anything. /requestsoverride sets an override for a particular process, service or driver, and without parameters it shows the current list of overrides. The caller type and name are the ones you got from /requests, and the request types are display, system and awaymode. The docs example:

powercfg /requestsoverride process wmplayer.exe display system

That makes Windows ignore the display and system requests from that process. Replace the process name with your own caller. I would try it with a process you understand, and remove the override as soon as it stops being useful. Per the page, running /requestsoverride without arguments prints the list, which is the easy way to see what you changed later.

The caveat is that an override can have the effect you want too well. A player that was supposed to keep the screen on during a film will now let it go dark. Also check /requests at the moment the problem occurs, because the list changes as programs start and stop; an empty list five minutes after the program closed proves nothing.

If nothing shows up in the list at all, the cause is somewhere else, for instance a setting in the power plan or a device that wakes the PC, and powercfg /lastwake is the next place to look.

Further reading: Powercfg command-line options

More Windows tips Win+Ctrl+C Win+Shift+Left arrow Win+Ctrl+Left arrow Alt+PrtScn Left Alt + Left Shift + Print Screen All Windows tips (33) All topics

Link