Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Hibernate is alternating between disabled or reenabled in each boot

4 Weeks Ago   #1
andresaluki

Windows 7 Ultimate 64 bits
 
 
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 System SpecsSystem Spec
.
4 Weeks Ago   #2
sverne

win7 64bit
 
 

Have you tried sfc /scannow? Perhaps a "repair install" (check forum) for your OS as it seems corrupted.
My System SpecsSystem Spec
4 Weeks Ago   #3
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 

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 System SpecsSystem Spec
.

4 Weeks Ago   #4
andresaluki

Windows 7 Ultimate 64 bits
 
 

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.
My System SpecsSystem Spec
4 Weeks Ago   #5
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 

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 System SpecsSystem Spec
4 Weeks Ago   #6
andresaluki

Windows 7 Ultimate 64 bits
 
 

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 System SpecsSystem Spec
4 Weeks Ago   #7
andresaluki

Windows 7 Ultimate 64 bits
 
 
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 System SpecsSystem Spec
Reply

 Hibernate is alternating between disabled or reenabled in each boot




Thread Tools




Similar help and support threads
Thread Forum
Sleep and Hibernate options are disabled with ShutDown Button
AOA n Hi I have found that sleep and hibernate options are disabled with ShutDown Buttons. due to this, when lid is down, my laptop is still working. Also, when i go to controlPAnel<<Power Options << then ....there is options of "Change settings that are currently unavailable" when i click it,...
Performance & Maintenance
Can't boot win7 (alternating winload, ntoskrnl or bootmgr)
Hi, I can no longer boot into Windows 7 (profession 64bit) and would love some help. Here is the (sorry, long) description of what I've done. I have a Dell M4500. The hard drive crashed. Last time this happened I just cloned the dead harddrive onto a new one and put it in and it worked...
General Discussion
Safe to sleep with hibernate file disabled?
Hey all i currently don't use the hibernate on windows 7 my power setting is balanced so hard disk turns off after 20 mins then 30 mins it goes into sleep basically wanting to know if i disable my hibernate file will it affect the computer going into sleep mode? Note - My power setting is default...
Performance & Maintenance
BSOD alternating between crashes in hal.dll and ntoskrnl.exe
I have been struggling with constant game freezes on my Nvidia GT 520 ever since I got it back at the beginning of this year. At first, all was fine but then I started playing some demanding games like Prince of Persia the Forgotten Sands and the 520, of course, couldn't run it at 60 fps but that...
BSOD Help and Support
alternating backup media
I alternate between two network hard drives on a weekly basis and backup everyone's PC , some on a daily basis, some less often. I have been wondering about how does the Windows 7 Backup figures out how to back up incrementally. One thing for sure, the list of folders keeps growing. Can I clean...
Backup and Restore


Our Sites

Site Links

About Us

Find 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 13:45.
Twitter Facebook Google+