Change Power Plan for Shutdown/Hibernate & Startup

Started by lmstearn, May 01, 2019, 10:41:55 AM

Previous topic - Next topic

lmstearn

Hi there.
An issue with this legacy rig: https://valid.x86.fr/q23rxe with a freeze in wake-up from hibernate: https://answers.microsoft.com/en-us/windows/forum/all/windows-10-freezes-waking-from-hibernate/597a8178-61b5-4994-94c7-b6f1625d9b6c?auth=1 on a custom low performance power plan.
Upgraded from 1803 to 1809. Everything seems ticketyboo, except for the hibernate freeze. Chkdsk took a while to find some disk errors, with the closing dialog to the effect they may be fixed at the restart. Ran all the tasks as suggested in the above Microsoft Answers thread.
It's worthy of note that some files are gone from explorer windows which may be there when viewed again in a new window. As if nothing happened. The HDD is most likely showing its age- so it's a prime suspect.
Almost absolutely sure I had found a way in 1803 to for the system to automatically change the power plan from the current to Balanced, and then to change it back to the custom plan after bootup. This was because booting up with a default Balanced or HP plan was never any problem such as http://www.theassimilationlab.com/forums/topic/14372-win-8x-cs-black-screen-o-misfortune/?do=findComment&comment=447219.
As to the "almost absolutely sure" bit, don't know if it was down through the GPE, or through a script- or whether the symptoms were circumvented by some other action. Remember reading somewhere that the action of power plan change would necessarily apply to the regular system shutdown as well- if that was a thing.
Any ideas & suggestions welcomed!

edkiefer

Quote from: lmstearn on May 01, 2019, 10:41:55 AM
Hi there.
An issue with this legacy rig with a freeze in wake-up from hibernate on a custom low performance power plan.
Upgraded from 1803 to 1809. Everything seems ticketyboo, except for the hibernate freeze. Chkdsk took a while to find some disk errors, with the closing dialog to the effect they may be fixed at the restart. Ran all the tasks as suggested in the above Microsoft Answers thread.
It's worthy of note that some files are gone from explorer windows which may be there when viewed again in a new window. As if nothing happened. The HDD is most likely showing its age- so it's a prime suspect.
Almost absolutely sure I had found a way in 1803 to for the system to automatically change the power plan from the current to Balanced, and then to change it back to the custom plan after bootup. This was because booting up with a default Balanced or HP plan was never any problem.
As to the "almost absolutely sure" bit, don't know if it was down through the GPE, or through a script- or whether the symptoms were circumvented by some other action. Remember reading somewhere that the action of power plan change would necessarily apply to the regular system shutdown as well- if that was a thing.
Any ideas & suggestions welcomed!
I don't have any answer for sleep state stability, it can be very buggy depending on the system. One thing from your specs it looks like your OC (200mhz bus). I know with Intel CPU/MB OC can have bad effects on coming out of sleep states. There are some bios setting that can help but that is Intel, not AMD systems.

For desktop IMO it really not worth it to have sleep enabled. Just set the display to turn off after a set time.
powercfg -h off will disable it.

You can also do it per power plan.
https://www.tenforums.com/tutorials/108391-add-remove-hibernate-after-power-options-windows.html
Bitsum QA Engineer

lmstearn

#2
Hey @edKiefer, thanks for responding!
This https://www.tenforums.com/general-support/126042-hibernate-requires-hard-restart-power-supply-reset.html thread is kind of related- it turned out to be the power supply there. Certainly something to watch here, the Eaton 5S1200 :http://powerquality.eaton.com/5S1200AU.aspx?cx=22&GUID=BBD1DC0A-1AEB-421B-8B6D-A9A5EC626DEE  logs are fine. It's really scary as to how much one has to turn over to get at the root of the issue.
Yeah- turned off sleep,- the issue may also be related to an uber legacy keyboard http://www.theassimilationlab.com/forums/topic/15860-what-a-logimess/?do=findComment&comment=447907 (which I love)- although not using the keyboard itself for power down any more.
Also if that was a thing, reset hiberfil.sys with
powercfg.exe -h off, powercfg.exe -h on

And then to attempt the power down via command, the following is possible:
rundll32 powrprof.dll,SetSuspendState
Although this shouldn't be any different from the system menu command. A better alternative might be the following from a PS shortcut:
shutdown.exe /h

More digging reveals from the Kernel-Boot log in Event Viewer:
QuoteMeasured Boot library encountered a failure and entered insecure state. InitState: 1, StatusCode: 0xC0000001, Failure Address: 0x81218B, Reference Address: 0x902120, Reason: 1.

It is logged only on wake-up from hibernation. Not a lot of documentation on the error, a Googled link: https://answers.microsoft.com/en-us/windows/forum/all/measured-boot-library-encountered-a-failure-and/b3b41312-abb3-4ea0-9a7b-17c1a2ed5506 reveals these as a possible workaround:

After you boot your computer using Windows 10 DVD or System Repair Disc, a black screen appears with gray text "Press any key to boot from CD or DVD". Press any key.

Select the correct time and Keyboard type.

Click Repair your computer in the lower left corner.

Select Troubleshoot from Choose an option screen.

Click Advanced options in Troubleshoot screen.

Click on command Prompt.

Type these following commands and hit enter after each line of command:

Bootrec /fixmbr

Bootrec /fixboot

Bootrec /scanos

Bootrec /rebuildbcd


Not booting from a DVD or such- worth a shot?
:o The _DVD_ again. just remembered an old problem with drive enumeration: https://www.dostips.com/forum/viewtopic.php?p=41262#p41262 on this rig.
OMG. Umpteen system upgrades since then- they still haven't fixed it- but now have made it worse!