Auto Return to Sleep after wake up

Page 1 of 2 12 LastLast

  1. Posts : 97
    Windows 7 Professional SP1
       #1

    Auto Return to Sleep after wake up


    Can't say I really dislike much about Win 7 - EXCEPT:

    It will not honor the "Return to Sleep" timeout value that is in the registry - when the Power Plan is set to High Performance. If this plan is in play - and I need the machine to wake for - say - a backup at 2:00am...the machine will wake okay - and then NEVER go back to sleep.

    MS confirms this is - by design. Boo.

    Cheers!

    VP
      My Computer


  2. Posts : 31,238
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #2

    Vocalpoint said:
    Can't say I really dislike much about Win 7 - EXCEPT:

    It will not honor the "Return to Sleep" timeout value that is in the registry - when the Power Plan is set to High Performance. If this plan is in play - and I need the machine to wake for - say - a backup at 2:00am...the machine will wake okay - and then NEVER go back to sleep.

    MS confirms this is - by design. Boo.

    Cheers!

    VP
    Hi VP.

    This particular registry entry is for a particular purpose - to shut-down a wake up instruction that has not been acted upon in a set time period - basically an accidental wakeup preventer.

    If you wish to do what you wish you can have a look at the built in "shutdown" command

    Add a batch or other script to your backup routine to control what you wish to do after completion .

    Full syntax is as follows

    Code:
    C:\Users\Barman58>shutdown -?
    Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]
        [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
    
        No args    Display help. This is the same as typing /?.
        /?         Display help. This is the same as not typing any options.
        /i         Display the graphical user interface (GUI).
                   This must be the first option.
        /l         Log off. This cannot be used with /m or /d options.
        /s         Shutdown the computer.
        /r         Shutdown and restart the computer.
        /g         Shutdown and restart the computer. After the system is
                   rebooted, restart any registered applications.
        /a         Abort a system shutdown.
                   This can only be used during the time-out period.
        /p         Turn off the local computer with no time-out or warning.
                   Can be used with /d and /f options.
        /h         Hibernate the local computer.
                   Can be used with the /f option.
        /e         Document the reason for an unexpected shutdown of a computer.
        /m \\computer Specify the target computer.
        /t xxx     Set the time-out period before shutdown to xxx seconds.
                   The valid range is 0-315360000 (10 years), with a default of 30
                   If the timeout period is greater than 0, the /f parameter is
                   implied.
        /c "comment" Comment on the reason for the restart or shutdown.
                   Maximum of 512 characters allowed.
        /f         Force running applications to close without forewarning users.
                   The /f parameter is implied when a value greater than 0 is
                   specified for the /t parameter.
        /d [p|u:]xx:yy  Provide the reason for the restart or shutdown.
                   p indicates that the restart or shutdown is planned.
                   u indicates that the reason is user defined.
                   If neither p nor u is specified the restart or shutdown is
                   unplanned.
                   xx is the major reason number (positive integer less than 256).
                   yy is the minor reason number (positive integer less than 65536
    
    
    Reasons on this computer:
    (E = Expected U = Unexpected P = planned, C = customer defined)
    Type    Major   Minor   Title
    
     U      0       0       Other (Unplanned)
    E       0       0       Other (Unplanned)
    E P     0       0       Other (Planned)
     U      0       5       Other Failure: System Unresponsive
    E       1       1       Hardware: Maintenance (Unplanned)
    E P     1       1       Hardware: Maintenance (Planned)
    E       1       2       Hardware: Installation (Unplanned)
    E P     1       2       Hardware: Installation (Planned)
    E       2       2       Operating System: Recovery (Planned)
    E P     2       2       Operating System: Recovery (Planned)
      P     2       3       Operating System: Upgrade (Planned)
    E       2       4       Operating System: Reconfiguration (Unplanned)
    E P     2       4       Operating System: Reconfiguration (Planned)
      P     2       16      Operating System: Service pack (Planned)
            2       17      Operating System: Hot fix (Unplanned)
      P     2       17      Operating System: Hot fix (Planned)
            2       18      Operating System: Security fix (Unplanned)
      P     2       18      Operating System: Security fix (Planned)
    E       4       1       Application: Maintenance (Unplanned)
    E P     4       1       Application: Maintenance (Planned)
    E P     4       2       Application: Installation (Planned)
    E       4       5       Application: Unresponsive
    E       4       6       Application: Unstable
     U      5       15      System Failure: Stop error
     U      5       19      Security issue
    E       5       19      Security issue
    E P     5       19      Security issue
    E       5       20      Loss of network connectivity (Unplanned)
     U      6       11      Power Failure: Cord Unplugged
     U      6       12      Power Failure: Environment
      P     7       0       Legacy API shutdown
    
    C:\Users\Barman58>
    Have a play with the -i option if you want a GUI to test options.
      My Computers


  3. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #3

    Barman58 said:
    Hi VP.

    This particular registry entry is for a particular purpose - to shut-down a wake up instruction that has not been acted upon in a set time period - basically an accidental wakeup preventer.

    If you wish to do what you wish you can have a look at the built in "shutdown" command

    Add a batch or other script to your backup routine to control what you wish to do after completion.
    I disagree. According to these very forums (and the tutorials) this particular entry is supposed to put my just woken machine back to sleep - 120 seconds after an "idle" condition has occurred like after a WHS backup has completed - just like it did in Vista.

    However - Microsoft support confirms this does not work at all. I haven't been able to find a single user that could:

    1. Wake a sleeping machine either by tapping the keyboard/shaking the mouse
    2. Or by unattended wakeup (like a backup, Windows Update whatever)
    3. And have the machine return to sleep after 120 seconds of idle timee

    No matter what method of wake-up is done - the machine does not honor or recognize this value - what it does recognize is the "Sleep After" value for the power plan that's in play. If it's "Balanced" (for anyone who has not changed the Power plan) - the machine will sleep after 30 minutes. Over here - the machine will "never" sleep since my machines are set to the High Perf power plan - and the sleep value is Never.

    As far as a "wake-up preventer" mechanism...not a chance. Accidental, act of god or otherwise - all my Windows 7 workstations will stay awake "forever" if it's waken from slumber - whether something is going on - or not.

    In Vista however - this worked like a dream - even with the High Performance Plan in full swing. A wakeup occurs...a task is done...or a task is not done (accidental) and exactly 120 seconds later...night night sweet machine.

    Microsoft Support could not even determine what this value was doing in Windows 7 - after a week of investigating it...they claim what I am seeing - is by design.

    If anyone can actually prove they have a Windows 7 machine that was put to sleep (pressing Sleep on the keyboard or by Start menu), bumped awake (or woke up via scheduled task) and then actually watched the machine go back to sleep after 120 seconds of idle time - I am all ears. But I haven't found one yet - cause they do not exist.

    Since this power saving mechanism is now rendered useless...I just do my backups while the machines are up and then shut them down. Don't even bother with sleep mode anymore....

    Cheers

    VP
      My Computer


  4. Posts : 2,963
    Windows 7 Professional SP1 64-bit
       #4

    Vocalpoint said:

    ...No matter what method of wake-up is done - the machine will only go back to sleep AFTER the idle time has elapsed for the power plan that's in play ("Balanced" for anyone who has not changed the Power plan) in this example - the machine will wait 30 minutes. In my case - the machine will never sleep since my machines are set to the High Perf power plan - and the sleep value is Never....


    Cheers

    VP
    You do realize how easy it is to change the power plan settings right. I use the "balanced" plan, but I change almost every setting. Go to power options in control panel. Click Change plan settings, and the option you want is right there. There are even more options available by clicking Change Advanced Plan Options I'll admit it might look different on a desktop, but you should still be able to change the setting in less than two minutes. I sometimes change a setting for a short time period, then change it back, because it takes about 10 seconds for me to do.
      My Computer


  5. Posts : 2,528
    Windows 10 Pro x64
       #5

    I have a "high performance" machine that wakes up periodically to update media center and run a few scheduled tasks, and it always goes back to sleep within a few minutes of the last task's completions. I believe you when you say your box won't go to sleep, but I am running the same OS code as you and mine does. The only difference between our machines is likely to be drivers...

    For example:
    Code:
    C:\Users\user>powercfg -query
    Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
    ...
      Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20  (Sleep)
        Power Setting GUID: 29f6c1db-86da-48c5-9fdb-f2b67b1f44da  (Sleep after)
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0xffffffff
          Possible Settings increment: 0x00000001
          Possible Settings units: Seconds
        Current AC Power Setting Index: 0x00000000    // <- Sleep after: never
        Current DC Power Setting Index: 0x00000000    // <- Sleep after: never
    Code:
    ----------
    Log Name:      System
    Source:        Microsoft-Windows-Power-Troubleshooter
    Date:          8/5/2010 6:27:57 PM
    Event ID:      1
    Task Category: None
    Level:         Information
    Keywords:      
    User:          LOCAL SERVICE
    Computer:      Carl-PC
    Description:
    The system has resumed from sleep.
    
    Sleep Time: ‎2010‎-‎08‎-‎05T13:21:26.782877800Z
    Wake Time: ‎2010‎-‎08‎-‎05T22:27:47.921200700Z
    
    Wake Source: Timer - Windows will execute '\Microsoft\Windows\Media Center\mcupdate_scheduled' scheduled task that requested waking the computer.
    ----------
    ...A few SCM/7036 and 7040s here for the WMC Scheduler and BITS services, and then...
    Code:
    ----------
    Log Name:      System
    Source:        Microsoft-Windows-Kernel-Power
    Date:          8/5/2010 6:32:19 PM
    Event ID:      42
    Task Category: (64)
    Level:         Information
    Keywords:      (4)
    User:          N/A
    Computer:      Carl-PC
    Description:
    The system is entering sleep.
    
    Sleep Reason: System Idle
    ----------
    It's only by design if YOU wake the machine (or the computer thinks you did). If you wake it via the keyboard, mouse, or power button, technically that's a user wake and the sleep timer is reset. If an application or service did the waking, it SHOULD go back to sleep (as my box does), and not honor anything about the power plan. Only user-initiated events will keep the system awake on High Performance / Sleep after: never, so it'd be interesting if you ran powercfg -lastwake after your machine wakes and won't go back to sleep to see what actually woke the box. Technically, if your box was woken and won't go to sleep, that should be a user event like the mouse, a keyboard, or the power button as the reason.

    There is also a powercfg command (that MS should have had you run) that can determine if anything would keep your box from sleeping as well after a wake event, powercfg -requests.
    Last edited by cluberti; 06 Aug 2010 at 11:00.
      My Computer


  6. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #6

    cluberti said:
    I have a "high performance" machine that wakes up periodically to update media center and run a few scheduled tasks, and it always goes back to sleep within a few minutes of the last task's completions. I believe you when you say your box won't go to sleep, but I am running the same OS code as you and mine does. The only difference between our machines is likely to be drivers...

    It's only by design if YOU wake the machine (or the computer thinks you did). If you wake it via the keyboard, mouse, or power button, technically that's a user wake and the sleep timer is reset. If an application or service did the waking, it SHOULD go back to sleep (as my box does), and not honor anything about the power plan. Only user-initiated events will keep the system awake on High Performance / Sleep after: never, so it'd be interesting if you ran powercfg -lastwake after your machine wakes and won't go back to sleep to see what actually woke the box. Technically, if your box was woken and won't go to sleep, that should be a user event like the mouse, a keyboard, or the power button as the reason.

    There is also a powercfg command (that MS should have had you run) that can determine if anything would keep your box from sleeping as well after a wake event, powercfg -requests.
    AWESOME!

    You are truly the first person I have come across that has shown me the "way" on this. Could you list your hardware specs...I really really want to solve this issue and if there is a way to do it - I am willing to try.

    Does your machine go back to sleep after 120 seconds - post an "unattended" wake-up...like a program guide update or Windows Update?

    If you provide some specs on what you are running - I would really appreciate it.

    Cheers!

    VP
      My Computer


  7. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #7

    cluberti said:
    There is also a powercfg command (that MS should have had you run) that can determine if anything would keep your box from sleeping as well after a wake event, powercfg -requests.
    Now this is bizarre...when I run powercfg -requests...I get:

    SYSTEM:
    [DRIVER] \FileSystem\rdbss
    A file has been opened across the network. File name: [\SERVER\Videos\Top Gun\my movies.xml] Process ID: [2412]
    [DRIVER] \FileSystem\rdbss
    A file has been opened across the network. File name: [\SERVER\Videos\Star Wars\mymovies.xml] Process ID: [2412]
    [DRIVER] \FileSystem\rdbss
    A file has been opened across the network. File name: [\SERVER\Videos\Star Wars\Star Wars._mkv_JRSidecar.xml] Process ID: [2412]

    AWAYMODE:
    None.


    Even more bizarre - because - I have never ever watched Top Gun or Star Wars from this machine. The process ID of 2412 seems to be tied to an instance of Explorer and then something called the Microsoft HomeServer Archive Transfer Service...?!?

    I gotta check this out....I shall return!

    Cheers,

    VP
      My Computer


  8. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #8

    OMG! SOLVED.

    Turns out this frigging service: Windows Media Center TV Archive Transfer Service - has been holding up the parade over here for months!

    After a quick disable of that...I checked powercfg - requests again - and saw an empty screen. Then the big test - I scheduled SyncBackSE to wake the machine and copy a few files to a network share...and then pressed Sleep on the keyboard...

    A minute later...the machine woke...did the task...and then - wait for it - after 120 seconds...back to sleep! Holy crap - I have seriously been battlling this for MONTHS!

    Finally solved. I would like to thank MS Support for being about as far away from a solution as humanly possible....and to cluberti for showing me that all is not as it seems - and especially that -requests command.

    Cheers!

    VP
      My Computer


  9. Posts : 2,528
    Windows 10 Pro x64
       #9

    Vocalpoint said:
    Finally solved. I would like to thank MS Support for being about as far away from a solution as humanly possible....and to cluberti for showing me that all is not as it seems - and especially that -requests command.
    Good to hear, although if you talked to an outsourcer (personal support), most of those folks don't even work for MS, so it's not surprising they have no clue how the product works. Unless you've got hours to use under a premier support contract or are willing to pay $300 for a standard professional incident to talk to a premier support engineer without one, you're going to get someone with a v- or a- alias (aka, contractor) who has little access to Microsoft resources to help you figure it out. If you pay the professional incident fee, or call under a premier agreement, you have access to FTE employees, both frontline and their escalation engineers if things get tricky. Basically, you're getting access to the premier support folks with a professional incident, and the SEs and EEs will have access to source code, the product groups, etc - and most of those folks have many years of working with their products 24/7/365 (rather than the v-/a- outsourcers, who probably had a week or two of training and then were thrown to the wolves).

    Trust me on this, I've got lots of experience with MS support - pay the fee if it's really something you want fixed and the personal support folks aren't giving you any help.
      My Computer


  10. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #10

    cluberti said:
    Good to hear, although if you talked to an outsourcer (personal support), most of those folks don't even work for MS, so it's not surprising they have no clue how the product works.
    That's what I figured...I did get a v- guy on the wire and he was zero help.

    But now that I have one machine working - my other two will not smarten up. I managed to get my workstation going fine...sleep...wake up...sleep.

    But the other two...(oddly with almost identical hardware) even with a clear powercfg -requests readout...continue to stay up after a test backup...

    Gonna need some more trouble shooting here....I have ran powercfg -energy...and I get a variety of errors on each box - but I get the same on my workstation and it's working fine. I am wondering if it's video drivers or some USB device...I get a bunch of warnings about several USB devices that won't entere selective suspend etc...

    Any additional help would be grand...

    Cheers!

    VP
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:13.
Find Us