Windows goes to sleep while encoding

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
AlBundy
Bright Spark User
Posts: 377
Joined: Mon Dec 31, 2012 4:47 am

Windows goes to sleep while encoding

Post by AlBundy »

While encoding with HandbrakeCLI my system still goes to sleep - it would be better if handbrake prevents that,

I'm working with Windows 7 Home Premium 64bit and
[23:13:35] hb_init: checking for updates
[23:13:35] Using http://handbrake.fr/appcast.xml
[23:13:35] latest: 0.9.9 i686, build 2013051800
[23:13:36] hb_init: starting libhb thread
HandBrake 0.9.9 (2013051800) - MinGW x86_64 - http://handbrake.fr
Your version of HandBrake is up to date.

Thanks

Al

P.S.: As workaround I use a tool called DontSleep
User avatar
Rodeo
HandBrake Team
Posts: 12757
Joined: Tue Mar 03, 2009 8:55 pm

Re: Windows goes to sleep while encoding

Post by Rodeo »

Yeah, IIRC s55 implemented sleep prevention in the GUI code rather than in libhb.

The infrastructure is in place (in libhb/ports.h and ports.c, the CLI will take care of calling the functions when necessary), but I don't know if the relevant Microsoft API(s) can be used when building with MinGW.
drizzle
Posts: 9
Joined: Fri Nov 22, 2013 5:39 pm

Re: Windows goes to sleep while encoding

Post by drizzle »

AlBundy wrote:While encoding with HandbrakeCLI my system still goes to sleep - it would be better if handbrake prevents that,

P.S.: As workaround I use a tool called DontSleep
Another idea might be to try altering the Windows power scheme, like

powercfg -s scheme_min (minimum savings = max performance, no sleep, etc)
handbrakecli.exe ....
powercfg -s scheme_balanced (enable sleep, standby, etc)

powercfg -list to see the power schemes
powercfg -aliases to see the friendly names that you can utilize instead of the long GUIDs
AlBundy
Bright Spark User
Posts: 377
Joined: Mon Dec 31, 2012 4:47 am

Re: Windows goes to sleep while encoding

Post by AlBundy »

I don't want to modify my power scheme - it would be better if handbrake disables standby while encoding.
Post Reply