Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mb/system76/meer9: Add power_on_after_fail #246

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Jan 21, 2025

Configure SuperIO for BIOS control of power loss behavior and add CMOS option to allow user control.

Enum 1 is used instead of 7 as the Keep option does not seem to work on meer9. The same setting via SIO control (CRE4) does work, though.

Test

With default value of Disable:

  • Unit remains off after unplugging and plugging AC power while on or off

With value of Enable:

  • Unit turns back on after unplugging and plugging AC power while on or off

@crawfxrd crawfxrd marked this pull request as ready for review January 21, 2025 17:14
@crawfxrd crawfxrd requested review from a team January 21, 2025 17:14
Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled and Disabled are both working nicely, but I'm seeing some weirdness with Keep.

After first flashing firmware with Keep set, an AC loss and restore powers the machine back on as expected. Then if I power the machine off manually, then lose and restore AC power, the machine stays off, as expected. But after this point, the machine acts like it's set to Disable. Whether or not the machine is running first, or shut down manually first, yanking power and plugging it back in results in the machine staying off.

As far as options we're displaying in the BIOS selector, I think just being able to switch between Enabled and Disabled seems like it should be sufficient. If that seems reasonable to everyone, I'll approve.

@leviport leviport dismissed their stale review January 21, 2025 23:26

wrong button

@leviport
Copy link
Member

I meant to comment, not request changes. I'll re-review once we've reached a consensus.

@crawfxrd
Copy link
Member Author

crawfxrd commented Jan 22, 2025

CR E4h:

1 1: User defines the resuming state before power loss.(refer to Logical Device A, CRE6[4])

So it probably needs to write this bit as well.


Bit is inverted and set to ON by default.

SIO control (0b10) works correctly.

Configure SuperIO for BIOS control of power loss behavior and add CMOS
option to allow user control.

Enum 1 is used instead of 7 as the `Keep` option does not seem to work
on meer9. The same setting via SIO control (CRE4) does work, though.

Change-Id: I9a215f5b0ab131a93afc1d8e41f608a263284ad0
Signed-off-by: Tim Crawford <[email protected]>
@crawfxrd
Copy link
Member Author

crawfxrd commented Feb 3, 2025

enum changed to 1 to disallow broken Keep option until the issue is addressed.

@crawfxrd crawfxrd requested a review from leviport February 3, 2025 15:36
Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable and Disable are both working as expected on meer9. I did not try Keep again.

@crawfxrd crawfxrd merged commit 01f4c5b into system76 Feb 4, 2025
@crawfxrd crawfxrd deleted the meer9-power-fail branch February 4, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants