PDA

View Full Version : Hibernating your PC from the commandline



AskJacob
28th July 2008, 10:29 AM
Here is a tip for those people wanting another possible way to speed up their emulator PC boot time:

Hibernate instead of shut down.

Hibernating saves the windows state to the hard disk - so you can still unplug the machine (unlike StandBy which is a low power mode but MUST remain plugged in!)

If your emulator does not support Hibernate on exit, this is a handy command line command:



%windir%/system32/rundll32.exe powrprof.dll,SetSuspendState Hibernate


If your emulator cannot use a command line syntax, but will happily run an application, then you can make a batch file (e.g. hibernate.bat) which contains the command above.

That should do the trick for XP users.

Cheers!
Jacob

I'll add that some machines just don't play nice with hibernate so some testing would be a good idea. You'll know 1st time you try, as it may bitch and moan on restarting.

Nothing will be broken, you'll just have to skip it (or figure out why it isn't working).

As hibernating does not RESTORE a blank or new state of windows - if you are running unstable software or have memory leaks over time these will add up.

A full shutdown and restart is recommended every now and then to clear up those kinds of issues. That said I have gone without a full restart for over 3 months at a time, and that is with a full desktop setup (not just an emulator) :)

Cheers

felixthadog
29th July 2008, 08:29 PM
Hi Jacob,

You need to make a correction to your post, the code should be:

%windir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

Matthew

AskJacob
30th July 2008, 02:33 PM
Thanks mate, I'll fix it. Sorry it didn't work with your different shell :(

Well, there you go. using the code tag strips out the slashes. Using a quote tag does not.

Cheers
Jacob

Fudge
17th June 2010, 10:42 AM
Just on a side note, anyone using Vista or 7, the command is simply:

shutdown /f /h

/f Forces the system, whereas /h is the Hibernate switch.

Just thought I'd put that in there!!!

@lien_Zed
17th June 2010, 09:15 PM
the problem with constantly hibernating your pc in windows is that windows gets all screwy after a while

you need to do a full shutdown at a semi regular interval or your heading for disaster:(

AskJacob
18th June 2010, 05:14 PM
Well, I used to do it for months at a time at least with the office machine. Once they kept pushing updates though, it became impractical.

Vista and win 7 hibernate by default these days, not shut down (it makes the pretend startup time faster!)

This thread was really aimed at a very specific case (I can;t even remember what started it all that time ago!)

Cheers
Jacob