Getting S5 state working properly

A place to talk about all the Operating Systems, Software & Hardware
Post Reply
User avatar
ccs_hello
Posts: 633
Joined: Sat Oct 13, 2018 9:16 pm

Fri Feb 22, 2019 2:52 am

It's a baby step to get to the end game (auto power on, keep-alive watchdog, etc.)

The S5 state pin status report does not work quite right out of box.
Correct state is 5V = operational and 0v = power off. In reality, after you shutdown Win 10, S5 still stays HIGH at 5V.

Finally worked out a fix...

Under PC settings, search "POWER", find the "Choose or Customize a Power Plan".
On that page's left side panel, click "Choose what the Power buttons do".
Click-n-check "Change settings that are current unavailable",
Uncheck "Turn On Fast Startup (Recommended)".

Once you diable the "Fast Startup" option in Windows, the S5 status pin finally can report the true power-off status correctly.

P.S. have not checked other OS so no idea on what or if anything need to be done there.

User avatar
ccs_hello
Posts: 633
Joined: Sat Oct 13, 2018 9:16 pm

Fri Feb 22, 2019 3:09 am

So an embedded controller or Arduino Leonardo can take in S5 as digital IN
and drive the POWER and/or RESET pins to gracefully power up/down the LPA, I think.
< -- please note that when not "driving" these leads, set Arduino on these pins as Digital IN

Naturally, a proper power supply arrangement is necessary. Don't remove power until S5 state is LOW for proper shutdown.

Ideally, in your OS you can write a watchdog daemon to periodically send signals to Arduino telling it the OS is not frozen.
Which signal? I don't know. Probably using its back-to-back USB link (recognized as CDC-ACM COM port) in between these two guys.

Possible idea on initial power-applied "Auto Power ON":
Note that S0 will always be High at 5V whenever there is power supplied. It can be used as "power present" signal.
With S0 HIGH and S5 LOW, these two combined indicating that the LPA currently is off. Padding some delays and drive "POWER" button for a short while (a short while == noticing S5 changes from LOW into HIGH state) probably is good enough to get the PC up and running.

User avatar
ccs_hello
Posts: 633
Joined: Sat Oct 13, 2018 9:16 pm

Tue Feb 26, 2019 12:51 pm

Adding a note:

Before I applied the fix in Win10 environment, when Windows is powered down,
actually it's in "Hybrid Hibernation" state (for faster start-up) which is a sub-state of S4, not a true S5 state.
Once that feature is disabled, Windows then can go down to S5 state (power down state) successfully.

Post Reply