Friday, September 4, 2009

Let’s WoK and WoL – Computer Restarting After Going To Sleep

I finally got around to installing Windows 7 RC on my desktop PC to replace Vista Ultimate.  After enabling extended memory in the BIOS i had 64-bit running in about 1 hour and it is WAAAY faster than the Vista setup i had before.  Anyway all was going well and i had it running next to me while using the laptop.  Next thing i notice is that the computer goes to sleep - it turns out the default power profile in Windows 7 is balanced which by default puts the computer to sleep after 30 minutes of activity, even on desktops.  I guess this is to try and help the world save power, since most users probably don’t have an issue if their computer shuts itself off.  Considering i should try and be green too, I decided to run with it and leave this profile enabled.  Much to my shock the computer restarts itself 5 seconds later!

It turned out the default Windows settings are to blame for this - by default WoL is enabled for ethernet NICs and configured to allow any packet to turn the computer on!  On the majority of home networks out there with more than one computer, this means that it is highly probable a packet will be received in the near future, resulting in the issue i had, which is for the computer to immediately turn itself on.  I really don’t understand why this should be the default configuration for most users out there.  Still, it is simple enough to change so that only a magic packet will turn the computer on, or disable WoL completely, which is much more desirable for most users.  To do so:

  1. Go to the start menu, type 'device manager’ and press enter to start the Device Manager
  2. Expand the Network Adapters section and find the correct network card.  This step is very important – make sure you are modifying the network card that is used to connect to your LAN.  It might be an idea to modify all adapters if you are unsure
  3. Double-click the network adapter to open its properties
  4. Change to the Power Management tab
  5. Uncheck the Allow this device to wake the computer option if you want to disable WoL completely.  In my case, i have this turned on but ensure the Only allow a magic packet to wake the computer option is checked.
  6. Press OK to save the changes

image

I also recommend turning off Wake-on-Mouse (WoM) since its very easy for someone (eg – your 3 year old son) to knock the mouse and turn the computer on.  I like to enable Wake-on-Keyboard (WoK) since I find it very handy to be able to hit a key and start using my computer.  You control both of these through the device manager using the same method described above but for the relevant devices.  WoK combined with WoL gives me a great combination – using the keyboard to turn the computer on locally and the LAN to turn on the computer when i need to access it remotely, while minimising my PC power usage.

I love WoK and WoL, put another dime in the jukebox baby …

No comments: