Scheduled Energy Savings

By: Eric Schultz

Purpose

The purpose of this tutorial is to show you how to set up scheduled changes to your energy settings in both Windows and Linux.

Back Story

With the rising cost of electricity I figured it was time to set up those pesky Energy Star settings on my computer. Idealy, I'd like it to sleep/hibernate to save the most.

The only problem is that I actually WORK on my computer! Imagine that.

In the past, the first time a computer went to sleep while I was working/reading the screen, I'd set it to "Always On". So, then I tried setting it up to suspend after a very very long time (4 hours.) But this isn't all that good since even during off hours I sometimes use the computer to check something.

Setting it all up on Windows

Step 1 - Create Power Profiles

Go to: Start -> Control Panel -> Display
Select the "Screen Saver" Tab
Click on the "Power" Button

Now set up 2 or more Power profiles by Selecting your settings and Clicking "Save As".
We will need the names of the power profiles later... so write them down.

Step 2 - Configure Task Scheduler to Change the Power Profiles

Tricks and Tips -- (or Troubleshooting)

On Windows, sometimes things don't work like they should. These are some of those things.

Hardware/Software Blocking Suspend

Sometimes a piece of Hardware or Software will block suspend. You'll have to google these problems, sometimes it's an old driver, or just a setting. Beware any software that Polls (or has "poll" in it's name.) If the computer is not auto-suspending (test by setting suspend to 1 minute) these programs are good culprits.

ati Hotkey Polling Service

If you have an ATI graphics card, this "service" is installed to allow you to use hotkeys (keyborad shortcuts) to change display settings. I've NEVER seen any sane person do this, and this "service" WILL stop your computer from auto-suspending. You can safely disable it.

Setting it up on Linux

Well I have never had my Linux box suspend since I run servers on it (Even locally for testing and monitoring other computers.) But the screens I have hooked up do need a rest. So this only sets the sleep timeouts on the screens.

1. Get a terminal
2. run: crontab -e
3. Add two lines to the crontab:
01 07 * * 1-5 your_username xset -display :0.0 dpms 3600 3600 3600
01 19 * * * your_username xset -display :0.0 dpms 600 600 600


The first part (before your_username) is the schedule of when to run the command (read "man 5 crontab" to learn more)
The second part (after your_username) is the command that is run (read "man xset")
The numbers are the dpms settings in seconds (3600 = 1 Hour, 600 = 10 Min.)