Data Centers

Set up S3 sleep state in Vista for significant power savings

Unlike older power management modes, S3 sleep state knocks your computer out almost cold, maintaining just enough alertness for you to wake it up. Your computer will typically draw only about 2 to 3 watts of power while it sleeps, and it will take only a few seconds to pick up where you left off before it went dormant. Justin James explains what you need to know about creating an S3 power plan.

This article is also available as a PDF download and a TechRepublic gallery.

With newer computers come higher power bills. Modern processors, RAM chips, and hard drives consume much more power than their predecessors did, and the trend is likely to continue. While hardware manufacturers continue to work at reducing the levels of power consumption, the reduction is usually just a reduction in the leap from the previous generation, as opposed to a net loss. However, you can reduce the amount of power used by the PC when you are not there, and on some PCs, you can even change how much power is used when you're using it.

This is where the S3 sleep state comes in. In older power-saving modes (S1 sleep state), the computer could shut down some components, such as the hard drives and the monitors, after a period of time to reduce power usage. However, the CPU, fans, and other internal components continued to run at full speed. With the S3 power management, your computer is nearly out cold. It maintains a minimum amount of alertness, just enough to wait for you to wake it up. Unlike older "hibernate" schemes, the computer is not actually off with its state saved, it is still on. When you wake it up, you don't need to wait for the BIOS to post or the operating system to come up enough to restore the saved state. Instead, your computer takes only a few seconds to be ready for work, right where you left off. During this deep sleep, the computer will typically draw about 2 to 3 watts of power -- a far cry from the small reduction in power usage with the older S1 sleep state.

Using S3 sleep state in Windows XP

S3 sleep state is enabled by default in Windows Vista. In Windows XP, though, a Registry key change is needed. TechRepublic offers a download that will change this Registry setting for you. This article looks at Windows Vista, but it's applicable to Windows XP as well. The Power settings section of the Control Panel is a bit different, but the rest of the settings should be the same.

Make sure S3 sleep state is enabled in the BIOS

Some BIOSes require S3 sleep state to be enabled or configured within the BIOS before the operating system can take advantage of it. Many modern motherboards do not require (or even contain settings for) this configuration. Your best bet is to check your BIOS' settings, looking in particular at the Power section. Key words to look for are "S3," "Sleep," "Wakeup," and "Resume." Figure A shows an American Megatrends BIOS and its S3 settings section.

Figure A

 

Enabling Wake On LAN (optional)

This step is optional. Wake On LAN is a setting that allows the computer's NIC(s) to bring the PC out of the S3 sleep state upon receipt of a Magic Packet. If you have no reason to wake the PC up without being physically present, you can skip this step. If you want to be able to remotely access the PC (for file sharing, Remote Desktop, or other uses), you'll want to enable this functionality.

  1. Open Device Manager.
  2. Find the NIC that you want to be able to perform Wake On LAN and open its properties sheet.
  3. Go to the Power Management tab of the Properties sheet.
  4. Check Allow This Device To Wake The Computer (Figure B). If you find that your computer will not stay in the sleep state, you may need to check Only Allow Management Stations To Wake This Computer.

Figure B

 

Creating your power plan

  1. Open System and Maintenance in Control Panel and select Power Options.
  2. Click Create A Power Plan on the left sidebar (Figure C).
  3. Select the power plan you want to start with. (In this example, I will use High Performance.)
  4. Name your plan and click Next (Figure D).
  5. Choose your initial basic settings and click Create (Figure E).

Figure C

 

Figure D

 

Figure E

 

Editing the new power plan

  1. Click Change Plan Settings (Figure F).

Figure F

 
  1. Click Change Advanced Power Settings.
  2. To change Require A Password On Wakeup, click Change Settings That Are Currently Unavailable.
  3. Set the Turn Off Hard Disk After option to a value less than or equal to the time for the PC to sleep, for maximum power savings. Note: having the hard drives turn off while you are still using the computer can cause significant slowdown as they spin back up. It is recommended to set this equal to the time needed to go to sleep.
  4. Set Sleep After equal to the time you set on the basic power plan settings screen.
  5. Make sure that Allow Hybrid Sleep is set to On. This allows a combination of S3 (low power) and S4 (Hibernate) to be used. That way, if the computer loses power, no work is lost. This is, of course, at the expense of a small bit of hard drive space. In my opinion, there is no reason not to use this setting.
  6. Set Turn off Display After to the same value entered on the basic power plan settings screen.
  7. Click OK on the Advanced Power Settings screen.
  8. Click the Save Changes button on the Basic Power Plan Settings screen.
  9. To minimize the CPU's power draw under light load, edit the Minimum Processor State setting under Processor Power Management. To scale it back even under heavy load, change the setting for Maximum Power State.

Testing the new settings

To test the new settings, simply leave the computer alone for the specified amount of time. You will hear the computer get extremely quiet; this is because all of the fans and hard drives have been stopped. If you still hear fans or drives, go back and check your settings, particularly your BIOS settings.

Waking up the computer

The computer will appear to be off. You will need to press the power button, a mouse button (at least with an optical mouse; a mechanical mouse may work with a jiggle), or tap the keyboard to get the computer to turn on. After waking, the computer will spin up the drives and the fans, and in under 10 seconds, you should see your desktop or the login screen, depending upon whether you chose for the computer to require a password upon waking. (The default setting is to require a password.)

If you are looking to wake the computer up remotely (for example, to connect to it via Remote Desktop), you will need to send a Magic Packet to the PC. The Magic Packet is a specially designed IP packet (usually a UDP datagram) that tells the NIC to wake the computer up. This Magic Packet needs the MAC address of the NIC, so be sure to have this information handy when configuring or using a Wake On LAN utility. The easiest place to get this information is to click the Details button on the Network Connection Details screen (Figure G) and look under Physical Address. Alternatively, you can run the command ipconfig /all from the command line to retrieve the MAC address (Figure H) and look for the entry for Physical Address.

Figure G

 

Figure H

 

A variety of utilities are available for sending the Magic Packet. If you're going to be waking the computer up only from within the network, you'll need the broadcast address for your local network. If you plan to wake the computer up from outside of your local LAN through the Internet, you'll need to configure your router to forward the Wake On LAN port (usually port 9 or port 7) on the external interface to the IP address that is the internal broadcast address. Not every router supports port forwarding to a broadcast address, so test this on your router before expecting it to work.

Because a broadcast address is used and the Magic Packet is keyed with the PC's MAC address, you can have multiple computers within the network set to go to sleep and selectively wake them up. You do not necessarily need to use the broadcast address if you can be assured that the PC will always have the same address (such as in a static IP address scheme or if the DHCP server keeps a reservation for that PC). But generally speaking, using the broadcast address makes the most sense.

Some free utilities to perform Wake On LAN are:

  • Depicus: A Wake On LAN utility written in .NET. There is also a Web-based version, which you can use on the company's Web site or download and install on your own Web site. Additionally, non-.NET versions are available, including a Macintosh version. Note: the Web site and the software will send to the broadcast for the network.
  • RemoteWakeup.com: A simple, Web-based Wake On LAN system.
  • wakeonlan: The wakeonlan Perl script lets you wake computers as well with the Magic Packet and will run on any computer with Perl installed.

About

Justin James is the Lead Architect for Conigent.

6 comments
phillman6
phillman6

We are having difficulty waking a Dell Vista 64 computer over the internet. Normally if we tell the computer to go to sleep manually we can wake it, but if no one is logged in and it times out and goes to sleep, we can NOT seem to wake it over the web via wakeOnLan.me or RemoteWakeUp.com. We tried many settings in Vista, Bios, and our router. So what is different when you tell Vista to put the computer to sleep from the Start menu or the log in page, versus when it hits the non-use time limit and goes to sleep? Is there a BIOS or Power Saving (or router) setting that definitely needs to be set, no matter what, to get the computer to wake on lan under all circumstances? It seems under many settings, sometimes it works, sometimes it doesn't even though we think we have all the settings the same. Under power options we have sleep after xx minutes set hibernate never In BIOS we tried S1 and S3 remote wake on low power mode off (needs 3rd party non mother board NIC to work with WOL) on router we have tried Virtual Server and port forwarding UDP ports 7 and 9 to the IP address of the computer The computer has a static IP address.

robert-young
robert-young

If Media Centre is set to record TV, will it automatically wake the PC to do its recording, or if the PC is asleep will the recording fail?

bulk
bulk

A recording event will wake Media Center and it will sleep again at the end of the recording. It will also do this to download the latest guide listings, by default at 03:00. Having said that, ensuring everything in the BIOS and drivers is correctly set to achieve that seems problematic. RS

Justin James
Justin James

You would have to test that yourself. I do know that you can set in Task Scheduler that the computer should wake to perform certain tasks, but that may not break it out of S3, since it is in such a deep sleep! What I would do, if I had a second PC that doesn't do S3, would be to have the second PC send the Wake on Lan packet 5 minutes before it is due to start. Also make sure that you set that software to not let the PC sleep while it is doing its magic! J.Ja

Editor's Picks