Becoming slightly more environmentally friendly – Scheduled shutdown and Wake up

I leave computers on at home (bad boy), but I have slightly environmental sensibilities, so I’ve been wondering how I can best retain the convenience of having machines available when I want them, but also conserve energy when they’re not being used (assuming of course they’re not ‘doing’ anything overnight).

If you’ve got the disk space then it seems the best (easiest) option is probably a scheduled ‘hibernate’ (if idle for n minutes) at night, followed by another ‘wake up’ task in the morning (with ‘wake the computer to run this task’).  The wake up task could do an auto logon if you need.  Hibernate actually powers off (Standby doesn’t), but effectively writes your system state to disk (using approx same disk space as total RAM).  You need to go into power options first to ‘enable’ hibernate.

This article explains how to schedule a hibernate – just change the psshutdown options to -h instead of -d. I also don’t care if there’s a logged on user.  (Actually scratch that – as I found the following command will happily do a hibernate without any other tool – much nicer…. ) 

C:\WINDOWS\system32\rundll32.exe  powrprof.dll,SetSuspendState Hibernate

I also found this, talking about issues with hibernate.

Waking up is a little bit more troublesome and is unlikely to work unless you enable your network adapter to respond to wakeup calls.  This goes into a bit more detail on that.

If you want to go further and just ‘shut down’ rather than hibernate, then step 1 would be the same – just change the psshutdown options again to -k

If you’re completely shut down, you’ll need some sort of Wake On LAN capability (something I’ve never really bothered with before), and I found this code that’ll do nicely as a console app.

I haven’t decided which way to go yet, as I prefer the idea of a complete shutdown without the need for disk space to write system state to disk, but then you need another machine that’s ‘on’ to wake the shut-down machine back up (potentially defeating the purpose?).  The first (hibernate) option is self-contained within the one machine, and uses a built-in facility to wake the machine up using the system clock.  I also do a backup each night, so I’ll maybe bring that forward and schedule a hibernate of all machines.  I’ll be interested to see the difference in the electricity usage.  I might post a more full procedure when I’m happy everything’s working for me…