Hibernate is alternating between disabled or reenabled in each boot


  1. Posts : 4
    Windows 7 Ultimate 64 bits
       #1

    Hibernate is alternating between disabled or reenabled in each boot


    Hi there!

    I'm having a really irritating recurrent problem with the hibernate function on my desktop computer. I had gotten a workaround to it several years ago, but now I needed to upgrade my OS from 32 to 64 bits bits and don't remember how to solve it. The problem just keeps happening even after have installed the 64 bits version of Windows 7 Ultimate.

    The hibernate function is getting disabled or reenabled and the hiberfil.sys deleted or recreated everytime I shutdown or restart the system. When the function is enabled and the hiberfil.sys present, I can set the hibernate option in the shutdown button at start menu and the PC power button and it works fine. I also can set the hibrid sleep on the advanced power profile configurations and use it together with the hibernate option, setting the hibrid sleep to the start menu button and the hibernate to the PC power button and it works fine until the next boot (shutting down or restarting). When the system restarts, the hiberfil.sys as well as the hibernate and hibrid sleep options simply disappear, and the hibernate option on PC power button just goes blank and only show the other common options. When I restart the computer again, everything goes back again to normal, and so on.

    The most weird thing is that when the hibernate is enabled and the hiberfil.sys present, when I type powercfg -a the prompt says that S1, S3, hibernate and hibrid sleep are available, and only S2 are not due to firmware incompatibility. But when the hibernate is disabled and the hiberfil.sys missing, the powercfg -a says that only S1 and S3 modes are available, and the powercfg -h on command does not create a new hiberfil.sys file. Instead it displays an error message saying that the system couldn't create the hibernate file, and the specific error code is 0xc0000043. In both cases the HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Power > HibernateEnabled value is 1 and HiberFileSizePercent is 75. Also there are lots of free disk space so this is not the problem.

    I remember having used some kind of scrip involving the powercfg -h on and off as a workaround together with toggling the power PC button options to any other than hibernate and then immediately return it to hibernate option again, in order to use both the hibernate and hibrid sleep functions together, but I don't know exactly how the script part, and the toggling method alone is not working now in the 64 bits installation.

    None of the methods found on Internet has solved my issue, so I'm very exhausted and frustrated of trying for nothing. So, have you ever already seen an issue like this? Any new ideas for help? Thanks in advance.

    P.S. I thought of attaching a picture of cmd messages, but since the text is in Portuguese I think it would not help so much. The main informations I already put in this message.
      My Computer


  2. Posts : 162
    win7 64bit Pro
       #2

    Have you tried sfc /scannow? Perhaps a "repair install" (check forum) for your OS as it seems corrupted.
      My Computer


  3. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #3

    Hi andresaluki,

    rather unusual problem only seen it once before.
    IF its what i think it is, 16K cluster size then it can be fixed.

    please run chkdsk
    3rd line from the bottom should be showing
    16384 bytes in each allocation unit

    Now you will have to change the cluster size to 4k 4096 bytes
    There are tools that can do this Partition manager is one
    Free Download MiniTool Partition Wizard | Best Partition Manager for Windows PC and Server

    not sure if the free one has this option, but the Pro trial should have.


    Roy
      My Computer


  4. Posts : 4
    Windows 7 Ultimate 64 bits
    Thread Starter
       #4

    Hi sverne! No, I didn't try the sfc /scannow... will try it. I don't think the OS is corrupted, since the same problem had already being happening on the 32 bit version of the OS (the previous installation, now I have the 64 bit version of the OS).

    Hi, Roy! My current 64 bit OS is in a unit with 64k cluster size, and the previous 32 bit OS also was. It might be the cause of the issue, however, in the previous 32 bit version of the OS I was able to apply a workaround to solve the issue. Now, with the 64 bit OS, the same workaround is not working. I could remember this workaround, I did:
    - open gpedit.msc;
    - computer settings;
    - Windows settings;
    - scripts;
    - logon > scripts > add > (script name) powercfg / (script parameters) -h on
    - logoff > scripts > add > (script name) powercfg / (script parameters) -h off
    In addition to this, whenever I started the system after shutting down or restarting, I changed the energy button (physical desktop button) option from hibernate to any other one (usually do nothing) and then back to hibernate, and so I was able to use hibernate function by pressing the desktop energy button and hibrid sleep by selecting the sleep option on the start menu button. Also, the computer automatically entered in hibernation after a set time period after being in hibrid sleep.

    I was able to find among my document files another procedure to activate hibernation on the desktop button, but I didn't yet try this specific procedure on my new 64 bit OS installation, because I don't have any idea of what it really does. Here is the procedure:

    powercfg -SetAcValueIndex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 2

    Do you or anybody else know what this command is set for?

    Thanks in advance.
    Last edited by andresaluki; 19 Oct 2018 at 23:07. Reason: forgot to add the word "option" in the message
      My Computer


  5. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #5

    Hi,

    Dont know why your using the non standard 16K block
    Believe it only helps for HyperV and Servers, no real benefit for a normal user
    in fact it uses more space if you have lots of documents
    Cluster size recommendations for ReFS and NTFS | Storage at Microsoft

    The reg change you referenced relates to sleep mode there are 5 different settings
    NOTE there are some BIOS's that also have these features, check yours
    therefor 2 changes needed

    Sleep States - See Available Sleep States


    Roy
      My Computer


  6. Posts : 4
    Windows 7 Ultimate 64 bits
    Thread Starter
       #6

    Yes, Roy, I'm aware of the space usage regarding 4k and 64k clusters, but in my case this is not of so much concern because my HD is large enough for my needs. Also, my biggest concern is about fragmentation as I often work with large files (mainly for audio mastering and video edit), so I'm fine with the 64k cluster size and its performance in my computer.

    sverne, I did sfc /scannow and everything is ok.

    I checked the BIOS options and it only offers the S1 or S3 modes; it is currently set to S3. I also found a procedure in one forum for T100 Asus notebook with Windows 8.1 to set Hibernate for both lid close and power button, and wonder if it is possible to adapt it to desktop computers with Windows 7. Here's the procedure (it's called batch file):

    Rem Setup Hibernate on Lid Close and Power Button

    Rem Scheme GUIDs 8eefd8f8-99f0-4231-905e-3e5cf61f0fd2 (Max Battery)
    Rem 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)

    REM Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347 (Power buttons and lid)
    REM GUID Alias: SUB_BUTTONS

    REM Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936 (Lid close action)

    Rem Make sure Hibernate is ON
    powercfg /hibernate ON

    powercfg /setacvalueindex 8eefd8f8-99f0-4231-905e-3e5cf61f0fd2 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    powercfg /setdcvalueindex 8eefd8f8-99f0-4231-905e-3e5cf61f0fd2 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    powercfg /setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 2

    Rem Power Setting GUID: 7648efa3-dd9c-4e3e-b566-50f929386280 (Power button action)

    powercfg /setacvalueindex 8eefd8f8-99f0-4231-905e-3e5cf61f0fd2 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 2

    powercfg /setdcvalueindex 8eefd8f8-99f0-4231-905e-3e5cf61f0fd2 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 2

    powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 2

    powercfg /setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 2

    pause

    Is it possible to add this as a script in gpedit.msc?

    Thanks in advance.
      My Computer


  7. Posts : 4
    Windows 7 Ultimate 64 bits
    Thread Starter
       #7

    Solved!


    Well, after running a series of tests, I've finally magaged to make both hibernate and hibrid sleep functions work exactly as they did on my previous 32 bit OS version. On gpedit.msc, I just added the scripts on the User Setting path instead of the Computer Setting path. Here is the complete procedure:

    - open gpedit.msc;
    - open User Setting path;
    - open Windows settings folder;
    - select Scripts (Logon/Logoff);
    - select Logon > scripts > add > (script name) powercfg / (script parameters) -h on
    - select Logoff > scripts > add > (script name) powercfg / (script parameters) -h off
    - In addition to this, whenever I start the system after shutting down or restarting, I change the energy button (physical desktop button) option from hibernate to any other one (usually do nothing) and then back to hibernate, and so I am able to use hibernate function by pressing the desktop energy button and hibrid sleep by selecting the sleep option on the start menu button. Also, the computer automatically enter in hibernation after a set time period after being in hibrid sleep.

    One important note: I have only one user account in my new 64 bit OS instalation. In the previous 32 bit version I had three user accounts. So, if this procedure doesn't work on a computer having two or more user accounts, just add the scripts on the Computer Setting path instead of the User Setting path (or add the scripts in both paths just to ensure they will work properly).

    I hope this procedure can help everyone who may be having hardtimes to enable and activate the hibernate and/or hibrid sleep functions on their desktop or even laptop computers.

    Thank you for all your support to this thread. :)

    Best regards,

    Andre
      My Computer


 

  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 22:40.
Find Us