I could swear my MacBook Air M3 was limiting at 80% charge before, but now it's at 100%. I suspect that the latest OS update, 15.6, disabled or removed whatever was limiting it, but I don't remember what that was.
It doesn't look like I had installed this "battery" command. It might have been AlDente, but I don't find that anywhere either.
The FAQ answers why this exists when macOS has a similar built-in feature:
> Optimized Charging, a feature that is built into MacOS, aims to ensure the longevity and health of your battery. It does so by "delaying charging the battery past 80% when it predicts that you’ll be plugged in for an extended period of time, and aims to charge the battery before you unplug," as explained in Apple's user guide.
> Additionally, Optimized Charging uses machine learning to decide when the battery should be held at 80%, and when it should become fully charged. If your Mac is not plugged in on a regular schedule, optimized charging will not work as intended.
> This app is a similar alternative to Optimized Charging, giving the user control over when it is activated, what percentage the battery should be held at, and more.
Thanks for explaining the reasoning behind implementing your own version instead of using Al Dente. The straightforward UI is really appealing.
I paid for an Al Dente license long ago and have been very happy with it, sail mode and temperature sensitive charging are great features (although I’m not sure how big of an impact sail mode makes).
It’s great to see alternatives available though. Having command line access is really cool.
I'm baffled as to why new iPhones and iPads have a settings toggle to only ever charge to max 80%, but Apple hasn't brought the same setting to new Macs, so you still need a third party tool like this. Especially after unifying the Settings app!
Also this tool (or Al Dente) still isn't perfect -- if you shut your Mac off for any reason while keeping it plugged in, it will immediately charge back up to 100%. The third party charge limit only limits charging when the Mac is on or sleeping, not off entirely. (Granted, not many people turn their Macs entirely off these days.) So while I love the third party solutions, a native Apple solution would be even more reliable (plus the built-in Apple solution on iOS automatically charges to 100% occasionally just to keep the battery level accurate -- it's pretty smart).
A huge advantage of AlDente over this is the "sailing" feature. I have mine configured to stop charging at 80%, but then only start charging again when it drops to 50%. It's ideal for preventing lots of very short charging sessions. (This is also an ideal pattern for charging EVs.)
It also has a "calibrate" feature which goes through a 100 -> 10 -> 100 cycle which teaches the battery firmware what the actual capacity is now. Useful to run every month or two.
My Air battery is three years old and has 99% health because of using these features.
Serious question: why would I want to do this? In order to prevent my battery from degrading and maybe having 80% its max charge level after some years of use... I'll proactively never operate at more than 80% charge? How does that make sense?
The layer above that is a shell script that downloads and runs shell scripts from github and calls visudo. The layer above that is an electron app that execs the shell script.
I used to be a happy user of bclm, but that doesn’t work any more, sadly. I’ll keep looking for a good option.
I don’t know why everyone is concerned about the top end of the these batteries when we should be limiting depth of discharge instead, which causes way more damage than charging to 100%.
There should be an option for the machine to pretend like 40% is 0% and just go to sleep.
I know Windows has this option but it’s deep inside the power settings, they should bring it out of there.
I don’t think Apple devices have anything like that.
Because that's easier to control. In my case, I rarely use my laptops on battery, and when I do I tend to keep an eye on the battery level. If I have to use it till empty, it's because I'm actually doing something that needs to be done, so too bad for the battery life. If I'm randomly browsing HN, I'll stop around 20-30% and go do something else.
With charging, I can't plug and unplug my screen every 5 minutes just to keep it around 80%.
I've tried the CLI app. A few warnings to those who'll want to do the same:
- The app didn't have any updates since July 2024, then got a handful of commits last June and no recent commits ever since.
- I've tried to calibrate with it and managed to discharge but failed to charge back up. It's not a big deal since I could force it back with a `battery charging on`.
So it works, but it has some complications to keep in mind. Apparently [someone forked it](https://github.com/js4jiang5/BatteryOptimizer_for_MAC) and aimed to fix some of the issues, but the fork is err, opinionated and may or may not be ideal.
19 comments
[ 4.6 ms ] story [ 49.1 ms ] threadIt doesn't look like I had installed this "battery" command. It might have been AlDente, but I don't find that anywhere either.
A puzzler.
> Optimized Charging, a feature that is built into MacOS, aims to ensure the longevity and health of your battery. It does so by "delaying charging the battery past 80% when it predicts that you’ll be plugged in for an extended period of time, and aims to charge the battery before you unplug," as explained in Apple's user guide.
> Additionally, Optimized Charging uses machine learning to decide when the battery should be held at 80%, and when it should become fully charged. If your Mac is not plugged in on a regular schedule, optimized charging will not work as intended.
> This app is a similar alternative to Optimized Charging, giving the user control over when it is activated, what percentage the battery should be held at, and more.
Thanks for explaining the reasoning behind implementing your own version instead of using Al Dente. The straightforward UI is really appealing.
I paid for an Al Dente license long ago and have been very happy with it, sail mode and temperature sensitive charging are great features (although I’m not sure how big of an impact sail mode makes).
It’s great to see alternatives available though. Having command line access is really cool.
and they recently added a basic GUI as well.
Also this tool (or Al Dente) still isn't perfect -- if you shut your Mac off for any reason while keeping it plugged in, it will immediately charge back up to 100%. The third party charge limit only limits charging when the Mac is on or sleeping, not off entirely. (Granted, not many people turn their Macs entirely off these days.) So while I love the third party solutions, a native Apple solution would be even more reliable (plus the built-in Apple solution on iOS automatically charges to 100% occasionally just to keep the battery level accurate -- it's pretty smart).
It also has a "calibrate" feature which goes through a 100 -> 10 -> 100 cycle which teaches the battery firmware what the actual capacity is now. Useful to run every month or two.
My Air battery is three years old and has 99% health because of using these features.
Also known as a Schmitt Trigger
https://en.m.wikipedia.org/wiki/Schmitt_trigger
But then I can't tell it: now charge to 100% because I'll travel and need a full charge.
Stupid.
a) really neat.
b) an utterly terrifying wrapper around a wrapper around this:
https://github.com/hholtmann/smcFanControl
See here:
https://github.com/actuallymentor/battery/tree/main/dist
The layer above that is a shell script that downloads and runs shell scripts from github and calls visudo. The layer above that is an electron app that execs the shell script.
I used to be a happy user of bclm, but that doesn’t work any more, sadly. I’ll keep looking for a good option.
There should be an option for the machine to pretend like 40% is 0% and just go to sleep.
I know Windows has this option but it’s deep inside the power settings, they should bring it out of there.
I don’t think Apple devices have anything like that.
With charging, I can't plug and unplug my screen every 5 minutes just to keep it around 80%.
- The app didn't have any updates since July 2024, then got a handful of commits last June and no recent commits ever since.
- I've tried to calibrate with it and managed to discharge but failed to charge back up. It's not a big deal since I could force it back with a `battery charging on`.
- There's also [some issues](https://github.com/actuallymentor/battery/issues/322) reported which [I've also experienced](https://github.com/actuallymentor/battery/issues/301) on my end.
So it works, but it has some complications to keep in mind. Apparently [someone forked it](https://github.com/js4jiang5/BatteryOptimizer_for_MAC) and aimed to fix some of the issues, but the fork is err, opinionated and may or may not be ideal.