Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > DVD & BD Rebuilder
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 11th February 2011, 18:46   #1  |  Link
mposner
Registered User
 
Join Date: Jan 2011
Posts: 2
Windows goes to sleep while BD Rebuilder is compressing

I am using version 0.37.03. The release notes indicated a fix to prevent Windows from sleeping while DB Rebuilder was compressing a disk. This does not work for me (Win7 64 bit).
In the past I have used the following to prevent Windows from going to sleep successfully:

EXECUTION_STATE WINAPI SetThreadExecutionState(
__in EXECUTION_STATE esFlags
);


SetThreadExecutionState(ES_CONTINUES | ES_SYSTEM_REQURED);

and this to allow it to go to sleep:

SetThreadExecutionState(ES_CONTINUES);

I hope this helps
mposner is offline   Reply With Quote
Old 11th February 2011, 23:37   #2  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 21,171
This is what is currently used:

SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED | ES_CONTINUOUS)

It is executed at the beginning of every encode (call to X264).

and I use this to allow it to go to sleep:

SetThreadExecutionState(ES_CONTINUOUS)

It is executed at the end of each X264 call.

The only way I can see that your system might go to sleep is if you have the timeout so low that it will go to sleep during muxing or some other relatively low time demand process. I got another similar report, so I'm changing it for the next version so it gets disabled at the beginning of each complete job, and disabled when it is finished.
__________________
jdobbs.softworks@gmail.com

Last edited by jdobbs; 11th February 2011 at 23:40.
jdobbs is offline   Reply With Quote
Old 12th February 2011, 17:03   #3  |  Link
ilancas
Guest
 
Posts: n/a
The problem is that issuing that command does not reset the sleep timer, so if the pc thinks it has been idle for the "sleep after" time already, it will sleep straight away!

My issue is that my monitor doesn't sleep whilst BD RB is doing its stuff, so I have to turn if off manually in order not to waste 100+ watts of electricity (I have a large screen) when not using my pc for anything else.

Last edited by ilancas; 12th February 2011 at 17:14.
  Reply With Quote
Old 12th February 2011, 18:32   #4  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 21,171
Quote:
Originally Posted by ilancas View Post
The problem is that issuing that command does not reset the sleep timer, so if the pc thinks it has been idle for the "sleep after" time already, it will sleep straight away!

My issue is that my monitor doesn't sleep whilst BD RB is doing its stuff, so I have to turn if off manually in order not to waste 100+ watts of electricity (I have a large screen) when not using my pc for anything else.
I'm changing the way it works in the next release. Also, in the next version you will be able to disable it if you don't want it.
__________________
jdobbs.softworks@gmail.com

Last edited by jdobbs; 12th February 2011 at 19:38.
jdobbs is offline   Reply With Quote
Old 13th February 2011, 18:49   #5  |  Link
mposner
Registered User
 
Join Date: Jan 2011
Posts: 2
I think changing at the beginning/end of each job will work

The sleep timer on my system is set to 1 hr.

Setting at the begin of each job and resetting at the end should work. I have a small command line program that uses this code to prevent the system from going to sleep during a backup and it has worked (the backup program I was using did not prevent the system from sleeping). You might also instead consider framing a batch instead of each job.
- Mike
mposner is offline   Reply With Quote
Old 13th February 2011, 19:58   #6  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 21,171
Quote:
Originally Posted by mposner View Post
The sleep timer on my system is set to 1 hr.

Setting at the begin of each job and resetting at the end should work. I have a small command line program that uses this code to prevent the system from going to sleep during a backup and it has worked (the backup program I was using did not prevent the system from sleeping). You might also instead consider framing a batch instead of each job.
- Mike
In the next release I've also added a routine that resets the timer count every 30 seconds while a job is being processed. That ought to do it for everybody..
__________________
jdobbs.softworks@gmail.com
jdobbs is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.