[Rejected] - Fix PowerScheduler plugin for MP2 single seat

Discussion in 'Submit: Code Patches' started by framug, October 13, 2019.

  1. framug

    framug Portal Pro

    Joined:
    January 31, 2005
    Messages:
    4,184
    Likes Received:
    209
    Occupation:
    software engineer
    Location:
    South of France
    Ratings:
    +252 / 2
    Home Country:
    France France
    Hello there,

    I just tested MP 2.2.2 for the first time.
    I don't think I will switch from MP1 to MP2, because of no IRTRANS native remote, etc...
    I have a problem that I call "Impossible to avoid Windows sleep or hibernate with MP2 single seat when client is running".
    Then, I worked to fix that.

    So, if you want to try the dll, take a look at PowerScheduler.rar



    If you need diff :

    Code (Text):
    1.  .../Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs      | 2 +-
    2.  1 file changed, 1 insertion(+), 1 deletion(-)
    3.  
    4. diff --git a/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs b/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs
    5. index cfc8891b25..692bb4b016 100644
    6. --- a/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs
    7. +++ b/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs
    8. @@ -184,7 +184,7 @@ namespace TvEngine.PowerScheduler.Handlers
    9.          {
    10.            string runningProcess = rp.ProcessName;
    11. -          if (string.Equals(runningProcess, "MediaPortal", StringComparison.OrdinalIgnoreCase))
    12. +          if (string.Equals(runningProcess, "MediaPortal", StringComparison.OrdinalIgnoreCase) || string.Equals(runningProcess, "MP2-Client", StringComparison.OrdinalIgnoreCase))
    13.              MPClientRunning = true;
    14.            foreach (string process in _processList)
    15.  
    Normally, it would fix MP2 server plugin with no backwards step for MP1 server.

    Hope it helps...
     

    Attached Files:

    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,746
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    I don't understand your problem. With MP2 the Standby/Hibernate activites are exclusively handled by Windows. If your PC is not entering standby when the client is on, you've misconfigured your PowerScheduler.
     
  4. framug

    framug Portal Pro

    Joined:
    January 31, 2005
    Messages:
    4,184
    Likes Received:
    209
    Occupation:
    software engineer
    Location:
    South of France
    Ratings:
    +252 / 2
    Home Country:
    France France
    I need powerscheduler because, it can force hibernate where windows don't go because of maybe a bad driver (irtrans, others ? Don't know).
    The problem is in the processes tab of powerscheduler setup.
    If you enable "prevent standby when MP client is not runing".
    It works fine with MP1, not with MP2, if for example, I want to do others things (surf Internet...), windows will hibernate where it's not needed.
     
  5. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,746
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    The PowerScheduler is not meant to cure issues of a defective Windows installation. Said option is a pure MP1 functionality and has no meaning in MP2 with its Windows energy handling philosophy and programmatic implementation.

    Then your Windows is not working - not related to MP2, hence no change in code.
     
  6. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,746
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    P.S.: If you get your change included in MP1, it will find its way on its own into MP2.

    Yet many MP2 problem reports are stemming from a misconfigured PowerScheduler. In MP2 it is only needed to wake up the PC for TV schedules (and maybe EPG grabbing in absence of better solutions)- nothing else. Every other activated option is a MP1 legacy and leads to troubles.
     
  7. framug

    framug Portal Pro

    Joined:
    January 31, 2005
    Messages:
    4,184
    Likes Received:
    209
    Occupation:
    software engineer
    Location:
    South of France
    Ratings:
    +252 / 2
    Home Country:
    France France
    Since server is the same for MP1 and MP2, as you want for integrate it in MP1.
    Therefore, my windows installation is not defective and is working.
    I can't do anything if manufacturers give bad windows drivers which can't support the standby/resume windows process.
     
  8. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,746
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    ??? They aren't the same.
     
  9. framug

    framug Portal Pro

    Joined:
    January 31, 2005
    Messages:
    4,184
    Likes Received:
    209
    Occupation:
    software engineer
    Location:
    South of France
    Ratings:
    +252 / 2
    Home Country:
    France France
    Well, if I launch the desktop shortcut for MP2 TV setup, same as MP1 1.23 SetupTV is launched but maybe am I wrong ?
     
  10. HTPCSourcer
    • Team MediaPortal
    • Administrator

    HTPCSourcer MP2 Product Manager

    Joined:
    May 16, 2008
    Messages:
    10,746
    Likes Received:
    1,125
    Gender:
    Male
    Ratings:
    +2,408 / 22
    Home Country:
    Germany Germany
    Show System Specs
    This is simply the setup for the TVE, which is running as a standard plugin in MP2 - not as a Windows process. We might be better off if we provided an adjusted setup tool and cleaned the TVE setup to remove all options that either have no use in MP2 or are even counter-productive such as the Power Scheduler settings.

    Yes ;)
     
    • Disagree Disagree x 1
  11. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,860
    Likes Received:
    2,147
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,619 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    They aren't the same but they are in some way... ;) It's the same configuration tool but the server is not the same...

    Only because you personally don't need the Power Scheduler options they are in no way useless or even counter productive. Aside countless Windows- and hardware issues on standby fixed by Power Scheduler this way you can't adjust Windows power settings as precise and controlled as you can do with Power Scheduler. Only you don't (want to?) understand this. Your statement simply is wrong and I really hope this won't happen as you told. If it really will happen you will make MP2 much less usable (probably not for you but in general), a real nail for the coffin of MP2.
     
    • Thank You! Thank You! x 1
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!