Odd Standby issue (1 Viewer)

joecrow

Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    Generally standby is working well on My Mp 1.32 x64 pre set up. I just have one issue, which was also present on earlier x86 versions, when a recording is in progress and I press the power button on the remote the PC goes into away mode as expected (AVR and TV go into standby) and the PC continues to run making the recording however even after the recording has completed and the Windows idle timeout setting of 45 mins has been exceeded the PC remains running and never goes into standby, it will still be running next day but pressing the standby button on my remote at this point puts it straight to sleep, I have never been able to identify anything that is preventing sleep in powercfg. No problem if I schedule a recording for later and then put it to sleep, it will wake up, make the recording and go back into full standby and outside of recordings it goes to sleep and wakes up as expected on the command of the remote.
    I have a Pulse 8 CEC dongle installed on the HDMI and use the CEC Remote plugin to put the my AVR and TV (the only display) into standby in conjunction with the MP HTPC. In windows I use the "High Performance" power plan with "Turn off Display" set to never and "Put Computer to Sleep" set for 45 minutes, I use the MP1 screensaver set for 5 minutes.
    Any ideas on what I can do to fix this would be very welcome.
     
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,893
    1,815
    Southampton
    Home Country
    United Kingdom United Kingdom
    even after the recording has completed and the Windows idle timeout setting of 45 mins has been exceeded the PC remains running and never goes into standby
    My initial guess would be that it has something to do with networking. To determine if this is the case:
    • When you press the POWER button on the remote to sleep the system, unplug the network cable.
    • When you wake the system, replug the network cable.
    Try this for several days to see if it makes a difference.

    Unplugging and replugging the network cable may not be particularly easy if access to the rear of the HTPC is restricted, so instead you could use the BAT files that I show below. You could create shortcuts for them on the desktop, but you would need to remember to run the "netstop" shortcut before sleeping your system, and run the "netstart" shortcut after your system has woken:

    netstop.bat
    Code:
    :******************************************************************************
    :* Notes:
    :* 1.  This BAT file must be run with administrator privileges.
    :* 2.  Use "netquery.bat" to determine the interface name to specify.
    :******************************************************************************
    @echo off
    netsh.exe interface set interface "Local Area Connection 2" disabled

    netstart.bat
    Code:
    :******************************************************************************
    :* Notes:
    :* 1.  This BAT file must be run with administrator privileges.
    :* 2.  Use "netquery.bat" to determine the interface name to specify.
    :******************************************************************************
    @echo off
    netsh.exe interface set interface "Local Area Connection 2" enabled

    netquery.bat
    Code:
    :******************************************************************************
    :* Notes:
    :* 1.  Use this BAT file to determine the network interface names.
    :******************************************************************************
    @echo off
    netsh.exe interface show interface

    If these do solve the problem, I think that you could use PowerScheduler in advanced mode to run them automatically, although I actually use Windows Task Scheduler to run them at the appropriate times.

    If these do not solve the problem, then we know that it is something specific to your HTPC.

    -- from CyberSimian in the UK
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    My initial guess would be that it has something to do with networking. To determine if this is the case:
    • When you press the POWER button on the remote to sleep the system, unplug the network cable.
    • When you wake the system, replug the network cable.
    Try this for several days to see if it makes a difference
    Good idea thanks for that, no problem unplugging the network cable as it comes out to a Powerline adaptor. I'll give it a try and post the results.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    I set up a test recording last night, disconnected the LAN cable and put the HTPC in standby but the PC was still running this morning.:(
    Without doing anything else I woke up the TV and confirmed it was in away mode (no video signal) then pressed a key on the remote and video (MP home screen) was displayed, the recording had completed and running powercfg /requests showed "none" for everything, I then closed MP and set the "Put Computer to Sleep" in control panel power options to 2 minutes, 10 minutes later it was still awake. Putting the PC to sleep with the remote power button worked fine at this point, I then tried setting the "Turn off Display" to 1 minute just to see if the timer was working and sure enough the video was turned off after 1 minute AND 1 minute after that the PC went to sleep!:eek::confused:
    I again tried with "Turn off Display" set to never but it seems the "Put Computer to Sleep" timeout does not happen in this mode. Not sure if this is an error on my setup or an issue with windows. It would be very interesting to know if anyone could do a quick check, from desktop with nothing running just set "Turn off Display" to never and "Put Computer to Sleep" to 1 minute and wait and see what happens.
    I have set up a live test again with a recording but this time with the LAN connected and the "Turn off Display" set to 30 mins and the "Put Computer to Sleep" back at 45 minutes. I'll let you know.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,943
    2,022
    South of France
    Home Country
    France France
    Hello,
    Please, try this :

    zz1.png
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    Not sure if this is an error on my setup or an issue with windows. It would be very interesting to know if anyone could do a quick check, from desktop with nothing running just set "Turn off Display" to never and "Put Computer to Sleep" to 1 minute and wait and see what happens.
    To answer my own question I tested this out on a different Win 11 PC and can confirm that the"Put Computer to Sleep" timeout is not actioned until the "Turn off Display" timeout is complete. For example if the "Turn off Display" is set to 2 mins and the "Put Computer to Sleep" is set to 1 minute then it will be 3 minutes before the PC sleeps so if "Turn off Display" is set to never the PC will never sleep regardless of the other setting!o_O
    None the less despite changing these settings for a recording test as per my earlier post the PC still did not go to sleep on completion of the recording and timeouts, I am trying again with the setting enabled suggested by @framug . Till later.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    Hello,
    Please, try this :

    View attachment 212443
    Sadly that did not help either, same problem, recording all finished including buffer time and timeouts but PC remains running, it also had some negative impacts, with PC still running after the test a button press on the remote, which would normally bring it out of Away Mode actually put it to sleep:sleep: a further press woke it up but muted:oops:, so I have deselected it again. I have double checked that without a recording involved and MP running with home screen displayed the PC will go to sleep per the settings when idle!
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,943
    2,022
    South of France
    Home Country
    France France
    I found that sometimes (randomly ?), when recording (and more when record before and after midnight), PC didn't go to sleep.
    I fixed it with the screen above, at least, PC doesn't use power.
    I suspect something like sometimes, Server doesn't give info that recording is/are ended. (I'm not sure but, it can maybe be in C++ part code of Server).
    And, this is increased with MP 1.31 or MP 1.32 (SharpDX ?) because, it also freeze the MP client, sometimes.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,568
    1,916
    Home Country
    Germany Germany
    found that sometimes (randomly ?), when recording (and more when record before and after midnight), PC didn't go to sleep.
    When I schedule a recording for later and put the HTPC to sleep it wakes up and then goes back to sleep on completion without problem 100%. It is only if I put it to sleep while a recording is in progress, (either when I have selected the recording via "Record Current Program" or I think from memory, not tested today, if a program is already recording that was scheduled earlier) and that fails 100% to go to sleep once the recording has completed.:mad:
    I suspect something like sometimes, Server doesn't give info that recording is/are ended. (I'm not sure but, it can maybe be in C++ part code of Server).
    And, this is increased with MP 1.31 or MP 1.32 (SharpDX ?) because, it also freeze the MP client, sometimes.
    Yes, there must be something like that going on but very strange that "powercfg" can't detect it, I have not seen the MP client freeze though.
     
    Last edited:

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,943
    2,022
    South of France
    Home Country
    France France
    When I schedule a recording for later and put the HTPC to sleep it wakes up and then goes back to sleep on completion without problem 100%. It is only if I put it to sleep while a recording is in progress, (either when I have selected the recording via "Record Current Program" or I think from memory, not tested today, if a program is already recording that was scheduled earlier) and that fails 100% to go to sleep.
    Aah, if it's true (it's clearly possible), it's more precise, we're moving forward, THX for that. (y)

    Yes, there must be something like that going on but very strange that "powercfg" can't detect it,
    When it appear, red dot stay displayed and also, duration of recording is 0 (zero), even when recording (I mean .ts file) is compete.
    I have not seen the MP client freeze though.
    Seems like to be more often with latest versions of MP.
    At the moment of wakeup, the client time give the time when PC was shutdown and, I need to kill MP client task.
    When this appear, a new PC sleep is done :eek:, probably because of powerscheduler plugin.
     

    Users who are viewing this thread

    Top Bottom