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.
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.
- Open Device Manager.
- Find the NIC that you want to be able to perform Wake On LAN and open its properties sheet.
- Go to the Power Management tab of the Properties sheet.
- 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.
Creating your power plan
- Open System and Maintenance in Control Panel and select Power Options.
- Click Create A Power Plan on the left sidebar (Figure C).
- Select the power plan you want to start with. (In this example, I will use High Performance.)
- Name your plan and click Next (Figure D).
- Choose your initial basic settings and click Create (Figure E).
Editing the new power plan
- Click Change Plan Settings (Figure F).
- Click Change Advanced Power Settings.
- To change Require A Password On Wakeup, click Change Settings That Are Currently Unavailable.
- 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.
- Set Sleep After equal to the time you set on the basic power plan settings screen.
- 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.
- Set Turn off Display After to the same value entered on the basic power plan settings screen.
- Click OK on the Advanced Power Settings screen.
- Click the Save Changes button on the Basic Power Plan Settings screen.
- 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.
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.
Justin James is the Lead Architect for Conigent.