System hibernates despite "hibernate after" set to "never"

Page 3 of 5 FirstFirst 12345 LastLast

  1. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #21

    apb said:
    This machine only has s0 for sleep ("modern" sleep) and hibernation.
    Peter,

    S0 Modern standby [aka S0 Low Power Idle] is not a sleep state but a glorified idle condition. Your computer does not sleep.

    Please post your PowerCfg sleep state results. These can be pasted as text in your next post because they are only a few lines long.
    Code:
    PowerCfg -a

    Please would you identify the log, source & event you referred to in
    "The event log shows "The system is entering sleep. Sleep reason: System idle"
    That entry is misleadingly-worded. It actually means sleep/hibernate.
    This should be in
    System log
    source - Kernel-Power
    EventID 42

    If you also look at the wakeup event
    System log
    source - Power troubleshooter
    EventID 1
    then click on the Details tab and check the 3 Hiber* entries you will see numbers greater than 0 which indicates that the low power state that has been resumed from was hibernation [not Sleep - its hiber* entries would all be 0].


    Denis
    Last edited by Try3; 19 Nov 2021 at 05:33.
      My Computer


  2. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #22

    apb said:
    The backup program I am using (Macrium Reflect) claims it prevents sleep while it is running, but that is not working. HOWEVER, in the past it did used to work.
    Peter,

    I'm concerned about your comment that it did work in the past.
    What exactly are the symptoms of it "not working"? You mean hibernating in the middle of making a system image?
    If so, perhaps what is happening is that your S0 Modern standby state is removing power to the disk being used for your Macrium system image.
    Perhaps a Bios update has changed this behaviour. You'd have to look around it to see if there is a relevant override.
    You could check that disk in Device manager, Disk drives for a Power mgmt. tab but I have not seen them for disks.

    Since S0 Modern standby is not a Sleep state & your computer does not Sleep, no special action is required to allow Macrium to avoid Sleep. Applications keep working during S0 Modern standby.

    If you are interested in a workaround that avoids entering S0 or Hibernation while it runs then run this batch file on its own or from the backup batch file you mentioned [In which case run it using the Start command so it runs in its own window & does not hold up your main batch file. Your backup batch file would also need to include a TaskKill command at the end to stop it.]
    It mimics physical use every 20 seconds of the NumLock key twice in succession [twice - so it ends up back in its original state] so your computer happily sits there wide awake and as ready to do your bidding as it is when you are sat there swearing at it.

    Added on 1st May 2023 - I've posted an improved version of this script that simulates a different key press in post #45.

    KeepDisplayOn.bat
    Code:
    Title Keep display on
    Set ThisVBScript="%TEMP%\KeepDisplayOn.vbs"
        Echo Set WshShell = WScript.CreateObject("WScript.Shell") > %ThisVBScript%
        Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
        Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
    :ReRunKeepDisplayOn
    Call %ThisVBScript%
    TimeOut /T 20 /NOBREAK >nulGoTo ReRunKeepDisplayOn


    I kill it using this command in a batch file of its own but you'll probably just want to add it to the end of your existing backup batch file.
    Code:
    taskkill /fi "WINDOWTITLE eq Keep display on"


    All the best,
    Denis
    Last edited by Try3; 01 May 2023 at 11:18.
      My Computer


  3. apb
    Posts : 94
    win 7 64bit
    Thread Starter
       #23

    Try3 said:
    Peter,

    I suggest you use powercfg to list your power plan properties.
    - Save the results in a text file. I've used the folder path F:\Desktop in my example but you should use a folder path of your own.
    - When you look at the results yourself, I suggest using Excel. I've found it to be the most suitable application for this job.
    - By the way, the qh 'switch' I've used is undocumented but has existed for at least a decade. It tells the command to include hidden properties.

    Code:
    PowerCfg -qh >F:\Desktop\PowerPlanProperties.txt
    In your next post, attach the results as a file using the Editing toolbar, Picture icon Attachment 351990 and I'll have a look through to see if anything leaps out at me.
    Don't post the results as text within your post.


    Denis
    Ok, thanks.

    You've given me quite a few assignments, so let me do them one at a time. Here is the powercfg -qh results.powercfg-status.txt

    Note that I have returned the settings to their "normal" state that I like, not various debugging states I was using.

    --peter

    - - - Updated - - -

    apb said:
    Ok, thanks.

    You've given me quite a few assignments, so let me do them one at a time. Here is the powercfg -qh results.powercfg-status.txt

    Note that I have returned the settings to their "normal" state that I like, not various debugging states I was using.

    --peter
    Oops, sorry, I forgot to re-enable hibernation before creating this file. Let me re-do it with hibernation enabled. stand by...

    - - - Updated - - -

    powercfg-status.txt
    apb said:
    Ok, thanks.

    You've given me quite a few assignments, so let me do them one at a time. Here is the powercfg -qh results.powercfg-status.txt

    Note that I have returned the settings to their "normal" state that I like, not various debugging states I was using.

    --peter

    - - - Updated - - -



    Oops, sorry, I forgot to re-enable hibernation before creating this file. Let me re-do it with hibernation enabled. stand by...
    powercfg-status.txt

    - - - Updated - - -

    Try3 said:
    Peter,

    S0 Modern standby [aka S0 Low Power Idle] is not a sleep state but a glorified idle condition. Your computer does not sleep.

    Please post your PowerCfg sleep state results. These can be pasted as text in your next post because they are only a few lines long.
    Code:
    PowerCfg -a

    Please would you identify the log, source & event you referred to in
    "The event log shows "The system is entering sleep. Sleep reason: System idle"
    That entry is misleadingly-worded. It actually means sleep/hibernate.
    This should be in
    System log
    source - Kernel-Power
    EventID 42

    If you also look at the wakeup event
    System log
    source - Power troubleshooter
    EventID 1
    then click on the Details tab and check the 3 Hiber* entries you will see numbers greater than 0 which indicates that the low power state that has been resumed from was hibernation [not Sleep - its hiber* entries would all be 0].


    Denis
    I'm aware that sleep is not sleep any more, alas.

    Here is the powercfg /a results.


    The following sleep states are available on this system:
    Standby (S0 Low Power Idle) Network Connected
    Hibernate
    Fast Startup

    The following sleep states are not available on this system:
    Standby (S1)
    The system firmware does not support this standby state.
    This standby state is disabled when S0 low power idle is supported.

    Standby (S2)
    The system firmware does not support this standby state.
    This standby state is disabled when S0 low power idle is supported.

    Standby (S3)
    This standby state is disabled when S0 low power idle is supported.

    Hybrid Sleep
    Standby (S3) is not available.
    The hypervisor does not support this standby state.

    Interestingly, I do not recall Fast Startup as being listed when I had previously checked those.
      My Computers


  4. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #24

    Fast Startup is required for hibernation.
      My Computer


  5. apb
    Posts : 94
    win 7 64bit
    Thread Starter
       #25

    Try3 said:
    Peter,

    S0 Modern standby [aka S0 Low Power Idle] is not a sleep state but a glorified idle condition. Your computer does not sleep.

    Please post your PowerCfg sleep state results. These can be pasted as text in your next post because they are only a few lines long.
    Code:
    PowerCfg -a

    Please would you identify the log, source & event you referred to in
    "The event log shows "The system is entering sleep. Sleep reason: System idle"
    That entry is misleadingly-worded. It actually means sleep/hibernate.
    This should be in
    System log
    source - Kernel-Power
    EventID 42

    If you also look at the wakeup event
    System log
    source - Power troubleshooter
    EventID 1
    then click on the Details tab and check the 3 Hiber* entries you will see numbers greater than 0 which indicates that the low power state that has been resumed from was hibernation [not Sleep - its hiber* entries would all be 0].


    Denis
    The event log is the event viewer > windows logs > System

    The entry I was referring to is:

    Log Name: System
    Source: Microsoft-Windows-Kernel-Power
    Date: 11/17/2021 6:02:41 AM
    Event ID: 42
    Task Category: (64)
    Level: Information
    Keywords: (1024),(4)
    User: N/A
    Computer: lapdell
    Description:
    The system is entering sleep.

    Sleep Reason: System Idle
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-Windows-Kernel-Power" Guid="{331c3b3a-2005-44c2-ac5e-77220c37d6b4}" />
    <EventID>42</EventID>
    <Version>3</Version>
    <Level>4</Level>
    <Task>64</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000404</Keywords>
    <TimeCreated SystemTime="2021-11-17T14:02:41.8302806Z" />
    <EventRecordID>84303</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="3948" />
    <Channel>System</Channel>
    <Computer>lapdell</Computer>
    <Security />
    </System>
    <EventData>
    <Data Name="TargetState">5</Data>
    <Data Name="EffectiveState">5</Data>
    <Data Name="Reason">7</Data>
    <Data Name="Flags">0</Data>
    <Data Name="TransitionsToOn">9</Data>
    </EventData>
    </Event>

    Here is the wake event:

    Log Name: System
    Source: Microsoft-Windows-Power-Troubleshooter
    Date: 11/17/2021 6:00:21 AM
    Event ID: 1
    Task Category: None
    Level: Information
    Keywords:
    User: LOCAL SERVICE
    Computer: lapdell
    Description:
    The system has returned from a low power state.

    Sleep Time: ?2021?-?11?-?17T00:55:05.473156000Z
    Wake Time: ?2021?-?11?-?17T14:00:20.648346400Z

    Wake Source: Timer - MacriumService.exe
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-Windows-Power-Troubleshooter" Guid="{cdc05e28-c449-49c6-b9d2-88cf761644df}" />
    <EventID>1</EventID>
    <Version>3</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2021-11-17T14:00:21.2051011Z" />
    <EventRecordID>84296</EventRecordID>
    <Correlation ActivityID="{b3784a9c-0e79-422b-9a06-a89fe8a66aaf}" />
    <Execution ProcessID="5836" ThreadID="2620" />
    <Channel>System</Channel>
    <Computer>lapdell</Computer>
    <Security UserID="S-1-5-19" />
    </System>
    <EventData>
    <Data Name="SleepTime">2021-11-17T00:55:05.4731560Z</Data>
    <Data Name="WakeTime">2021-11-17T14:00:20.6483464Z</Data>
    <Data Name="SleepDuration">3489</Data>
    <Data Name="WakeDuration">2156</Data>
    <Data Name="DriverInitDuration">1969</Data>
    <Data Name="BiosInitDuration">16304</Data>
    <Data Name="HiberWriteDuration">3663</Data>
    <Data Name="HiberReadDuration">2883</Data>
    <Data Name="HiberPagesWritten">512013</Data>
    <Data Name="Attributes">1879072801</Data>
    <Data Name="TargetState">5</Data>
    <Data Name="EffectiveState">5</Data>
    <Data Name="WakeSourceType">6</Data>
    <Data Name="WakeSourceTextLength">18</Data>
    <Data Name="WakeSourceText">MacriumService.exe</Data>
    <Data Name="WakeTimerOwnerLength">71</Data>
    <Data Name="WakeTimerContextLength">14</Data>
    <Data Name="NoMultiStageResumeReason">0</Data>
    <Data Name="WakeTimerOwner">\Device\HarddiskVolume3\Program Files\Macrium\Common\MacriumService.exe</Data>
    <Data Name="WakeTimerContext">MacriumService</Data>
    <Data Name="CheckpointDuration">52</Data>
    </EventData>
    </Event>
      My Computers


  6. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #26

    "I'm aware that sleep is not sleep any more, alas." - Sleep is still Sleep. It's just that you don't have it.

    Fast Startup is not required for hibernation.
    Steve - Was that a mistype?

    I'm still working through the powercfg -qh results - Oh, OK I see that you have reposted the file. I'll use the latest one.

    "The event log is the event viewer > windows logs > System ..."
    So I was the one I thought it was.
    And the details do confirm that it was using hibernation not sleep.
    Event logs have not been re-designed for years and that's why its text misleadingly refers to sleep.


    Back soon,
    Denis
      My Computer


  7. apb
    Posts : 94
    win 7 64bit
    Thread Starter
       #27

    Try3 said:
    Peter,

    I'm concerned about your comment that it did work in the past.
    What exactly are the symptoms of it "not working"? You mean hibernating in the middle of making a system image?
    If so, perhaps what is happening is that your S0 Modern standby state is removing power to the disk being used for your Macrium system image.
    Perhaps a Bios update has changed this behaviour. You'd have to look around it to see if there is a relevant override.
    You could check that disk in Device manager, Disk drives for a Power mgmt. tab but I have not seen them for disks.

    Since S0 Modern standby is not a Sleep state & your computer does not Sleep, no special action is required to allow Macrium to avoid Sleep. Applications keep working during S0 Modern standby.

    If you are interested in a workaround that avoids entering S0 or Hibernation while it runs then run this batch file on its own or from the backup batch file you mentioned [In which case run it using the Start command so it runs in its own window & does not hold up your main batch file. Your backup batch file would also need to include a TaskKill command at the end to stop it.]
    It mimics physical use every 20 seconds of the NumLock key twice in succession [twice - so it ends up back in its original state] so your computer happily sits there wide awake and as ready to do your bidding as it is when you are sat there swearing at it.

    KeepDisplayOn.bat
    Code:
    Title Keep display on
    Set ThisVBScript="%TEMP%\KeepDisplayOn.vbs"
        Echo Set WshShell = WScript.CreateObject("WScript.Shell") > %ThisVBScript%
        Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
        Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
    :ReRunKeepDisplayOn
    Call %ThisVBScript%
    TimeOut /T 20 /NOBREAK >nulGoTo ReRunKeepDisplayOn

    I kill it using this command in a batch file of its own but you'll probably just want to add it to the end of your existing backup batch file.
    Code:
    taskkill /fi "WINDOWTITLE eq Keep display on"


    All the best,
    Denis
    Regarding not working, yes what I observe is that I find the machine in a hibernated state. When I wake it manually, even many hours or days later, the backup resumes. I should however clarify what I mean by "used to work." It used to work when I was doing the backups over the local network, either ethernet or wifi, although not reliably due to network issues that I never succeeded in tracking down, which is why I switched to a local disk. So, the unattended "sleep" behavior might be different when connected to the network, for example, I can imagine that network connection timeout might supersede unattended timeout. I had thought that it did work correctly on the local disk also, but looking more carefully, the one time I thought it worked, it appeared to take an hour for a backup that should only take a few minutes, so I must have opened the machine early that day.

    The disk to which I am backing up is an external usb 3.0 disk. It's configured for "quick removal" in device manager, but there are no power options for it in device manager. Also, the power options gui does not show (turn off disks after...). But, this is a WD Passport drive, and I think WD can set a timeout through its app. I think the Windows default value for this is 10 minutes, iirc. The USB hub to which it is connected does NOT have "allow computer to turn off this device to save power" checked. Same with its upstream controller.

    I have also considered using a keystroke emulater to prevent the unattended idle sleep state. That would presumably revert to the "normal" system idle time setting. But, that only helps if the application's power requests are then obeyed. I would have to check that, since there seems to be something funny going on with the power requests not being acted on. If not, then I could just as well set the unattended timeout to be the attended timeout that I like.

    Unfortunately, there are tons of warnings and errors in the system log, and my experience is that when I try to track them down, it turns out that they don't matter, which makes it a giant task to hope to find the one that might be the root of this problem.

    Thanks for the help.

    --peter
      My Computers


  8. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #28

    Turn On or Off Fast Startup in Windows 10

    Hello Denis,
    It's possible I'm confusing the relationship between fast startup and hibernation.
      My Computer


  9. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #29

    steve108 said:
    Turn On or Off Fast Startup in Windows 10
    It's possible I'm confusing the relationship between fast startup and hibernation.
    Steve,

    OK, the relationship is that hibernation is required for Fast startup.

    All the best,
    Denis
      My Computer


  10. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #30

    Peter,

    [I'm still only 10% of the way through the -qh results]

    "The disk to which I am backing up is an external usb 3.0 disk. It's configured for "quick removal" in device manager, but there are no power options for it in device manager. Also, the power options gui does not show (turn off disks after...). But, this is a WD Passport drive, and I think WD can set a timeout through its app. I think the Windows default value for this is 10 minutes, iirc. The USB hub to which it is connected does NOT have "allow computer to turn off this device to save power" checked. Same with its upstream controller."

    Regardless of anything else I suggest when I've finished with the -qh results, I do think you ought to find out what the behaviour is like if you connect the backup drive directly to your computer without the hub in the way.

    You have set Turn off hard disk after to 30 seconds. I can imagine that being disruptive during imaging - if there is a pause while Macrium thinks about things then it would have to wake disks up again before it writes the next bit of the image. Mine, just for comparison, is set to 5 minutes.
    - Perhaps the time taken to wake a disk up annoys Macrium, perhaps it doesn't. I don't know.
    - I have never experimented with this setting so I don't know what its practical effects would be.
    There's a TenForumsTutorial on how to add this item to those displayed in Power options, Advanced settings so you can change it in there.
    Add or Remove 'Turn off hard disk after' from Power Options - TenForumsTutorial


    All the best,
    Denis
    Last edited by Try3; 19 Nov 2021 at 13:39.
      My Computer


 

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

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




Windows 10 Forums