Insomniac PCs

Sleep button When people talk about PC power management they are normally referring to the built-in Windows power scheme settings, which are supposed to save power by putting the PC to sleep when it has been idle for a period of time. However, these power management schemes are not always particularly helpful or green as Mark Blackburn explains.

This would be OK if the sleep mechanism worked reliably, however, our research has found that a significant percentage of PCs don't go to sleep when they should, and the worst part is that because the monitor does go to sleep when it is supposed to, the PC appears to be off, and since there’s no central reporting of the success or failure of PC sleep transitions, organisations are entirely unaware that their PCs aren't sleeping.

There are many reasons why PCs don't sleep when they should (see below), which means that even in organisations where centrally mandated Windows Power Scheme settings are being applied, they are not seeing the savings in electricity costs and the reduction in CO2 emissions that they think they are.
Another problem with using Windows power schemes is that when they do work they have an impact on the end-user's experience throughout the day, putting the PC to sleep at inopportune times and generally causing annoyance, and overnight the PC is asleep when the IT department wants to perform routine maintenance and patching.

The solution to these problems can be to use a 3rd party PC power management tool like NightWatchman that can schedule power state transitions. You can set a policy for PCs to power down at the end of the working day (but only when the user has finished using them), power up for maintenance and patching overnight, power back down again to save energy when maintenance is complete, and then power up again the next day ready for the user to start work.

Why won't my PC go to sleep?

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 per cent idle for the default Vista power scheme), so if something makes the overall CPU utilisation of your PC go above 20 per cent 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 per cent.
  3. Close down all applications and see if the PC goes to sleep - figure out by a process of elimination which application is preventing sleep.

September 2009