PowerScheduler plugin 0.1 (wakeup/hibernate) (1 Viewer)

A

Anonymous

Guest
Hi,

About the unexpected suspend/hibernate/shutdown when "not at home":
The problem has its origin in the method of detecting which module/screen is active. This problem is now solved and the next release of the plugin won't have this problem.

For you who are waiting for the release of the next beta I'm sorry to say you'll have to wait some more.

I havn't had much time to work on the plugin this week and I want wakeup to work with every type of recordings, not only once-type, before I release the next beta.
 

mama

Portal Pro
May 31, 2004
334
0
Germany
For me it´s working fine now. The only problem I found was stuttering TV after hibernation. Maybe you can add a setting to shut down the PC if there´s no other recording scheduled instead of hibernating it?
 

gabbe

Portal Pro
August 8, 2004
58
1
Sweden
Hello fred, nice work.
Are You using this coding http://msdn.microsoft.com/library/d...ry/en-us/power/base/system_wake_up_events.asp ??

Here is a click from the MS site:

When the system wakes automatically because of an event (other than power switch or user activity), the system automatically sets its idle timer to at least 1 minute. This timer allows applications to call the SetThreadExecutionState function to indicate that they are busy. This enables the system to shut down without affecting the user. The following criteria determine whether a system shutdown is needed:


If the system wakes automatically, it shuts down as soon as the last job is completed, as indicated by the process calling SetThreadExecutionState.
If the system wakes automatically, but the user provides new input while the event is handled, the system does not shut down when the last job finishes.
If the system is on and the user is active, the system does not enter the sleeping state.
If the system is on, no applications are busy, and the user is inactive for a long time, the system enters the sleeping state when the timer expires.

SetThreadExecutionState

The SetThreadExecutionState function enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.


EXECUTION_STATE SetThreadExecutionState(
EXECUTION_STATE esFlags
);

Parameters
esFlags
[in] Thread's execution requirements. This parameter can be one or more of the following values. Flag Meaning
ES_CONTINUOUS
0x80000000 Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared.
ES_DISPLAY_REQUIRED
0x00000002 Forces the display to be on by resetting the display idle timer.
ES_SYSTEM_REQUIRED
0x00000001 Forces the system to be in the working state by resetting the system idle timer.

END clip:
So it should only to be to call SetThreadExecutionState once directly after wake up and once when its ready. If no user inputs from wake up it should go to sleep again....
So You shouldn't need any own timer...
regards /gabbe[/url]
 
A

Anonymous

Guest
@ waeberd and others, thanks for the support. :D

gabbe
Basicly yes, thats what I'm using. Haven't used SetThreadExecutionState yet because the issue really isn't to keep system awake but puting it to sleep while TVcard is still loaded. It looks like some TVcard drivers disables windows inactivity shutdown by setting SetThreadExecutionState() on their own. My shutdown timer is in this case used to trigger a forced sleep or disabling the TVcards as with the None-option.
 

gabbe

Portal Pro
August 8, 2004
58
1
Sweden
OK, but why don't do like this:
Set MP to autostart at boot (throught registry or autostartfolder). When the recording is ready and its time to sleep, just kill MP and make a soft-off (not hibernate). Then at next boot/recording you get all fresh variables. What I understand, windows should be able to wake up from soft-off also.
/gabbe
 

Rybber

Portal Pro
October 26, 2004
166
0
Denmark
Hey fred,

When do you expect the next release to be?

The plugin worked perfect at first, but as reported it will shut down even if it's not in the main menu - and it's a real pain in the ... :)

When working, this plugin completes the HTPC funtionality mediaportal supplies...

Rybber
 

mama

Portal Pro
May 31, 2004
334
0
Germany
Same here as Rybber. It worked fine until the first recording was done. After that it shot down while watching TV. I deactivated it now and will wait for the next release.
 

johnbobjamesson

Portal Pro
June 17, 2004
91
0
Crailsheim
Same here. To be honest, I can hardly wait for the next release, it's a "I have to look for news every hour" thing.... However, fred did already say what and why he's working on, so we just have to wait and hope.... Boy, if I could only code myself ;-))

I'm very grateful for your efforts, fred, as of right now, there's no substitute to MP besides GAM for my usb box and GAM has some other flaws, I just don't like (automatic xmltv integration with German EPG providers and the skins (ugh!)....

J.
 

Users who are viewing this thread

Top Bottom