Media Portal freezes on wake (2 Viewers)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    The server / remote share need to be implemented into each plugins too it think :)
    Recently, when i have merge the branch to own branch for testing, i notice that one line code about focus was commented out on master.
    Maybe we can try to enable it again, it seems that on my side the focus is always ok and i have this line enable :)
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    The server / remote share need to be implemented into each plugins too it think
    Possibly. However, regarding the FH error I don't really understand it. It occured in the night as part of the automated client backup process, which is initiated by the server. Hence at the moment the client woke up, the server was for sure running and its shares available. Actually I have never seen this error dialogue in all these years that I am using the FH.o_O I upgraded the client to Win 10 1511 yesterday - who knows what kind of network issues this might have brought.

    Maybe we can try to enable it again, it seems that on my side the focus is always ok and i have this line enable
    Could you upload a link for testing your version then?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    @HTPCSourcer
    I think your log files are generally better insomuchas there seem to be less exceptions. However, there are still some exceptions from MP-TVSeries, and some really strange sequences of power events, especially in relation to the resume for backup.
    Here's a listing of the event sequence with a few comments from me...
    [collapse][2015-11-18 22:03:00,518] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:03:00,518] [Log ] [MPMain ] [INFO ] - Main: The display is on
    [2015-11-18 22:03:00,549] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:03:00,549] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session
    [2015-11-18 22:03:39,291] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:03:39,291] [Log ] [MPMain ] [INFO ] - Main: The user activity timeout has elapsed with no interaction from the user
    [2015-11-18 22:03:39,322] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:03:39,322] [Log ] [MPMain ] [INFO ] - Main: The display is off
    [2015-11-18 22:03:39,338] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)

    MM: Okay up to here, but it seems strange that the system is resuming again (below) after only 3 minutes. Technically the PBT_APMRESUMESUSPEND and PBT_APMRESUMEAUTOMATIC messages below are in the wrong order, but I think this is minor and can be overlooked.

    [2015-11-18 22:06:32,203] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:06:32,419] [Log ] [MPMain ] [INFO ] - Main: The display is on
    [2015-11-18 22:06:32,187] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:06:32,457] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session
    [2015-11-18 22:06:31,243] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMESUSPEND)
    [2015-11-18 22:06:31,226] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)
    [2015-11-18 22:09:14,214] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:09:14,214] [Log ] [MPMain ] [INFO ] - Main: The user activity timeout has elapsed with no interaction from the user
    [2015-11-18 22:09:14,229] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-18 22:09:14,229] [Log ] [MPMain ] [INFO ] - Main: The display is off
    [2015-11-18 22:09:14,377] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)

    MM: I assume this next resume/suspend cycle is for the backup.

    [2015-11-19 03:29:41,090] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)
    [2015-11-19 03:32:24,384] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)

    MM: I don't understand what this next resume cycle is about. It seems especially strange that Windows is reporting that you triggered the resume (AKA user present). Aren't you asleep at 3:32 AM??? :confused:

    [2015-11-19 03:32:38,096] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 03:32:38,112] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session
    [2015-11-19 03:32:38,135] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 03:32:38,135] [Log ] [MPMain ] [INFO ] - Main: The display is on
    [2015-11-19 03:32:38,081] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)
    [2015-11-19 03:32:35,057] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMESUSPEND)
    [2015-11-19 03:32:44,321] [Log ] [MPMain ] [INFO ] - Main: Resuming operation of user interface
    [2015-11-19 03:35:21,708] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 03:35:21,723] [Log ] [MPMain ] [INFO ] - Main: The user activity timeout has elapsed with no interaction from the user
    [2015-11-19 03:35:21,723] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 03:35:21,723] [Log ] [MPMain ] [INFO ] - Main: The display is off
    [2015-11-19 03:35:21,739] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)

    MM: After the sequence above, MP thinks the PC is asleep again. If that is the case, the events below make absolutely no sense. It is like the PC is suspending again when it is already suspended (!!!). :confused:

    [2015-11-19 04:04:55,796] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 04:04:55,819] [Log ] [MPMain ] [INFO ] - Main: The user activity timeout has elapsed with no interaction from the user
    [2015-11-19 04:05:00,811] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 04:05:00,826] [Log ] [MPMain ] [INFO ] - Main: The display is off
    [2015-11-19 04:30:11,746] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)

    MM: Now we have you waking the PC in the morning as expected. Again, the PBT_APMRESUMESUSPEND and PBT_APMRESUMEAUTOMATIC messages below are in the wrong order but I'm ignoring that.

    [2015-11-19 07:05:12,850] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 07:05:12,887] [Log ] [MPMain ] [INFO ] - Main: The display is on
    [2015-11-19 07:05:12,850] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE)
    [2015-11-19 07:05:12,949] [Log ] [MPMain ] [INFO ] - Main: User is providing input to the session
    [2015-11-19 07:04:58,667] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMESUSPEND)
    [2015-11-19 07:04:58,649] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)

    MM: ...but what on earth is this?!? Another set of resume notifications... but look at the timestamp (!!!). Yes, the MP log really includes entries from 4 AM after entries from 7 AM. I don't understand how this is possible.

    [2015-11-19 04:01:56,390] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMESUSPEND)
    [2015-11-19 04:01:56,390] [Log ] [MPMain ] [INFO ] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)
    [/collapse]

    I don't know how to explain the strange stuff above, or what to suggest that might solve it. Perhaps you could try to disable MP-TVSeries before suspend and enable it after resume to see if it helps.

    About the focus thing...
    MP seems to have lost focus for the last time here:
    [2015-11-18 22:06:32,403] [Log ] [MPMain ] [DEBUG] - D3D: OnLostFocus()

    It looks like you are logging out the user account on suspend. If I'm right, I guess that could be the cause of the situation. I don't think Windows can be expected to focus MP automatically when you log in again.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    With respect to the datbasases being remote, the ideal solution would be to have MP wait until the server / remote share is accessible.
    Are you able to give a short explanation about why you have configured remote databases?
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    Hi mm,

    Comments to your comments:
    • Resume at 22:06 after suspend at 22:03: I am not entirely certain, but it could simply be that I set the wireless keyboard aside, which might have triggered a resume. I then sent it manually back into standby
    • Lost focus at 22:06:
      • Looks like the time when I did manual standby (from the MP homescreen menu).
      • The standby properties of this machine sem a little bit messed up after all the latest Windows upgrades and updates. Currently it won't standby on its own, hence I am using manual standby from the MP menu.
    • Resume at 03:32
      • Be assured, I was sleeping :D
      • Technically the wake-up process is handled by the Server 2012 system. I would assume that a WOL (Magic Package) is sent but don't know for sure how Microsoft is doing things within the domain. In any case there is no manual interaction
    • System suspending after being suspended
      • This is most likely the (in)famouos Intel deep sleep state
      • Indeed, one can see/hear that sometimes after manual S3, the system powers up, fans are turning and then it is off again.
      • Probably subject to power settings either in Windows and/or in BIOS.
      • N.B.: From previous experience I can say that resume works flawlessly with all MP versions, if performed prior to this 2nd suspend
    • Logging out user
      • Well, I don't do anything - the system does.
      • Maybe a property of a domain member?
    All in all, I can surely run these tests in Watchdog debug mode without plugins to supress some of these error messages.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    Are you able to give a short explanation about why you have configured remote databases?
    Remote databases add a lot of maintenance comfort across a multitude of clients, particularly in terms of sharing TVSeries, Movie and other information rather than multiplying already existing data. In practice it does not seem to cause any issues other than on this particular client.

    From a disaster recovery standpoint, what is missing in MP is a logic that verifies the existence and/or accessibility of paths as defined in the respective mediaportaldirs.xml. I could imagine a polling process in say 5 sec intervals until the remote shares are accessible. MP should not launch plugins or its own databases before said paths are online.

    In essence, the limitations in MP1 for multi-client environments are the reason why I am now closely looking into MP2 (however, a couple of things are not working to my requirements yet, therefore I have not switched).
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    The server / remote share need to be implemented into each plugins too it think
    Possibly. However, regarding the FH error I don't really understand it. It occured in the night as part of the automated client backup process, which is initiated by the server. Hence at the moment the client woke up, the server was for sure running and its shares available. Actually I have never seen this error dialogue in all these years that I am using the FH.o_O I upgraded the client to Win 10 1511 yesterday - who knows what kind of network issues this might have brought.

    Maybe we can try to enable it again, it seems that on my side the focus is always ok and i have this line enable
    Could you upload a link for testing your version then?

    Here :) http://tinyurl.com/pzhdwmq

    Based on latest Master code from this night.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    Remote databases add a lot of maintenance comfort across a multitude of clients, particularly in terms of sharing TVSeries, Movie and other information rather than multiplying already existing data. In practice it does not seem to cause any issues other than on this particular client.
    Okay. I'm sure you know MP1's original design assumes local non-shared databases. While you may not experience [many] problems in practise, in theory there exists real potential for problems to occur at any time if multiple clients attempt to access (write) to an SQLite DB simultaneously.

    From a disaster recovery standpoint...
    If you want to use remote databases then that's a calculated risk you choose to take (and I certainly understand why you would want to take that risk). IMHO the limitations of the design have already been pushed too far, and I definitely don't think more code should be added to MP to support such a setup when it's inherrently unreliable. MP2 is designed from the ground up to meet your needs so that is obviously the way forward. Hopefully it will be ready for you sooner rather than later. In the meantime, I can only support you within the limitations of MP1.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,336
    Home Country
    Germany Germany
    Here :) http://tinyurl.com/pzhdwmq

    Based on latest Master code from this night.
    I'll install it tonight and test it. There should be a similar set of logs (with the same weird things) as this night tomorrow at this place.

    @mm1352000 ,
    I entirely agree on what you said about remote databases. I am deliberately taking a calculated risk, which is small though, since other clients are only watching TV while data maintenance is (at least in theory) only done from one single PC.

    I forgot to comment about the other enigma in the MP log: How is it possible that MP logs 4am entries after having already added 7am information??? :unsure: I can suspend the automatic backup process for some time to minimize the number of events. (Although this has saved my butt a couple of times in the past. I absolutely love the daily backup and run Server 2012 mainly for this reason. With three desktop PCs, three HTPCs and four laptops in the household there is frequent need to restore files and occasional requirement for complete disaster recovery;)).
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    Home Country
    New Zealand New Zealand
    @HTPCSourcer
    Regarding the logs and comments...
    Thanks for the clarifications. :)
    For now I don't think there's any need to suspend the backup. From a support/debugging perspective it's easiest (though also slowest :( ) when changes are restricted to one at a time. As previously mentioned: given the exceptions in the latest logs, my recommendation would be to try to exclude MP-TVSeries from the process and see what happens. In the meantime I'm going to see if I can find any technical information/documentation about the Intel deep sleep state that you mentioned (which I'm currently not familiar with).
     

    Users who are viewing this thread

    Top Bottom