MPstandbyHandler (3 Viewers)

josch.hh

MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    That seems to be the same problem WaffleMkrMan has. Mpsh has no time to finish the suspend jobs. Windows vista froces the system to suspend.

    Today i found the answer:
    "Microsoft Windows Vista ecosystem significant changes to power management infrastructure & functionality as compared to Windows XP and earlier. Application developers must be aware of the changes to power management in Windows Vista, and design their applications accordingly. From the developer's perspective the points which needs to be taken care of is, Changes to Sleep and Resume Events. In Windows Vista, applications can no longer block in-progress sleep transitions. The PBT_APMQUERYSUSPEND event is not delivered to applications in VISTA and hence applications cannot deny/abort the suspend operation. As per Microsoft's recommendation that applications should not block in-progress sleep transitions on any version of Windows. In VISTA suspend transitions is pretty fast to increase the performance and hence applications handling the PBT_APMSUSPEND event must process it within 2 seconds. Applications have 2 seconds to finish processing the PBT_APMSUSPEND event before Windows continues with the sleep transition, If an application has not returned from the PBT_APMSUSPEND event after 2 seconds, the system will go ahead to sleep state and any remaining processing completes after the system resumes from the sleep state."

    This means that there is no chance to stop Vista from suspending or even request some more time to do all the suspend jobs. It is different with XP. In XP you have a chance to get ready before suspend.

    I never realized that problem because TVService stopped very quick on my development maschine. So i increased the delay for stopping TVS on suspend and found that my Vista machine does the same as yours - it is suspended during the suspend jobs. They were finished on wakeup.

    This is bad news. NO WAY TO DO LONG TERM JOBS ON SUSPEND WITH VISTA.

    It could be a solution to kill TVS instead of stopping it. I will add a property to the TVS and MP stop jobs.

    Wait for new beta plz.
     

    5Hundred

    Portal Pro
    December 14, 2007
    166
    4
    Home Country
    New Zealand New Zealand
    josch.hh Thanks for your work on this, currently i use PVRscheduler (although i'm keen to switch to your plugin) it suffers from the same inability to run tasks as the computer suspends in Vista.

    My simple solution to the Vista suspend problem is first to set the TVService to manual rather than automatic under administrative tools\services. I have a script that starts the TVservice when the computer boots.

    Then i run a script after standby that stops the service, waits for 3 seconds and then starts the service, mp is also started but it is set to wait for the TVservice. So you can "get round" the lack of suspend activities by doing them after start!

    Unfortunately for me when i tested your latest beta version even if i set no suspend jobs when the computer resumes it was skipping the tasks i had set e.g. stop tvservice, start tvservice. This made it of no use sadly so if you could look into this i would be very grateful.
     

    Mercbac

    Portal Pro
    March 20, 2007
    133
    5
    Home Country
    Sweden Sweden
    josch.hh
    Is it really technically necessary that the TV Service is stopped before entering sleep mode? I have also been experimenting with a Windows Powershell script to restart the service after resuming from sleep but I was never able to make it work reliably, probably because either MP was still running and didn't agree with my script yanking away the service, or otherwise because the "restart MP" option was not timed properly with the restart of the service. I suspect that MP maybe restarted earlier than it should have.

    Anyway, I was just trying to find out if more can be done on the resume side without having to worry too much about what to do before entering sleep/suspend.
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    @josch.hh Thanks for your work on this, currently i use PVRscheduler (although i'm keen to switch to your plugin) it suffers from the same inability to run tasks as the computer suspends in Vista.

    My simple solution to the Vista suspend problem is first to set the TVService to manual rather than automatic under administrative tools\services. I have a script that starts the TVservice when the computer boots.

    Then i run a script after standby that stops the service, waits for 3 seconds and then starts the service, mp is also started but it is set to wait for the TVservice. So you can "get round" the lack of suspend activities by doing them after start!

    Unfortunately for me when i tested your latest beta version even if i set no suspend jobs when the computer resumes it was skipping the tasks i had set e.g. stop tvservice, start tvservice. This made it of no use sadly so if you could look into this i would be very grateful.

    Gimme logs....
    By the way, Mpsh wont restart TVS if it was not running before resume
    Of course i can "get round" this by doing it the way you described... but the killing of TVS before suspend had some special meaning on my machine -> TVS worked much more reliable if it didn't get in touch with a windows powerevent





    josch.hh
    Is it really technically necessary that the TV Service is stopped before entering sleep mode? I have also been experimenting with a Windows Powershell script to restart the service after resuming from sleep but I was never able to make it work reliably, probably because either MP was still running and didn't agree with my script yanking away the service, or otherwise because the "restart MP" option was not timed properly with the restart of the service. I suspect that MP maybe restarted earlier than it should have.

    Anyway, I was just trying to find out if more can be done on the resume side without having to worry too much about what to do before entering sleep/suspend.

    Ok , step by step. First try new beta, delete all stop jobs by hand! ... and let TVS be killed on suspend.
     

    Mercbac

    Portal Pro
    March 20, 2007
    133
    5
    Home Country
    Sweden Sweden
    Somehow it took me until now to see this reply... Anyway, I'll give Bet09 a shot although with all stop-delays set to 0sec it has now worked fine for two days, so keeping my fingers crossed.
    Thanks again for the great work!
     

    fabien44

    Portal Pro
    March 12, 2006
    414
    33
    Hello,

    everytime i turn to S3 hibernate and i resume PC MP crashes and launch watchdog. Here the log generated. Plugins PowerScheduler client & server are enabled.
    I use the tool MPstandbyHandler 1.0.0.10 with settings on resume restart MP & on suspend stop MP enabled (10s of waiting time)

    Thanks for your help

    i use MP RC3
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    Plz, read this thread.
    I think this problem is already solved.

    I don't use Watchdig on my system.... so this does not happen to me.
     

    User 04

    Portal Pro
    April 14, 2008
    125
    21
    Home Country
    Using MPstandbyHandler2 Beta09.


    Disabled TV Tuners in Device Manager.

    GUI Log Test Resume successfully enables TV Tuners, but in reality does not work.
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    try to set only one hardware device job for testing.
    try to restart your hardware BEFORE you start TVS.
    try to use a complete different device (for example network card) for testing.


    Maybe this helps.
     

    Mercbac

    Portal Pro
    March 20, 2007
    133
    5
    Home Country
    Sweden Sweden
    Not sure if this is only me or if otherwise only very few people are really running BETA09 on an operational HTPC, but when I set the "Kill Immediately" option (new to beta09) to true for the shutdown of TV Service on the Standby tab, then the HTPC will not wake up for a scheduled recording. I could imagine this has to do with TV Service being killed and therefore not having the chance to set a wake-up alarm before the machine enters S3. As soon as I switch the option to false it does wake up, but then I can not be sure that a recording will actually work, because maybe TV Service wasn't done stopping before entering S3 and will therefore not start, meaning failed recording anyway.
    I do believe that it would work better with a TV Service REstart after resume. The only problem I had when trying it from a Powershell script (tied to the wake-up event in Windows Task Scheduler) was that in combination with the "restart MP" option in MP Config, it would often cause problems in MP. I can test if doing a forced restart of MP from the same script would work better, so that I can time it to start after the TV Service restart.
    Is this "REstart after resume" something you could imagine building into your tool, Josch?
     

    Users who are viewing this thread

    Top Bottom