"Old" screen after resume from standby (2 Viewers)

gurkc006

Portal Member
July 13, 2009
39
3
Home Country
Germany Germany
Hi together,
one question regarding the resuming from standby. Works like a charm, took my system 10 seconds to resume from standby. But for maybe 5 seconds after the graphics is switched on (appears on my TV) Mediaportal shows the last screen (old time) before entering standby, not responding to any inputs (mouse, keyboard). The clock stands still. After that "delay" the clock jumps to the actual time, running normal and normal operation of Mediaportal is established.
So my actual question: Would it make sense to change the screen of Mediaportal BEFORE entering standby, so that after resuming and waiting for normal operation I see a "please wait"-screen rather than the "old" menue.
I would appreciate such a feature, it confuses my girlfriend, when after resuming the menue SEEMS to be ready, but not responding...
Good night
Christian
 

gurkc006

Portal Member
July 13, 2009
39
3
Home Country
Germany Germany
AW: "Old" screen after resume from standby

Yes, exactly. The only indicator, that MP reinitalized itself after resume is that the clock is running again (I switched on the seconds, so I can actually see, if the time is running again...)
 

gurkc006

Portal Member
July 13, 2009
39
3
Home Country
Germany Germany
AW: "Old" screen after resume from standby

I just had a short look into the SVN source code repository and I found the file
Mediaportal.Application\MediaPortal.cs
and therein the function
private void OnSuspend(ref Message msg)
which is called when windows hibernates or goes into standbye mode...
Maybe after line "SaveLastActiveModule();" something like the following could do the trick:

if (File.Exists(GUIGraphicsContext.Skin + @"\suspend.xml"))
{
Log.Info("Main: OnSuspend - Switch to suspend screen");
GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOWS_SUSPEND);
}

Of course the constant WINDOWS_SUSPEND and the suspend.xml has to be created first.
I haven't compiled MP yet and I'm going to my holidays now, but perhaps someone of you out there has a compiling setup and could try this out? Would be GREAT :)
Christian
 

gurkc006

Portal Member
July 13, 2009
39
3
Home Country
Germany Germany
AW: "Old" screen after resume from standby

I think I found the reason for the delay after resuming from standby. I was wondering that on a Mediaportal-PC from a friend there was no visible delay after resuming. Tho only difference is, that he uses wired LAN compared to my USB-WLAN-adapter. This morning I checked my WLAN connection after resuming and - That's it!
I had my TV switched on and resumed my system from standby, the PC was on within maybe 3 seconds (MP screen visible, clock not running, no reactions to keyboard or remote). WLAN was activated by Windows and after maybe 5 seconds, right after the WLAN gets connected to my FritzBox router the MP screen refreshed and worked normal.
So the "problem" (if cou call 5 seconds waiting a problem) seems to be, that MP waits for setting up the IP connection (wired or WLAN). I will ask the developers in another thread for this problem.
Can anyone confirm this behaviour?
Greeting
C
 

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
Yes, my pc also takes some seconds to connect to the internet.
Nothing to do about, I guess.

Did you test your resume screen examle?, it would be great if it works.
 

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
It seems that the windows power event "PBT_APMRESUMESUSPEND" is causing the delay,
probably caused by a slow network card.

You can see the delay between red marked log lines.
It only happens on my htpc, not on my laptop.

I don't think there is anything to do about (the delay),
but it would be better if mp don't freeze of shows a loading screen.
(I'm sure, a lot more people run into this situation)

htpc:
Code:
[COLOR="red"]2011-09-19 16:24:21.984027 [Info.][MPMain(1)]: Main: WM_POWERBROADCAST: 18[/COLOR]
2011-09-19 16:24:21.985027 [Info.][MPMain(1)]: Main: Windows has resumed from standby or hibernate mode to handle a requested event
2011-09-19 16:24:21.985027 [Debug][MPMain(1)]: Main: OnResumeAutomatic - set lock for syncronous inits
2011-09-19 16:24:21.986027 [Info.][MPMain(1)]: Main: OnResumeAutomatic - Done
[COLOR="red"]2011-09-19 16:24:33.693697 [Info.][MPMain(1)]: Main: WM_POWERBROADCAST: 7[/COLOR]
2011-09-19 16:24:33.694697 [Info.][MPMain(1)]: Main: Windows has resumed from hibernate mode
2011-09-19 16:24:33.696697 [Debug][MPMain(1)]: Main: OnResume - set lock for syncronous inits
2011-09-19 16:24:33.698697 [Info.][MPMain(1)]: Main: OnResume - Trying to wake up the monitor / tv
2011-09-19 16:24:33.698697 [Info.][MPMain(1)]: Main: OnResume - Switch to home screen

laptop:
Code:
[COLOR="red"]2011-09-19 16:46:43.533173 [Info.][MPMain(1)]: Main: WM_POWERBROADCAST: 18[/COLOR]
2011-09-19 16:46:43.534173 [Info.][MPMain(1)]: Main: Windows has resumed from standby or hibernate mode to handle a requested event
2011-09-19 16:46:43.536173 [Debug][MPMain(1)]: Main: OnResumeAutomatic - set lock for syncronous inits
2011-09-19 16:46:43.537173 [Info.][MPMain(1)]: Main: OnResumeAutomatic - Done
[COLOR="Red"]2011-09-19 16:46:43.538173 [Info.][MPMain(1)]: Main: WM_POWERBROADCAST: 7[/COLOR]
2011-09-19 16:46:43.538173 [Info.][MPMain(1)]: Main: Windows has resumed from hibernate mode
2011-09-19 16:46:43.543174 [Debug][MPMain(1)]: Main: OnResume - set lock for syncronous inits
2011-09-19 16:46:43.545174 [Info.][MPMain(1)]: Main: OnResume - Trying to wake up the monitor / tv
2011-09-19 16:46:43.546174 [Info.][MPMain(1)]: Main: OnResume - Switch to home screen
 

Spragleknas

Moderator
  • Team MediaPortal
  • December 21, 2005
    9,471
    1,822
    Located
    Home Country
    Norway Norway
    Please upload all logs if you want a dev or tester to take a look at this.

    Cut n' paste:
    How to start a support or bugreport thread:
    1. Choose a meaningful title for your thread.
    2. Report only one problem per thread.
    3. At the moment you start a new thread in the support forums, the hardwarespecification template will be added automatically. If the template is empty, then you have not filled out your specifications in the usercp yet.
      Note: Your report MUST include a complete hardwarespecification!
    4. Add a detailed, step by step description of your problem.
    5. If your problem occurs inside MediaPortal or the configuration program, then run the "MediaPortal Logs Collector" from your Windows Start Menu (Team MediaPortal/MediaPortal) and ATTACH the exported log.zip file to your thread/post.
      Without logs it is IMPOSSIBLE for us to help you!

      To create clean and conclusive logs you should use the "MediaPortal Debug" shortcut which will start MediaPortal in a special debug mode. Then you reproduce the issue and close MediaPortal. A log.zip will be created automatically which you then attach to your thread/post
      If you are using the TV-Server and it is installed on a different PC, then you have to attach its logs by hand.
      To do that open your Windows StartMenu and click at "TV-Server Logs Folder" in Team MediaPortal/TV-Server.
      Attach all these files to your thread/post.
    6. Do NOT copy/paste your logfiles (or large parts of them) in your post.
    Please note that support threads, which are missing the required information posted above will not be processed and maybe also deleted.
    :D

    --- PLEASE DO NOT COMMENT THIS MESSAGE ---
    Logs and system specs should always be added - just in case
     

    juk

    MP Donator
  • Premium Supporter
  • July 11, 2008
    68
    3
    Wicklow - Ireland
    Hi,
    just to pick up on "gurkc006" point about changing the screen when coming from standby I would find useful, for example if one configures a delay to allow the TV server to wake up, at the moment the MP screen is just sitting unresponsive and doens't show the delay screen you would see when restarting MP, it would be great if it also switched to the delay screen after resume....

    Just a thought if it is possible for the next version?!
     

    Users who are viewing this thread

    Top Bottom