PowerScheduler++ test versions (1 Viewer)

sfang

Portal Member
February 15, 2011
6
0
Home Country
Sweden Sweden
Re: PowerScheduler++ Version 1.2.0.10 (RC1)

Away mode is apparently only triggered by a sleep (S3) request and not by a hibernate (S4) request on my computer. Everything seems to work perfectly when using S3 as suspend mode.

Does anyone know of a way to enable Away Mode for hibernate requests? There's no point in powering the RAM and in my case keyboard and mouse all night using sleep mode. That's just a waste of energy.

Thanks for the info and the plugin Michael! Does it work like this on your computer also or does shutdown/restart/hibernate also trigger Away Mode?
 

Wbunaarf

Portal Pro
December 9, 2005
534
103
Sweden
Home Country
Sweden Sweden
Re: AW: Re: AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

From the logs it seems that the PS++ client hangs when calling SendKeysWait and thus the call to UserShutdownNow() never returns. I tried to reproduce this here but had no error. We should carefully work out what is the difference between your and my system:

Perhaps I should do a test with blue3(wide), the ordinary home screen and no plugins (rather than Maya, basic home and a few plugins)?

Can you check that your PS client plugin is version 1.2.0.10 (I cannot see this from the logs)?

Unfortunately the client plugin doesn't seem to have a version (0.0.0.0), but the file sizes and dates seem to match what's in the zip/mpi:

Code:
C:\Program Files\Team MediaPortal>dir /s powerscheduler*
 Volymen i enhet C har ingen etikett.
 Volymens serienummer är 7408-66BD

 Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal

2011-01-04  17:43            26*624 PowerScheduler.Interfaces.dll

 Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal\plugins\process

2011-01-04  17:52            60*928 PowerSchedulerClientPlugin.dll

 Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal TV Server

2011-01-04  17:43            26*624 PowerScheduler.Interfaces.dll

 Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal TV Server\Plugins

2011-01-04  17:45           119*296 PowerScheduler.dll

To reproduce the bug, I did the following:
- Nothing is running, only desktop
- I start the MP client, go to Tv guide, select a program ending soon (so that I do not have to wait too long...) and start recording (from context menu without watching it).
- I leave TV guide and go to home screen
- I press the poweroff button of my keyboard and the machine goes to away mode
- After the recording has ended and the idle timeout time has passed the machine goes to standby (S3)
Is that similar to your scenario? I also tried some varaiations (start recording from live tv, change to the desktop before power off, ...) but they also worked well...

Yes, it's similar, but I still tried your 'recipe' above (attached logs). The result was the same as in my previous tests, ie a hung mp (which according to the task manager used ~50% CPU) and a suspend as soon as I killed the process.

As a side note, I think it's a bit counter intuitive to respect the idle time setting when in away mode. If I press the power button I expect the machine to go to sleep as soon as possible (ie after end of show + post rec).

//Johannes
 

romadd64

MP Donator
  • Premium Supporter
  • October 24, 2007
    82
    15
    Home Country
    Italy Italy
    Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    Michael,

    thanks for this great enhancement to powerscheduler plugin.

    I'm using the functionality "Run this command before standby / after wakeup" to launch a .bat command because a faulty tvcard driver needs to be disabled on standby/shutdown and enabled on wakeup/boot .
    But with standby mode set to shutdown the command isn't called neither on shutdown nor on boot.
    Is this the expected behaviour ? I think it should be called also on shutdown and boot, with the parameter to the launched command set to shutdown or boot.


    Thanks, romadd
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    @sfang
    Away mode is apparently only triggered by a sleep (S3) request and not by a hibernate (S4) request on my computer. Everything seems to work perfectly when using S3 as suspend mode.

    Does anyone know of a way to enable Away Mode for hibernate requests?
    From Microsoft "Away Mode in Windows Vista":
    Entering Away Mode

    If Away Mode is enabled on the PC, any power action mapped to Sleep causes the PC to enter Away Mode. Power actions include:
    • System button presses mapped to Sleep:
      • Hardware Power button.
      • Hardware Sleep button.
      • Mobile lid switch.
    • Human interface device (HID) button events:
      • HID Sleep button (such as on a USB keyboard).
      • HID Power button (such as on an IR remote control).
    • Windows Start menu power button.
    • Windows Start menu Sleep option.
    • Programmatically, with the SetSystemPowerState or SetSuspendState API.
    The following power actions do not cause the PC to enter Away Mode:
    • Any power action mapped to Hibernate.
    ...
    Thank you for the hint. I didn't realize that before, since I am using hybrid sleep mode for my PC. I will add this information to the PowerScheduler++ documentation.

    @Wbunaarf

    Hi Johannes,

    Perhaps I should do a test with blue3(wide), the ordinary home screen and no plugins (rather than Maya, basic home and a few plugins)?
    Yes, I think this would be the best way to narrow down the error.
    Code:
    C:\Program Files\Team MediaPortal>dir /s powerscheduler*
     Volymen i enhet C har ingen etikett.
     Volymens serienummer är 7408-66BD
    
     Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal
    
    2011-01-04  17:43            26*624 PowerScheduler.Interfaces.dll
    
     Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal\plugins\process
    
    2011-01-04  17:52            60*928 PowerSchedulerClientPlugin.dll
    
     Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal TV Server
    
    2011-01-04  17:43            26*624 PowerScheduler.Interfaces.dll
    
     Innehåll i katalogen C:\Program Files\Team MediaPortal\MediaPortal TV Server\Plugins
    
    2011-01-04  17:45           119*296 PowerScheduler.dll
    Yes, these are the 1.2.0.10 files, so the error must be somewhere else.
    As a side note, I think it's a bit counter intuitive to respect the idle time setting when in away mode. If I press the power button I expect the machine to go to sleep as soon as possible (ie after end of show + post rec).
    I also thought about changing this, but then I realized that the system idle timeout is retriggered at the end of a recording (by the last call to SetThreadExecutionState(SYSTEM_REQUIRED) from Scheduler.cs), which I cannot change. So I decided to let PowerScheduler behave identically, so that system idle timeout and standby forced by PS++ happen (nearly) at the same time.

    Michael

    @romadd64

    Hi romadd,
    ... I'm using the functionality "Run this command before standby / after wakeup" to launch a .bat command because a faulty tvcard driver needs to be disabled on standby/shutdown and enabled on wakeup/boot .
    But with standby mode set to shutdown the command isn't called neither on shutdown nor on boot. ...
    PowerScheduler triggers the external command by the SUSPEND and RESUMEAUTOMATIC / RESUMECRITICAL power events. The advantage of this solution is, that the command is triggered on each suspend / wakeup, not only when caused by PS. But since there are no power events for shutdown or boot, the command cannot be triggered in these situations.

    Michael
     

    austuff

    Portal Member
    August 15, 2008
    35
    1
    Home Country
    Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    Hi, im finding that mp's built in power scheduler plugin will send my pc to standby when playing music. (i have it set to standby from any screen not just home screen because kids walk away from tvseries screen etc, and i want to save power). Does this plugin standby when playing music.

    Cheers
     

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    Re: AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    Yes, I think this would be the best way to narrow down the error.Yes, these are the 1.2.0.10 files, so the error must be somewhere else.

    I changed theme to Blue3Wide, set home screen to non-basic and disabled all plugins (some .dlls from plugins/windows, like e.g. cornerstone, were still loaded though), but the result was still the same as in my previous tests (manually leaving away mode after rec+post rec+idle brought up mp hung using ~50% CPU, immediate suspend upon killing the task) . I have logs of it if you think it would be of any use.

    As a second test I reverted to my usual settings (theme/home/plugins), started a recording and put the machine in away mode. After the recording (show + post rec), but before ps++ tried it's magic, I pressed the keyboard which immediately brought back mp fully functional.

    Is there anything special you'd like me to try or any logs you want?

    //Johannes
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    AW: Re: AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    Hi, im finding that mp's built in power scheduler plugin will send my pc to standby when playing music. (i have it set to standby from any screen not just home screen because kids walk away from tvseries screen etc, and i want to save power). Does this plugin standby when playing music.
    Playing music should prevent your PC from standby also with the original PowerScheduler plugin. Maybe you have not enabled the client plugin?

    Michael

    Is there anything special you'd like me to try or any logs you want?

    //Johannes
    I am sorry, but at the moment I have no idea at all, how to find out the reason for the error. Because I cannot reproduce it here, it would be interesting to see, if others have the same problem.

    The exact error scenario is: On a single-seat system you have configured "PowerScheduler++ forces system to go to standby when idle". While a recording is active, you press power off / remote off (it does not matter if tv is running or not). The system goes to away mode. After the end of the recording it should go to standby, but it keeps running with MP client hanging. After killing the Mediaportal.exe process, the system suspends immediately.
    Please help! If anyone experiences this problem, please send logs and system specs.:D

    Michael

    PS: @Johannes: Just to eliminate this - do you really run MP in a 1.1.1 SVN as stated in your specs? If yes, could you please send me a link to that version?
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    Hi there,

    In relation to the above:

    "The exact error scenario is: On a single-seat system you have configured "PowerScheduler++ forces system to go to standby when idle". While a recording is active, you press power off / remote off (it does not matter if tv is running or not). The system goes to away mode. After the end of the recording it should go to standby, but it keeps running with MP client hanging. After killing the Mediaportal.exe process, the system suspends immediately."

    I have the same issue - although the root cause/reason might be different, I can come downstairs in the morning and find my HTPC still running, after I left it recording (and pressing shutdown). MePo client will still be loaded. As soon as I kill the MePo client, the HTPC shuts down. I have previsouly attached my logs (I believe I had a web/socket exception error - so maybe not related).

    It might just be a fault with my build.

    Thanks,

    J.
     

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    Re: AW: Re: AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    I am sorry, but at the moment I have no idea at all, how to find out the reason for the error. Because I cannot reproduce it here, it would be interesting to see, if others have the same problem.

    My brother has got an almost identical system, I'll see if I can get him to try ps++.

    PS: @Johannes: Just to eliminate this - do you really run MP in a 1.1.1 SVN as stated in your specs? If yes, could you please send me a link to that version?

    Well... Technically, yes. I run a self compiled SVN-build (WebSVN - MediaPortal - Log - Rev 26797 - /), but this should be just about the same as 1.1.2. Still, if you want it I can make it available to you.

    //Johannes
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    AW: Re: AW: Re: AW: Re: PowerScheduler++ Version 1.2.0.10 (RC1)

    I have made a new test version of MP that should log the error more verbosely. It would be nice if you try it out and send me the logs. Maybe they tell me more...

    Michael
     

    Attachments

    • PowerScheduler++ 1.2.0.10a.mpe1
      113.4 KB

    Users who are viewing this thread

    Top Bottom