MP hangs when scheduled recording starts. (1 Viewer)

joecrow

Test Group
  • Team MediaPortal
  • August 9, 2012
    2,550
    1,902
    Home Country
    Germany Germany
    If I schedule a recording then put the HTPC to sleep it will wake up on schedule and start the recording with MP displayed but in a hung state. The recording will complete but MP remains hung and has to be closed using the Task Manager which indicates it is continuously using aprox. 25% CPU. This problem does not occur if the recording starts before the HTPC is put in standby. I originally reported this and another problem to the CEC Remote thread, the other problem was resolved with an update to the plugin but this one could not be reproduced and with further troubleshooting I was able to confirm that the problem occured with the plugin disabled. Please help me identify what I can do to correct this problem.

    The attached log was made via the Watchdog Report a Bug mode with the following time points:-

    12:34 Start MP
    12:35 Schedule a recording at 12:45 and put HTPC to sleep.
    12:37 Wake HTPC, test to confirm MP is still responsive, all OK. put HTPC to sleep
    12:4x HTPC wakes and recording starts, MP is displayed but is unresponsive to remote/mouse and KB and I close it via Task Manager. Watchdog collects logs!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,550
    1,902
    Home Country
    Germany Germany
    Hmmm, well it does seem to have fixed the frozen/hanging problem but it also has adverse effects as follows:-
    To get the CEC Remote plugin to wake the AVR/TV in normal circumstances I now have to uncheck the "Require user input before waking devices (when resumming from sleep)" this was not the case with 1.13. Also now when the HTPC wakes up to make a recording the AVR/TV wake up as well. It looks like the HTPC is now fully restarting with MP rather than resumming in Away mode which would be desirable for a potentially unattended recording.:unsure: If I subsequently return to sleep it does go into Away mode.

    P.S. The red recording in progress indicator at the top of the screen is no longer there.
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    To get the CEC Remote plugin to wake the AVR/TV in normal circumstances I now have to uncheck the "Require user input before waking devices (when resumming from sleep)" this was not the case with 1.13.
    Is this a problem? I've never used the CEC Remote plugin so...

    Also now when the HTPC wakes up to make a recording the AVR/TV wake up as well.
    Surely that is because of the above CEC Remote configuration change that you mentioned?

    It looks like the HTPC is now fully restarting with MP rather than resumming in Away mode which would be desirable for a potentially unattended recording.:unsure:
    The HTPC should be resuming in away mode as before, and then fully waking when you give input.

    If you would like further help, please provide new log files showing what happens now. I think it would be good to have 2 sets of log files showing what happens when the CEC Remote setting is checked/unchecked.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,550
    1,902
    Home Country
    Germany Germany
    Many thanks for your help on this it much appreciated.

    To get the CEC Remote plugin to wake the AVR/TV in normal circumstances I now have to uncheck the "Require user input before waking devices (when resumming from sleep)" this was not the case with 1.13.
    Is this a problem? I've never used the CEC Remote plugin so...

    Also now when the HTPC wakes up to make a recording the AVR/TV wake up as well.
    Surely that is because of the above CEC Remote configuration change that you mentioned?

    Maybe, but that is precisely the problem, with the "Require user input...." checked the AVR/TV will not wake up at all using the usb remote or KB even though the HTPC wakes up. With it unchecked the AVR /TV wake up with the HTPC on command but also when the HTPC resumes from sleep to make a recording, though that could be for other reasons, i.e. not Away mode, see later.

    It looks like the HTPC is now fully restarting with MP rather than resumming in Away mode which would be desirable for a potentially unattended recording.:unsure:
    The HTPC should be resuming in away mode as before, and then fully waking when you give input.
    Yes then I would guess the CEC Remote plugin would not wake the AVR/TV but it does not seem to be resuming in Away mode for me. I can't imagine that the CEC Remote plugin would be suppressing Away mode, perhaps @Tuomaa would clarify?

    If you would like further help, please provide new log files showing what happens now. I think it would be good to have 2 sets of log files showing what happens when the CEC Remote setting is checked/unchecked.

    As requested attached are 2 logs MP1-1 is with the "Require user input.... unchecked, timing and actions as follows:-
    10:20 Start MP, schedule recording for 10:30
    10:21Press power button on remote, HTPC/AVR/TV all go to sleep
    10:22 Press remote button, wake up test HTPC/AVR/TV all resume from sleep, Press power button on remote, HTPC/AVR/TV all go to sleep
    10:26 HTPC wakes up for recording, with AVR/TV following some seconds later
    10:27 MP displayed nav. buttons used on remote to confirm MP is responsive, close MP collect logs

    MP1-2 is with the "Require user input.... checked, timing and actions as follows:-
    11:03 Start MP and schedule a recording for 11:10
    11:04 Press power button on remote, HTPC/AVR/TV all go to sleep
    11;05 Press remote button, wake up test only HTPC resumes from sleep, manually wake up TV, MP is displayed and responsive, return everything to sleep.
    11:06 HTPC wakes up for recording AVR/TV do not, again to check the status I manually wake up the TV, MP is displayed and responsive, i.e. not in Away mode.
    Close MP and collect logs.

    Update 16:19:- Tried with CEC Remote plugin disabled, when HTPC resumes from sleep to make a recording still not in Away mode,MP is displayed and responsive!:confused:
     

    Attachments

    • MP1-1.zip
      487.8 KB
    • MP1-2.zip
      484.6 KB
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Many thanks for your help on this it much appreciated.
    I'm always happy to try to help. :)

    Maybe, but that is precisely the problem...
    MP is not responsible for waking the AVR or TV, so I really think this is a CEC Remote plugin problem. Therefore IMHO you should report it to the CEC Remote plugin developer(s)/maintainer(s).

    ...with the "Require user input...." checked the AVR/TV will not wake up at all using the usb remote or KB even though the HTPC wakes up. With it unchecked the AVR /TV wake up with the HTPC on command but also when the HTPC resumes from sleep to make a recording, though that could be for other reasons, i.e. not Away mode, see later.
    Your description suggests the CEC Remote plugin is not detecting user input correctly.

    When the option is checked, input is not detected => TV and AVR never wake.
    When the option is not checked => TV and AVR are woken regardless of input detection.

    Again, I don't think this is MP's problem. CEC Remote plugin must detect user input correctly in order to wake the TV and AVR according to your preferences.

    Yes then I would guess the CEC Remote plugin would not wake the AVR/TV but it does not seem to be resuming in Away mode for me. I can't imagine that the CEC Remote plugin would be suppressing Away mode, perhaps @Tuomaa would clarify?
    Certainly the log files do not show away mode being used. However I have no evidence that away mode is suppressed. Could it just be your Windows power configuration?

    As requested attached are 2 logs...
    Thank you! (y)

    For MP1-1, everything seems to be almost exactly as you described. I would only describe the 10:26 and 10:27 events slightly differently...

    At 10:26, MP definitely woke without user input:
    [2016-03-13 10:26:03,007] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)

    As a result, the user interface would have been disabled (as you described: "hung state").
    Shortly after, the display was turned on:
    [2016-03-13 10:26:08,070] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    ...
    [2016-03-13 10:26:08,070] [Log ] [MPMain ] [INFO ] - Main: The display is on

    I don't know why this happened. It's out of MP's control. I would have thought the display could be off and the PC could be in away mode since Windows (and MP) knows that the PC was not woken by user interaction. Nevertheless, the MP user interface would still have been intentionally disabled because Windows did not notify of any user interaction.

    As expected (due to your CEC Remote config), CEC remote woke the TV and AVR without waiting for user input:
    [2016-03-13 10:26:10,757] [Log ] [CECResA ] [DEBUG] - CecRemote: Wake Tv ... Done.
    [2016-03-13 10:26:11,289] [Log ] [CECResA ] [DEBUG] - CecRemote: Wake AudioSystem ... Done.

    After ~30 seconds you press a button on the remote. That triggers MP to enable the user interface:
    [2016-03-13 10:26:45,072] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2016-03-13 10:26:45,072] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session
    [2016-03-13 10:26:45,072] [Log ] [MPMain ] [INFO ] - Main: Providing input - Resuming operation of user interface

    Now MP is fully awake and functional.

    In short, this situation seems to be exactly as expected based on the configuration at the time.


    For MP1-2...
    11;05 Press remote button, wake up test only HTPC resumes from sleep, manually wake up TV
    I think this part is one of the problems for you, right?

    In the log I see MP resumes due to user input:
    [2016-03-13 11:05:02,007] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMESUSPEND)

    As if that wasn't enough, Windows also notifies MP of user input:
    [2016-03-13 11:05:07,138] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2016-03-13 11:05:07,153] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session

    I can see that CEC Remote did not wake the TV or AVR, but I don't know why. User input was clearly signalled by Windows. MP got the messages and passed them on to CEC Remote. Therefore I think this behaviour may indicate that CEC Remote has a bug in detection of user input.

    to check the status I manually wake up the TV, MP is displayed and responsive, i.e. not in Away mode.
    As mentioned earlier, I don't see away mode used and I can't explain it. For that, all that I can recommend is to check your Windows power settings.

    ...but how do you confirm that MP is responsive? If you press a key/button or move the mouse, that will activate MP... so in other words, that would be a pointless test. Maybe the only proper way to check if MP is responsive would be to check if the clock/time is updated.

    Update 16:19:- Tried with CEC Remote plugin disabled, when HTPC resumes from sleep to make a recording still not in Away mode,MP is displayed and responsive!:confused:
    Again, AFAIK MP is not responsible for controlling away mode. That's Windows' job. That's why I've recommended to check your Windows power settings.

    Best regards,
    mm
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,550
    1,902
    Home Country
    Germany Germany
    Many thanks again for your work on this. I will ask the CEC Remote folks to take a look again at the problem again.
    Regarding the power settings I use the auto setup in the Power Scheduler with "Recommended Settings" which does check "Allow Away Mode", please let me know if you can suggest any power settings I can proove or change.
    Away mode is certainly working for example if I put it in standby while a recording is in progress, but only if I stop any playback e.g. TV first. Is it possible that in my problem scenario that, although it is Windows that controls Away mode, MP is for example indicating some activity which would turn Away mode off?
    As an interim workarround I have set the idle timeout lower such that if/when the system wakes to make an unatended recording it will idle back to sleep, hopefully, in a relatively short time.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    About away mode...
    I could be wrong about it because I use Windows XP where away mode is not supported. Maybe it's normal for the PC to fully wake (ie. not away mode) for recordings...
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,550
    1,902
    Home Country
    Germany Germany
    About away mode...
    I could be wrong about it because I use Windows XP where away mode is not supported. Maybe it's normal for the PC to fully wake (ie. not away mode) for recordings...

    It was certainly not normal for WMC/Win 7 to wake up fully for a scheduled recording, it definely used Away mode I'm less sure about MP1/Win 7 as I only used it for a short changeover period prior to Win 10. Also as mentioned earlier it does use Away mode if I put it to sleep when a recording is in progress.
    A further update is that when it wakes for a scheduled recording it does not idle (timeout) back to sleep, the Windows screensaver is activated on its timeout but the system continues to stay awake rather like it would if playing Radio from MP!:( The idle to sleep definitely does work either if just the desktop is idle or if MP is open but not doing anything.
    So it does seem to me that the reason for no Away mode on resume from sleep to make a recording is due to some activity within MP rather than an issue with the Windows power settings.
    Something is not right.

    Regards
    Joe
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    It was certainly not normal for WMC/Win 7 to wake up fully for a scheduled recording, it definely used Away mode
    Sure, but MP is not a WMC clone.

    Also as mentioned earlier it does use Away mode if I put it to sleep when a recording is in progress.
    That's a very different scenario.

    A further update is that when it wakes for a scheduled recording it does not idle (timeout) back to sleep, the Windows screensaver is activated on its timeout but the system continues to stay awake rather like it would if playing Radio from MP!
    Have you checked the cause? It could be something as simple as EPG grabbing...

    I does seem to me that the reason for no Away mode on resume from sleep to make a recording is due to some activity within MP rather than an issue with the Windows power settings.
    Something is not right.
    Again, I think you're assuming that normal behaviour is for recordings to be done in away mode. With the greatest respect, that assumption needs to be confirmed before you can say that something is not right.
     

    Users who are viewing this thread

    Top Bottom