This is a timely piece, sent to me by Mark Blackburn, a fellow co-founder here at 1E and general technical funkmeister. Timely because I've been having this exact problem with my VAIO laptop on and off (no NightWatchman pun intended) for a while now.. cheers Mark!
Windows power management settings are supposed to make your PC go to sleep after it’s been left unused for a period of time, but you will often find that this doesn’t actually happen when it should.
There are three things that can keep a PC awake
User presence
Keyboard and mouse movement is the only way that the PC has of knowing if a user is present, so ‘mouse drift’ - where the mouse cursor slowly moves across the screen in one direction or another without any actual mouse movement occurring, usually because of faulty hardware, will prevent a PC from sleeping, since it thinks it’s being constantly used.
CPU Activity
The windows idle timers get reset whenever the PC thinks it’s busy (80% idle for the default Vista power scheme), so if something makes the overall CPU utilization of your PC go above 20% then the idle timer will reset, and if this happens regularly (say every 30 minutes) then the PC will never sleep.
System_Required flag
Any thread in a process can raise this flag to purposefully prevent the PC from sleeping. There are many reasons why applications raise this flag, some are legitimate, for example Media Player will raise it if you’re watching a video (you don’t want the PC to go to sleep whilst you watch a movie after all), and some are not.
A lot of the time applications won’t raise the flag themselves, but will cause the underlying OS subsystems to raise it instead. For example if you open a document from a network share the Network Redirector driver (rdbss.sys) will raise this flag to prevent the PC from going to sleep whilst there is an open file across the network.
So, if your PC won’t sleep here’s what to look for;
1) Check that mouse drift isn’t happening
2) Run a performance monitor log and look for CPU spikes over 20%
3) Close down all apps and see if the PC goes to sleep – figure out by a process of elimination which application is preventing sleep
Alternatively you can install our NightWatchman client, enable advanced sleepless client detection using the command line “nightwatchman -advancedsleeplessdetection=on“ and then check in the log file to see which process keeps your PC awake.
If you find it’s a process you don’t care about, you can set NightWatchman to ignore it and force the PC to sleep by using the –selistadd switch to add it to the list of processes that will not be allowed to prevent the machine from sleeping.