21

How can I find out why my laptop or desktop won't automatically go to sleep

1
  • 3
    Have you spilled coffee on it recently? OK OK that's lame... Commented May 2, 2009 at 6:05

6 Answers 6

21

I believe that Windows 7 is the only version of Windows which can tell you what devices are preventing the machine from sleeping. Windows 7 and Vista can tell you what devices are armed to wake the device from sleep.

There is a tool called powercfg which can do this. New to Windows 7 is the ability to see what is armed.

Windows 7

  1. Open an elevated command prompt
  2. Type powercfg /requests

You will see a list of items preventing the machine from entering sleep.

2
  • 1
    Those commands should be used in conjunction with Kevin's answer to get a comprehensive list
    – Jader Dias
    Commented Oct 5, 2010 at 13:28
  • This works for Windows 10 as well.
    – theblang
    Commented Jan 1, 2021 at 18:55
14

Vista also has powercfg.exe, which can tell you which devices are armed to wake the system from sleep:

powercfg -devicequery wake_armed

as well as which device last woke the machine from sleep:

powercfg -lastwake

Sounds like Windows 7 got some new features though.

1
  • Those commands should be used in conjunction with Omar's answer to get a comprehensive list
    – Jader Dias
    Commented Oct 5, 2010 at 13:27
1

you can also run powercfg -energy from an elevated cmd. this will monitor your PC for 60secs during which you should continue using it normally.

A report is generated at the end. Looking at Errors in this report should give you a clue as to what is preventing your PC from going to sleep.

one of the most common issues is Media sharing. This shows up as \Filesystem\srvnet in the report. You will need to turn off media sharing to get rid of this issue.

If its something different, do post any questions you have. thanks

1
  • 1
    The fact that \Filesystem\srvnet often prevents the system going stanby is correct. But setting Windows Media Player Network Sharing Service to disabled in the services MMC doesn't get rid of srvnet blocking standby. So I am a bit confused... Commented Aug 6, 2013 at 8:59
1

It took me a while but this solved it for me. Create a batch file with the following content:

powercfg -requestsoverride PROCESS chrome.exe awaymode display system
net stop "Windows Update" & net start "Windows Update"

(the second part of the net command is not mandatory because the service restarts anyway)

... then create a Windows task to execute the batch file every 30 minutes (don't forget to add execute in privileged mode.

1

In case it helps anyone, here is what it was in my case.

My computer was reporting (via this script) that user inputs were received more than once a second, all the time.

After disabling both the keyboard and the mouse with no change, I removed all usb devices and connected them one by one while checking for idle.

The culprit turned out to be a WingMan joystick, that was powered off but still connected to the usb port. As soon as I disconnected it the computer was idling properly.

0

There's also a Power-Troubleshooter source within Vista's Event Viewer in the Application event log with related information such as Wake Source.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .