After the first post I’ve been doing a bit of experimenting with my work machine (new) and also at home (old). We’re all grown ups here so I’m not going to include many screen shots. Hibernate seems the best option to me as it gives you the most options. Maintain your state and when you power on, you’re back to a ‘locked’ logon, meaning that even if you decide not to do an automatic wakeup (or your system simply doesn’t support it), then your boot up time’s likely to be less than a minute in any case – so who cares!
I wanted that extra bit of convenience, so I’ve got a scheduled hibernate and wakeup now working at work and at home.
As a side note, I love keyboard shortcuts, and so here’s a list of shortcuts to Control Panel dialogs.
The procedure for hibernation is the same for all machines, but the wakeup will vary from full support to no support…
- Enable Hibernation through Power Options dialog in control panel (Hibernate Tab). Start–> Run –> powerconfig.cpl
- If you have 2gb of RAM or more download a Microsoft HotFix from here and install. Hibernation won’t work without it.
- Open Device Manager (Start –> Run–>devmgmt.msc) and open the properties of the Network adapter you want to use to control the wake up
- Check the ‘Allow this device to bring the computer out of standby’ box (Power Management Tab)
- Ensure ‘Wake Up Capabilities’ (Advanced Tab) is not set to disabled or none. Each network adapter will have different capabilities. The work machine has (Both, Magic Packet, None, Wake up Frame). The option was already set to ‘both’ so I didn’t make any change.
- Create a new scheduled task (Start –> Run –> control schedtasks) called Hibernate with the following in the Run box…
C:\WINDOWS\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate
- Go to the Settings Tab, and configure the idle time (if necessary). I configured the following (which seems to work OK):
Most of the risk of losing stuff is mitigated by doing a hibernate over a full shut down in any case. I haven’t tested whether the idle time recognises non-UI processes – e.g. say I’m encoding video. I guess I’ll find out one day…
- Schedule the task to run at a time when you’re comfortable to switch off every day (taking any overnight processes like backups or defrags into account – maybe bring those forward) – remember ‘any’ time your computer is powered off is a good thing. I’ve got the work machine set to go off at 18:00, and the home machine to go off at 23:00.
The work machine (Dell Precision 690 Xeon 3.2ghz, 2gb RAM) responds quite happily to the following :
- Create another scheduled task called ‘Wake up’ (or something equally innovative), and put literally ‘any’ command line in. I just fudge the following as it will exit once finished…
C:\WINDOWS\SYSTEM32\cmd.exe /C dir (This just opens a command shell – runs a dir then exits)
- Schedule this to run ‘just before’ you think you’re going to need it every day. I get in early so the work machine comes on at 07:25 and I don’t need the home machine until 19:00 after the kids are in bed.
The home machine (can’t remember the spec – but it’s older – circa 2004) – the case is actually a ‘lot’ older, (but recycling is another thread) won’t respond at all to the wake up scheduled task, and so based on the C# code posted previously I created a LANWakeup console app (there’s plenty of other ones kicking around) to send a magic packet to the MAC Address of my home Network Adapter. I’ll update the post to include this…
This is then scheduled on my ‘other’ home machine at 19:00, and this works fine. The only problem of course is that I then can’t turn ‘both’ machines off overnight as something needs to be ‘on’ in order to send the wakeup. The other home machine is also older than the one I’ve got hibernating and it would need to be ‘remotely’ woken up too.
If you try your hibernate task and it comes straight back on, then it’s responding to other network traffic (which happens with some machines apparently – the home one experienced this but not the work one). In this case do the following:
- Go back into Device Manager and the ‘Power Management’ properties of your Network Adapter, then check ‘Only allow management stations to bring the computer out of standby’. This seems to help the adapter ignore general broadcast traffic and only respond to specific wake up requests (worked for me anyway)
New machines (last 3-4 years) are almost certain to have wakeup capability in some shape or form. The newer the machine, the more likely it’s preconfigured in the BIOS. If wakeup isn’t working in any way then you’ll need to go into the BIOS on startup (Del / F2 / Ins – etc) and look for Power Management options. The previous post had a link on BIOS setup. If you’re dealing with more ‘vintage’ kit then you’ll have to resort to the on-off button to wake the machine up, but I kindof like the idea of that, and may ditch the auto-wakeup in time, as it’s a bit lazy really!