PowerScheduler client and mouse inactivity (1 Viewer)

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    United Kingdom United Kingdom
    Sure that playback was not running? (i.e. the user input log was triggered by mouse/keyboard moves)
    Yep, closed MP at 1935, checked in taskmanager not running, also then left untouched for 15 minutes after stay awake test and standby was achieved ok, so it looks like powerscheduler is fine with XP.

    I am running Vista as administrator account only, no user and UAC disabled.

    Possibly looking in the wrong place for keyboard\mouse being active. :confused:

    Be aware, i am using a mce remote keyboard (ehome driver) and a Logitech wireless mouse, althought this should not make a difference, if you need me to use a standard keyboard will do.

    Cheers
     

    dero

    Retired Team Member
  • Premium Supporter
  • January 16, 2007
    75
    1
    Germany Germany
    Yes, please, use a standard keyboard to check if input is recognized on that.

    Alas (or thanks good ;)), I have no Vista, so I can't debug the code on Vista...

    Regards

    dero
     

    Shoey Peachew

    Portal Member
    June 8, 2006
    20
    1
    @ Shoey Peachew:

    Please restart TV3, MP, play around with your mouse for 5 minutes and then post the logs.

    Please post TV3 and MP logs, and post your PS-settings for both TV3 and MP.


    I have Windows power settings set to diasble.

    - TV Server Power scheduler: Set to suspend . Shutdown server after 20mins is checked as is wakeup server. Enable forced extensive logging is checked. EPG set to grab data every Sun and Thur at 6:02am. Processes preventing standby are SetupTv, Configuration.

    - PowerSchedule client plugin: Only allow standy when in home window. Enable extensive logging checked. Shutdown mode suspend. Shutdown after 20mins. Pre wakeup = 30secs. Pre-no-shutdown time = 120secs.

    After setting everything I rebooted and ran the Test tool and played with my mouse for 5mins in MP and posted the logs.
     

    dero

    Retired Team Member
  • Premium Supporter
  • January 16, 2007
    75
    1
    Germany Germany
    As I said, we need someone with Vista to step thru the code...

    Regards

    dero
     

    dero

    Retired Team Member
  • Premium Supporter
  • January 16, 2007
    75
    1
    Germany Germany
    @ wortel:

    It's part of the PowerSchedulerPlugin in TV3-Engine.

    But, you can just try the little snipplet I posted above, which I extracted from the code.

    Regards

    dero
     

    wortelsoft

    Portal Pro
    May 13, 2005
    374
    1
    44
    Rotterdam, The Netherlands
    Netherlands Netherlands
    As that's why dont' have the TV3-engine.

    I couldn't get the code snipped to run. I tried to add the code to a forms application and the to run it trough a button click, but got all kind of errors. I also used express editon 2008 maybe should use 2005 edition.
     

    justinteract

    Member
    November 8, 2007
    95
    13
    Hamburg
    Germany Germany
    Hi dero,

    I tested your snipped code as a simple consol app under Visual 2008 under Vista 32bit Ultimate and it works fine.
    The console app calls your GetLastInputTime() method and prints out the DateTime every second.
    I have tested it with an USB cable mouse, a logitech wireless mouse and a logitech wireless keyboard.
    All variants work fine and the time prited out is always correct.

    This code is not the problem.

    [EDIT]
    In the logs of my TVServer installation I never saw the mentioned line of "User input detected at ".
    How often is that suppose to be written to the log and to which file, to "tv.log" or is there a separate log file where the extensive logging goes ? ... ok I saw in the source code that its using Log.Debug...
    [/EDIT]
    meanwhile I got the extensive logging... dont know why I didnt see it in the first place.
    Now I see the "User input detected.." lines every 25 seconds.. BUT only if the PS ClientPlugin is enabled and the media portal client is running. Looking at a "future" multiseat scenario this makes sense, that the human interaction with the client counts for preventing the server machine going to sleep. However in a single seat setup if MP client is not running "the machine" which is only one, goes to sleep after that time independend of the user interaction.


    BTW how do I set the TVServer log level.


    To me its not clear yet how this PowerScheduler is working. It is my understanding that the it is the server that wakes up and goes to suspend, right. This is done via the PS plugin in the TVServer that sets the next timer event when the server goes to standby. Why do I need a client plugin. I assume only to let the server PS plugin know that MP in on the home page and nobody is actively using it, but if that is the case what are the "duplicated" settings "Shutdown mode", "pre-wakeup time" and "pre no shutdown time" in the client plugin for ?

    Also... As soon as I check "Wakeup server for various events" my machine somtimes wakes up every minute, meaning when you put it to sleep it wakes up one minute later. In the log it says

    Code:
    2008-02-26 19:13:53.870000 [7]: OnPowerEvent: PowerStatus: Suspend
    2008-02-26 19:13:53.871000 [7]: PowerScheduler: System is going to standby
    2008-02-26 19:13:53.872000 [7]: Controller: epg stop
    2008-02-26 19:13:53.873000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:GenericWakeupHandler       time:31.12.9999 23:59:59
    2008-02-26 19:13:54.774000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:ScheduledRecordingsHandler time:26.02.2008 22:29:00
    2008-02-26 19:13:55.888000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:PowerSchedulerClientPlugin time:27.02.2008 00:00:00
    2008-02-26 19:13:55.895000 [7]: PowerScheduler.DisAllowShutdown: handler PowerSchedulerClientPlugin wants to prevent standby
    2008-02-26 19:13:55.896000 [7]: PowerScheduler: Set wakeup timer to wakeup system in 1 minutes
    For whatever reason the PS plugin thinks the server needs to be woken up again in minute.
    This does not happen all the time. May be only if there is no scheduled recording in the near future .. i have to further investigate on this


    [EDIT]
    from looking at the code, I can see that if one handler prevents the shutdown (DisAllowShutdown returns true), then it does exactly this... it goes to sleep for one minute and then wakes up again.
    My question is, why does the ClientPlugin would disallow the shutdown
    Also I now see
    Code:
    PowerScheduler.NextWakeupTime: inspecting handler:PowerSchedulerClientPlugin time:28.02.2008 00:00:00
    ..where is this wakup event coming from... its not a scheduled recording.
    I guess the question is what are the "various" makeup events ?
    [/EDIT]


    Cheers
    justinteractive
     

    dero

    Retired Team Member
  • Premium Supporter
  • January 16, 2007
    75
    1
    Germany Germany
    I tested your snipped code as a simple consol app under Visual 2008 under Vista 32bit Ultimate and it works fine.
    The console app calls your GetLastInputTime() method and prints out the DateTime every second.
    I have tested it with an USB cable mouse, a logitech wireless mouse and a logitech wireless keyboard.
    All variants work fine and the time prited out is always correct.
    TV3 is running as a service. It could be that Vista isolates input from services?? Meaning that GetLastInputTime does not work reliable from within a service.

    Can you create a service that logs the result of the function and then play around?

    justinteract said:
    BTW how do I set the TVServer log level.
    Somewhere in the TVServerSetup.

    justinteract said:
    To me its not clear yet how this PowerScheduler is working. It is my understanding that the it is the server that wakes up and goes to suspend, right. This is done via the PS plugin in the TVServer that sets the next timer event when the server goes to standby. Why do I need a client plugin. I assume only to let the server PS plugin know that MP in on the home page and nobody is actively using it,
    Exactly. It informs the TVS of MP activity.


    justinteract said:
    but if that is the case what are the "duplicated" settings "Shutdown mode", "pre-wakeup time" and "pre no shutdown time" in the client plugin for ?
    For multiseat.

    justinteract said:
    Also... As soon as I check "Wakeup server for various events" my machine somtimes wakes up every minute, meaning when you put it to sleep it wakes up one minute later. In the log it says
    <snip>
    Something wants to prevent standby. On XP, you're system would not be allowed to go to standby. However, Vista does not allow TVS to prevent standby when user is doing it manually.

    TVS has the builit-in logic to wakeup the PC within one minute in such a case.


    from looking at the code, I can see that if one handler prevents the shutdown (DisAllowShutdown returns true), then it does exactly this... it goes to sleep for one minute and then wakes up again.
    My question is, why does the ClientPlugin would disallow the shutdown
    Also I now see
    Code:
    PowerScheduler.NextWakeupTime: inspecting handler:PowerSchedulerClientPlugin time:28.02.2008 00:00:00
    ..where is this wakup event coming from... its not a scheduled recording.
    I guess the question is what are the "various" makeup events ?
    PowerSchedulerClientPlugin is responsible for gatherng events from MP. I think we had a bug in the MusicDBReorganizer making kind of what you tell me happen. Since MusicDBReorg is scheduled to work every time, but didn't for some reason, it's always due, preventing ClientPlugin to allow standby.

    Dero
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    bta489 [solved] System goes to Standby during Amazon Prime Playback OnlineVideos 2
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    D Media Portal wake schedule General Support 29
    P Blocking TV recordings on client? General 3
    -Merkur- MP2 Client startet nicht, "libXBMC_addon.dll" fehlt Allgemeines Support- und Diskussionsforum 1
    C Current NUC or Intel Stick as an MP client for HD playback - minimum requirements? General 6
    CanadianEh MP TV server rebuild with Colossus 2 - Kodi clients receive PMT error when playing videos recoreded by Colossus 2 TV-Server 1
    O [Question] Advice Wanted on Developing a Client Application for a Disabled Family Member MPExtended 7
    ge2301 [WiP] MP2Web - A platform independent web client for MP2 MediaPortal 2 68
    M [solved] WTV Files does not play on client, MPEG files works well General 1
    ge2301 Android based client for MP2 MediaPortal 2 3
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    P [solved] MP2 new install, 2 x hdhomerun tuners, client on same PC unable to view TV & recordings Newcomers Forum 8
    J Where the heck is the Client side setup? General 2
    T Server / client channel logo location Installation, configuration support 6
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    Golf4 Client verliert immer wieder die Verbindung Allgemeines Support- und Diskussionsforum 4
    A Synchronizing client databases MediaPortal 1 Talk 10
    P Streaming to two clients from the same card Newcomers Forum 1
    TLD Can not watch tv from remote clients Television (MyTV frontend and TV-Server) 19
    R [further infos missing] some movies freezing evry seconds Submit: Bug Reports 9
    R [solved] MP2 Client ist extrem langsam Allgemeines Support- und Diskussionsforum 5
    Similar threads

























    Top Bottom