PowerSchedule does not suspend after a recording (1 Viewer)

gloomyandy

MP Donator
  • Premium Supporter
  • September 15, 2006
    424
    14
    63
    Home Country
    United Kingdom United Kingdom
    MediaPortal Version: SVN Build 12625 (13.01.2007 / 18:44 CET)
    MediaPortal Skin: Blue Two
    Windows Version: XP Home SP2
    CPU Type: AMD 64X2 4200+
    HDD: Samsung 200Gb
    Memory: 1Gb DDR
    Motherboard: ASUS P1-AH1
    Motherboard Chipset: nVidia MCP 51
    Motherboard Bios:
    Video Card: nVidia GeForce 6150
    Video Card Driver: 91.47
    Sound Card: Realtek high def
    Sound Card AC3: no AC3
    Sound Card Driver: 5.10.0.5296
    1. TV Card: Hauppauge HVR-1300
    1. TV Card Type: DVB-T/Analogue hybrid with mpeg hw encoder
    1. TV Card Driver: 2.5e
    2. TV Card: Hauppauge Nova T-Stick
    2. TV Card Type: DVB-T
    2. TV Card Driver: 2.5e
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Intervideo XPack 2.11.15
    MPEG2 Audio Codec: Intervideo XPack 2.11.15
    Satelite/CableTV Provider: NTL
    HTPC Case: ASUS Pundit P1
    Cooling:
    Power Supply:
    Remote: MS MCE
    TV: Hyundai Q320 32" LCD
    TV - HTPC Connection: DVI

    During the testing for another problem with PowerScheduler I noticed this and I've now tracked it down. I'm fairly sure this is caused by the recent changes to allow "PowerScheduler will recover from a critical ShutDown".

    Basically what happens is this. If PowerScheduler is in use and a program is scheduled to record and the recording starts while mp is running (not while it is suspended), then after the recording has completed if the user moves to the home screen PowerScheduler will not suspend the system after the set idle time.

    How to reproduce
    1. Setup to use PowerScheduler:
    - ShutDownInterval = 5
    - ShutDownMode = suspend
    - ForceShutDown = False
    - TimerInterval = 30
    - WakeUpInterval = 2
    - ReinitRecorder = True
    2. Start MP
    2. Schedule a recording a short time in the future.
    3. Go to any non home screen (like MyMusic or MyTV - with TV off).
    4. Wait for the recording to start.
    5. Move to the home screen.
    6. Wait for the recording to finish
    7. Wait more than ShutDownInterval, note that MP does not suspend.

    What I think is happening is that with the above PowerScheduler is setting a timer for the start of the program (as it should), however because the user is not in the home screen PowerScheduler correctly does not suspend before the program starts to record. However the timer still goes off and this causes the OnWakupTimer method to be called. This call checks to see if the system has previously shutdown correctly and if has not it attempts to "recover" by calling OnSuspend (assuming that OnResume and Start will be called shortly). However the system really has not been shutdown and so there is nothing to recover from. The problem is that OnSuspend cancels the PowerScheduler timer that runs every 30s to check to see if the system should be suspended. So if this is not running then it will not suspend after the program has finished recording and the system is idle.

    I'm not 100% what the recovery code was fixing, so my take on a fix for the above may not be correct. But perhaps it would be better to move the code currently in OnWakeupTimer and place it in the window proc just before the code that currently handles the resume messages. That way if the system resumes without having shutdown correctly then the OnSuspend code would be executed thus allowing the OnResume/Start code to run correctly.

    Hope this all makes sense....



    Andy
     

    gloomyandy

    MP Donator
  • Premium Supporter
  • September 15, 2006
    424
    14
    63
    Home Country
    United Kingdom United Kingdom
    Hi Bavarian,
    Thanks! Let me know if you need anything....

    Andy
     

    Bavarian

    Retired Team Member
  • Premium Supporter
  • April 4, 2005
    698
    167
    Germany, Bayern
    Home Country
    Germany Germany
    The resum from critical ShutDowns where disabled in the SVN. Have to think about a other procedure for that.


    Bavarian
     

    gloomyandy

    MP Donator
  • Premium Supporter
  • September 15, 2006
    424
    14
    63
    Home Country
    United Kingdom United Kingdom
    Hi Bavarian,
    If it would help you and you have the time, then let me know what the problem was that you have been trying to fix (with the code in OnWakeupTmer), and I'd be happy to try and help......

    Andy
     

    Aquarius

    MP Donator
  • Premium Supporter
  • November 23, 2004
    347
    7
    NRW
    Home Country
    Germany Germany
    Same problem here.
    PS does not notice that main screen is entered again. The log entry "... entering main screen ... " is missing.

    Regards
    /Gerd
     

    MediaTobiPortal

    Portal Pro
    December 13, 2004
    206
    6
    123
    My problems with powerscheduler:


    1. PowerScheduler is shutting down while the TV Service is recording.


    In MP log are entries "is any card recording? - false" but that´s wrong. I have a reording card.
    MPFileWriter.log:
    22-01-2007 18:55:07 Start Recording:'E:\Aufnahmen\Analog\Knight Rider-Das Vierte\Knight Rider-2007-01-22.mpg
    (the show starts at 19:05 and ends at 20:15, I have 10min pre and 15min post recording time)


    MediaPortl.log:
    2007-01-22 20:06:54.625000 [Info.][MPMain]: -- OnTimerCall --
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - Recorder.IsAnyCardRecording() = False
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - Recorder.IsRadio() = False
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - g_Player.Playing = False
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - Database Update = False
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - ShutDown Time = 22.01.2007 20:09:05
    2007-01-22 20:06:54.625000 [Info.][MPMain]: - WakeUp Time = 31.12.9999 23:59:59
    2007-01-22 20:06:54.625000 [Info.][MPMain]: PowerScheduler.SetWakeUpTime: Plugin: PowerScheduler, Time: 31.12.9999 23:57:59
    2007-01-22 20:06:54.625000 [Info.][MPMain]: PowerScheduler.SetWakeUpTime: WakeUp Timer deactivated (no valid Time found)


    2. PowerScheduler doesn´t wake up system


    Thanks Tobi (living in Bavaria!!)
     

    Bavarian

    Retired Team Member
  • Premium Supporter
  • April 4, 2005
    698
    167
    Germany, Bayern
    Home Country
    Germany Germany
    Are you Guys using the new TV-server?
    If Yes, then powerscheduler will not work, there is an update in progress for that.

    Bavarian
     

    MediaTobiPortal

    Portal Pro
    December 13, 2004
    206
    6
    123
    OK, so PowerScheduler doesn´t work right now with the TV-Server, I understand....
    When can we expect the mentioned update ?
     

    Users who are viewing this thread

    Top Bottom