7 ms·
Battery charge limiter for Apple Silicon MacBook devices
- pulvinar 1y agoI 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. A puzzler.
- wslh 1y agoI have a MacBook M1 Max that I mainly use as a desktop, and it seems to automatically limit the charge from time to time. It is connected to a Caldigit TS4 Thunderbolt Dock, and charging via USB-C. I don't think this make any difference but giving the detail for more information about the setup.
- Someone 1y agoApple claims Optimized Battery Charging “will delay charging past 80% in certain situations” (https://support.apple.com/en-us/102338 https://support.apple.com/en-us/102338) That page also says “On Mac computers with Apple silicon or the T2 security chip, Optimized Battery Charging is on by default when you set up your Mac or after updating to macOS Big Sur or later.” Maybe, you or a system update switched off that setting? Alternatively, the logic behind that setting may have ‘decided’ that you need 100% charge now (I think this setting isn’t just a “limit charging to 80%” flag, but tries to predict future power demands)
- Reason077 1y agomacOS has a built in "smart" battery management feature ("Optimize battery charging" in system settings -> battery -> battery health) that limits charging to 80% during times when it expects you to have the MacBook plugged in, but charges automatically to 100% when it thinks you'll be using battery power. It's unreliable, however, especially if you don't have your MacBook plugged in on a fixed schedule every day. It's good that there are more third-party tools to work around this long-standing macOS deficiency. I've been using another one, called "Battery Toolkit", which has been working well.
- v5v3 1y agoAs said, latest OS does have a smart 80% limit built in. It's hard to find though (have to click the i for information in battery section).
- cnst 1y agomacOS is unreliable period; mine gets charged to 100% immediately after a power outage of any kind, e.g., re-arranging the monitor/laptop, or an actual power outage. Obviously, it'd be nice if it knew of power outages upfront, but charging to 100% after one, is kinda pointless. Then it stays at 100% for several days, until discharging to 80% several days later. It's supposed to be smart, but instead it causes the user to alter their own behaviour, e.g., not disconnect the USB-C when rearranging the desk, even if disconnecting would be far more convenient when doing a cleanup or re-arranging furniture. I miss the time when Apple used to give you choices…
- catgirlinspace 1y agoCould’ve been the built in optimized battery charging where it stays at 80% until about when it think it’ll be needed (based off of previous usage on battery tmk, but i wouldn’t be surprised if it also looks at the native calendar app or something too) at which point it charges to 100%. Apple has been doing it for years on iPhones and i think it was introduced on Mac when Apple silicon happened. For me my MacBook stays at 80% through the evening and night before charging to 100% in the morning when I typically unplug it and put it in my bag. If you open the battery thing in the menu bar it shows when it’s doing this, the time it’s scheduled to be finished charging by, and has a little button to charge to 100% immediately.
- js2 1y agoThe 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.
- bearjaws 1y agoYeah I have found my MBP at 100% far too often, every now and again I peak and it says "holding charge". I don't leave my laptop plugged in 100% of the time, however it is plugged in ~70% of the time and I never discharge it that much when it is unplugged. So this little app is perfect for me. Seems Apple still has work to do on their algorithm, it could easily keep it at 80% and I would never get below 20%.
- varenc 1y agoI have the same frustration. The built in Apple algorithm is far too conservative. The `batt` tool has solved this for me now. iPad OS on recent iPads has a dead simple "limit charge to 80%" option in system settings. MacOS should just have the same feature. I also limit my iPhone's charge by using shortcut automations and a smart power plug. It just turns the plug off when charge exceeds 80% and on when it drops below 75%. Not ideal but I think still better for battery life than having it sit at 100%. (lmk if I'm wrong!)
- jerrysievert 1y ago> iPad OS on recent iPads has a dead simple "limit charge to 80%" option in system settings. MacOS should just have the same feature. is the optimized battery charging option in settings that tells you that it will charge to 80% and learn when it needs to charge to 100% not that? it seems to be exactly what you're looking for? it's pretty consistent across all 4 platforms: macOS, iOS, iPadOS, and watchOS, they all offer the same feature
- aaronscott 1y agoThis is awesome! 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.
- duskwuff 1y ago> although I’m not sure how big of an impact sail mode makes Anecdotally: I've used sailing mode for the last year or so, and almost always use my laptop on AC power. Before I started using sailing mode, my cycle count was 120; now, a year later, it's 123.
- wingworks 1y agoPerfect, just was I've been looking for. Thanks!
- CjHuber 1y agoI'd rather have a tool that degrades my battery to below 80% max capacity so that I can get a free new one from apple care+
- sigmoid10 1y agoI'd rather have that new EU rule that mandates laptops and smartphones to have easily user-replaceable batteries by 2027.
- bdangubic 1y agoin US there is a better chance of a mandate that requires you to buy a new laptop every 17 days :)
- JoshTriplett 1y agoI love the concept of being able to replace a battery. I don't love it enough to lose the option of buying a thinner, lighter, IP68-waterproof phone.
- toast0 1y agoI had a samsung something from work that had a user replacable battery and claimed water proof (not sure about the IP rating though). It seemed thin and light enough to me. Edit: it must have only claimed water resistant... Lining up the accesories, I think it was a Samsung Galaxy S6 Edge, which people say tests good in a bowl of water for about 20 minutes. That's a lot longer than I'd leave a phone in a bowl of water, so seems good enough to me?
- vladvasiliu 1y agoDon't know about the S6, but I used to have an S5 which I used as a GPS on a motorbike. Strapped to the bars, no housing at all. Never had any problem with it under pouring rain.
- LoganDark 1y ago
- varenc 1y agoI use this project which does the same thing: https://github.com/charlie0129/batt https://github.com/charlie0129/batt and they recently added a basic GUI as well.
- crazygringo 1y agoI'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).
- jerrysievert 1y agosystem settings -> battery -> battery health (i) choose "Optimized Battery Charging". seems to be exactly what you're looking for
- mrheosuper 1y agoNot the same. If your charging pattern is unpredictable, that setting will be absolutely useless.
- jerrysievert 1y agoI have it turned off on my MacBook Pro, but on for my phone and iPad. my 4 year old macbook pro's battery is doing great, my iPad is still holding on (but it spends a lot of time unplugged or powered down), but my poor phone is hurting badly (4-6 hours of charge per day, claiming it's at 80% battery life). my MacBook Pro still thinks its battery is awesome, even plugged in all the time.
- crazygringo 1y agoNo, that's a completely different feature. Which is also on iOS. That delays charging to 100%, but still always charges to 100% in the end. I'm talking about never charging beyond 80%.
- LeoPanthera 1y agoA 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.
- latchkey 1y agoThe cli docs say this: battery calibrate calibrate the battery by discharging it to 15%, then recharging it to 100%, and keeping it there for 1 hour
- LeoPanthera 1y agoWell that's good. AlDente can automatically schedule it, which is convenient.
- mrheosuper 1y agoI use AlDente, but notice if i left my machine charge overnight, it still charges over my set limit(for example, i set at 80%, but in the morning i see my machine at 87%)
- userbinator 1y agoDells have had this feature built into their BIOS for many years: https://forum.endeavouros.com/uploads/default/original/3X/4/d/4d66b6a95b2090d781c95195f83c22bca0436240.jpeg https://forum.endeavouros.com/uploads/default/original/3X/4/... That's right, in the BIOS - it's independent of the OS being run, or indeed if there is any OS at all (which is the case if the machine is turned off and charging.)
- rahimnathwani 1y agoMy son's Lenovo laptop, bought from Costco, also has this feature.
- neves 1y agoI really hate this feature in my Microsoft Surface. It try to guess when it does not need to full charge to preserve the battery. But then I can't tell it: now charge to 100% because I'll travel and need a full charge. Stupid.
- frumplestlatz 1y agoA bit odd to implement the GUI for a background battery health widget in Electron, of all things.
- adastra22 1y agoSerious 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?
- achierius 1y ago"and maybe having 80% its max charge level" It's much worse than this. One year can be enough for a 20% drop like that, and it's not impossible to go even lower. Think 50% or worse after 'some years' of aggressive use.
- mikepurvis 1y agoAnecdotally this feels like what happens with phone batteries. Apply tells me my battery is at 80% health, but when it's half dead by lunchtime, I'm pretty sure I'm getting more like 50-60% of the original life out of it.
- gruez 1y agoThis is probably confounded by the impact of worse optimized software as time goes on, because apps expect faster and more energy efficient chips.
- userbinator 1y agoThe degradation-to-charge-percentage curve is highly nonlinear for lion cells. This is why in applications such as aerospace and EVs, they are derated from their original capacity and last much longer.
- kccqzy 1y agoThis derating is actually really easy to implement: a standard lithium ion cell is actually fully charged at 4.2V, but the battery management system will report it as fully charged once it reaches 4.15V or so.
- amluto 1y agoThis is: a) really neat. b) an utterly terrifying wrapper around a wrapper around this: https://github.com/hholtmann/smcFanControl https://github.com/hholtmann/smcFanControl See here: https://github.com/actuallymentor/battery/tree/main/dist 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.
- twilo 1y agoI 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.
- userbinator 1y agoThe research I've found shows far more degradation at high SOC than low.
- vladvasiliu 1y agoBecause 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%.
- diebeforei485 1y agoI'm not sure if adding another Electron app is good for my system lol.
- Perepiska 1y ago"M32" typo issues (x3) are unfixed for 9 months and make my eyes twitch.
- jerieljan 1y agoI'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`. - There's also [some issues](https://github.com/actuallymentor/battery/issues/322 https://github.com/actuallymentor/battery/issues/322) reported which [I've also experienced](https://github.com/actuallymentor/battery/issues/301 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 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.