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

Information about Charging LED (full threshold) #5

Open
maniacx opened this issue Oct 13, 2023 · 4 comments
Open

Information about Charging LED (full threshold) #5

maniacx opened this issue Oct 13, 2023 · 4 comments

Comments

@maniacx
Copy link

maniacx commented Oct 13, 2023

Hello @c---

I developed a Gnome extension called Battery Health Charging a while ago for several laptop brands/models which also included Apple Intel laptops using your kernel module applesmc-next.

However lately I revisited your page and noticed a note:

Note that for charge_control_full_threshold to work it needs to be set to a value less than than the end threshold because the battery will tend to float slightly under the maximum. Subtract at least 2% or more from the end threshold

I may have missed the LED info earlier, but I am assuming that it probably ligths green when battery level has reached to a threshold value.

  1. I would like to know what is the reason to have LED status user configurable?
    Why haven't you hardcode automatically set LED status to charge_control_end_threshold - 2 instead of giving users option to manually set it?

  2. Is there a reason that users may not want to set it to charge_control_end_threshold - 2 ?

I don't have a mac, so I just want to get clear information of what LED does and how the charge_control_full_threshold works and why is it needed.

I did add the function to my extension to set the LED sysfs path value charge_control_full_threshold to charge_control_end_threshold - 2 using this commit
maniacx/Battery-Health-Charging@f844c38

But then, I thought of getting a second opinion from you, if I should include or revert this.

@c---
Copy link
Owner

c--- commented Oct 13, 2023

Yes, that option makes the LED on the charge plug turn green when it's "fully charged". The option for the user to change that is just because the SMC allows it.

I don't know if most people want it to turn green when it's not really fully charged. For example I don't change the full threshold because by never turning green it reminds me the laptop is only partially charged in case I need to switch to full charge mode before taking it off the charger. However, a lot of other brand laptops do show a full charge even when they're not really.

I can't say for sure which is better, that's just how I use it. This is why I left it up to the user preference.

@maniacx
Copy link
Author

maniacx commented Oct 13, 2023

Last question.

If the user doesn't never changed the value of charge_control_full_threshold , by default what is the value of charge_control_full_threshold?
100 or 98?

Also if user has changed charge_control_full_threshold to 60 and decides, they want change it back to original behavior, what should they set it to? 100 or 98?

@c---
Copy link
Owner

c--- commented Oct 14, 2023

95% is the default on my 2015 Air after resetting the SMC.

@maniacx
Copy link
Author

maniacx commented Oct 14, 2023

Thank you for all the information.
I have included an option in extension preferences to enable / disable charging leds behavior.

On enabling this setting

if charge_control_end_threshold >= 97 then charge_control_full_threshold = 95

if charge_control_end_threshold < 97 then charge_control_full_threshold = charge_control_end_threshold - 2

On disabling this setting
charge_control_full_threshold = 95 command will be set once (to restore default behavior) and not be used again

settings

quick settings

Thank you Chris

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

No branches or pull requests

2 participants