PowerScheduler client and mouse inactivity | Page 3

Discussion in 'Newcomers Forum' started by Shoey Peachew, February 17, 2008.

  1. Paranoid Delusion
    • Premium Supporter

    Paranoid Delusion Moderation Manager

    Joined:
    June 13, 2005
    Messages:
    13,062
    Likes Received:
    1,481
    Gender:
    Male
    Occupation:
    Electrical Engineer
    Location:
    Cheshire
    Ratings:
    +1,482 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. dero
    • Premium Supporter

    dero Retired Team Member

    Joined:
    January 16, 2007
    Messages:
    75
    Likes Received:
    1
    Occupation:
    algorithm engineer
    Ratings:
    +1 / 0
    Home Country:
    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
     
  4. Shoey Peachew

    Shoey Peachew Portal Member

    Joined:
    June 8, 2006
    Messages:
    20
    Likes Received:
    1
    Ratings:
    +1 / 0


    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.
     
  5. Paranoid Delusion
    • Premium Supporter

    Paranoid Delusion Moderation Manager

    Joined:
    June 13, 2005
    Messages:
    13,062
    Likes Received:
    1,481
    Gender:
    Male
    Occupation:
    Electrical Engineer
    Location:
    Cheshire
    Ratings:
    +1,482 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi dero

    USB keyboard makes no difference, still no user input detected.
     
  6. dero
    • Premium Supporter

    dero Retired Team Member

    Joined:
    January 16, 2007
    Messages:
    75
    Likes Received:
    1
    Occupation:
    algorithm engineer
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    As I said, we need someone with Vista to step thru the code...

    Regards

    dero
     
  7. wortelsoft

    wortelsoft Portal Pro

    Joined:
    May 13, 2005
    Messages:
    374
    Likes Received:
    1
    Location:
    Rotterdam, The Netherlands
    Ratings:
    +1 / 0
    Home Country:
    Netherlands Netherlands
    Where can I find the code snipped in the mp code.
    Just installed c# and downloaded svn code but I'm not able to find the code.
     
  8. dero
    • Premium Supporter

    dero Retired Team Member

    Joined:
    January 16, 2007
    Messages:
    75
    Likes Received:
    1
    Occupation:
    algorithm engineer
    Ratings:
    +1 / 0
    Home Country:
    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
     
  9. wortelsoft

    wortelsoft Portal Pro

    Joined:
    May 13, 2005
    Messages:
    374
    Likes Received:
    1
    Location:
    Rotterdam, The Netherlands
    Ratings:
    +1 / 0
    Home Country:
    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.
     
  10. justinteract

    justinteract New Member

    Joined:
    November 8, 2007
    Messages:
    95
    Likes Received:
    13
    Location:
    Hamburg
    Ratings:
    +13 / 0
    Home Country:
    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 (Text):
    1.  
    2. 2008-02-26 19:13:53.870000 [7]: OnPowerEvent: PowerStatus: Suspend
    3. 2008-02-26 19:13:53.871000 [7]: PowerScheduler: System is going to standby
    4. 2008-02-26 19:13:53.872000 [7]: Controller: epg stop
    5. 2008-02-26 19:13:53.873000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:GenericWakeupHandler       time:31.12.9999 23:59:59
    6. 2008-02-26 19:13:54.774000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:ScheduledRecordingsHandler time:26.02.2008 22:29:00
    7. 2008-02-26 19:13:55.888000 [7]: PowerScheduler.NextWakeupTime: inspecting handler:PowerSchedulerClientPlugin time:27.02.2008 00:00:00
    8. 2008-02-26 19:13:55.895000 [7]: PowerScheduler.DisAllowShutdown: handler PowerSchedulerClientPlugin wants to prevent standby
    9. 2008-02-26 19:13:55.896000 [7]: PowerScheduler: Set wakeup timer to wakeup system in 1 minutes
    10.  
    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 (Text):
    1.  
    2. PowerScheduler.NextWakeupTime: inspecting handler:PowerSchedulerClientPlugin time:28.02.2008 00:00:00
    3.  
    ..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
     
  11. dero
    • Premium Supporter

    dero Retired Team Member

    Joined:
    January 16, 2007
    Messages:
    75
    Likes Received:
    1
    Occupation:
    algorithm engineer
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    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?

    Somewhere in the TVServerSetup.

    Exactly. It informs the TVS of MP activity.


    For multiseat.

    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.


    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
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!