Is there a way to turn off battery charging programmatically in OSX?
Asked Answered
C

2

7

I read some articles about battery life, for example http://www.wired.com/gadgetlab/2013/09/laptop-battery/

And I am curious, could I manage battery charging process? Is there a functions to manually stop charging in OS X? I found IOKit that helps to look to battery info, but I don't find such functions as stop charging / start charging.

But I also think that Apple engineers know their work very good and they already optimize battery charging / recharging process.

Christo answered 3/10, 2013 at 20:2 Comment(2)
First question, which is inappropriate for SO, does the hardware even support commands from software to enable/disable charging? You should start your question here with whatever evidence you have that this is under software control to begin with. If you don't know, go ask a hardware question on SuperUser or the Apple SE site.Colin
You might want to look into tools like AlDente (comes with a GUI), or bclm (CLI). Those are softwares that write to the BCLM (battery charge level max) of SMC, so you can set a upper limit to which your Mac will charge its battery to.Timelag
C
0

After some researches, I found that there is no such API, at least there is definitely no public API for managing this kind of stuff. From the other hand, in my humble opinion this is for the best. It's better leave this API for Apple engineers and programmers.

Christo answered 20/1, 2014 at 23:57 Comment(5)
Found solution yet?Kalindi
@Volatil3, there is no solution yet, at least from Apple. This API is private. Maybe you could dig to some low level unix commands, but you won't be "invited" to the Mac App Store.Christo
I disagree with "It's better leave this API for Apple engineers and programmers." It would be nice to be able to disable charging to lengthen the battery life.Keirakeiser
@Keirakeiser thanks for your comment, I don't have competence in the area of power supply and batteries. That's why it's still valid for me, and might not be true for you.Christo
How did Aldente achieve it?Devout
T
1

Iphone doesn't charge at times when you plug it into a new accessory till you unlock the phone. It is possible to do it using existing hardware but not sure how to achieve it. I don't think Apple will make the API public for sure

Talbert answered 29/6, 2020 at 6:29 Comment(0)
C
0

After some researches, I found that there is no such API, at least there is definitely no public API for managing this kind of stuff. From the other hand, in my humble opinion this is for the best. It's better leave this API for Apple engineers and programmers.

Christo answered 20/1, 2014 at 23:57 Comment(5)
Found solution yet?Kalindi
@Volatil3, there is no solution yet, at least from Apple. This API is private. Maybe you could dig to some low level unix commands, but you won't be "invited" to the Mac App Store.Christo
I disagree with "It's better leave this API for Apple engineers and programmers." It would be nice to be able to disable charging to lengthen the battery life.Keirakeiser
@Keirakeiser thanks for your comment, I don't have competence in the area of power supply and batteries. That's why it's still valid for me, and might not be true for you.Christo
How did Aldente achieve it?Devout

© 2022 - 2025 — McMap. All rights reserved.