Skip to content

Allow overriding charge limit and charge full #65

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented Nov 26, 2024

TODO:

  • Allow overriding charge limit
  • Add removing charge limits
  • Add (UEFI) docs

@JohnAZoidberg JohnAZoidberg force-pushed the charge-override branch 2 times, most recently from 57b2e98 to c38a647 Compare November 26, 2024 12:02
@brlin-tw
Copy link

brlin-tw commented Nov 28, 2024

I've tested the branch and the behavior is somewhat different than what I've originally expected:

  • After running the command the system does charge the battery to 100%, however after unplugging the power and replugging it, it seems that the system still tries to charge the battery.
  • The system also tries to charge the battery past the previously set charge limit after the battery charge has fallen under the previously set charge limit.

I expect the charge limit will be restored after the power source is disconnected after the battery capacity has reached 100%, however, it seems that to restore the charge limit settings one has to:

  • Run the --charge-limit command to manually set the charge limit back.
  • Reboot the system so that the firmware will reset the settings.

I would assume that the behavior I imagined might require implementation in the EC firmware as well and is out-of-scope of this project, though.

@JohnAZoidberg
Copy link
Member Author

Thanks for testing! I have to think about that for a bit.
At the very least it's worth documenting how exactly it behaves.

@me-and
Copy link

me-and commented Mar 8, 2025

FWIW, the current behaviour is closer to what I'd expect: I'd be surprised if unplugging and reconnecting the power cable changed the charging behaviour. If anything, I'd have expected changing the settings to persist after a reboot as well as after reconnecting the power supply.

I think this is mostly an argument for there being no obviously "correct" approach, but however it does work should be documented.

@JohnAZoidberg
Copy link
Member Author

I expect the charge limit will be restored after the power source is disconnected after the battery capacity has reached 100%, however, it seems that to restore the charge limit settings one has to:

That is the intended behavior when it was implemented on our first generation Laptop, it seems we have a regression.

Currently it seems this command is not more useful than setting the charge limit to 100%

@JohnAZoidberg
Copy link
Member Author

We'll work on fixing it in the EC. But prioritizing current regressions on battery-extender/charg-limit.

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