actuallymentor / battery

CLI/GUI for managing the battery charging status for Apple silicon (M1, M32, M3) Macs
MIT License
3.88k stars 165 forks source link

enable smc charging not possible. #282

Open thiccasss opened 5 months ago

thiccasss commented 5 months ago

After I disable battery limit it won't charge anymore and smc charging is still disabled. If I write "battery charging on" in terminal, it still won't turn on and charge. Only way is to reset smc by restart the Mac.

how can I turn on smc charging again without restarting the Mac anytime?

Bildschirmfoto 2024-06-13 um 11 27 45
mindok commented 5 months ago

I had to uninstall to get charging past 80% going again. When using the CLI to try and turn on charging, I was getting the following output - I suspect the error of interest is Error: SMCWriteKey() = e00002bc:

battery charging on

06/15/24-16:38:22 - Setting charging to on
06/15/24-16:38:22 - Killing running maintain daemons & enabling charging as default state
06/15/24-16:38:22 - Disabling daemon at gui/501/com.battery.app
06/15/24-16:38:22 - πŸ”ŒπŸ”‹ Enabling battery charging
06/15/24-16:38:22 - πŸ”ΌπŸͺ« Disabling battery discharging
06/15/24-16:38:22 - Charge above stop
06/15/24-16:38:22 - πŸ”ŒπŸͺ« Disabling battery charging
06/15/24-16:38:22 - πŸ’‘ Setting magsafe color to green
Error: SMCWriteKey() = e00002bc
06/15/24-16:38:22 - πŸ’‘ Setting magsafe color to
Error: SMCWriteKey() = e00002bc
06/15/24-16:38:22 - Battery at 81% (attached; remaining), smc charging disabled
06/15/24-16:38:22 - πŸ”ŒπŸ”‹ Enabling battery charging
06/15/24-16:38:22 - πŸ”ΌπŸͺ« Disabling battery discharging
06/15/24-16:38:22 - Charge above on
06/15/24-16:38:22 - πŸ”ŒπŸͺ« Disabling battery charging
06/15/24-16:38:22 - πŸ’‘ Setting magsafe color to green
Error: SMCWriteKey() = e00002bc

I'm on a MacBook 13" M1 2020, macOS version 14.5. It broke on macOS version upgrade, but I can't recall which one as I haven't travelled for quite a few months.

adamlounds commented 5 months ago

I had the same issue. Not sure why, but the enable_charging function disables charging again Β―\_(ツ)_/Β―

https://github.com/actuallymentor/battery/blob/481610ac05a6fedefb36d43032705cd9136f4691/battery.sh#L185

function enable_charging() {
    log "πŸ”ŒπŸ”‹ Enabling battery charging"
    sudo smc -k CH0B -w 00
    sudo smc -k CH0C -w 00
    disable_discharging
}

To re-enable normal charging behaviour, try

battery maintain stop
sudo smc -k CH0B -w 00
sudo smc -k CH0C -w 00

Edit: agh, stupid me. it disables dis charging πŸ™„ Please ignore :)

lochstar commented 4 months ago

I have the exact same issue.

Mccranky83 commented 2 months ago

Same here.

papypaprika commented 3 weeks ago

Same here. MacBook Air M1, 2020 - MacOS Sequoia 15.0.1

battery maintain stop
10/26/24-11:38:32 - Killing old maintain process at 2779
10/26/24-11:38:32 - Killing running maintain daemons & enabling charging as default state
10/26/24-11:38:32 - Disabling daemon at gui/502/com.battery.app
10/26/24-11:38:32 - πŸ”ŒπŸ”‹ Enabling battery charging
10/26/24-11:38:32 - πŸ”ΌπŸͺ« Disabling battery discharging
10/26/24-11:38:32 - Disabling discharging: No valid maintain percentage set, enabling charging
10/26/24-11:38:32 - MagSafe LED function invoked
10/26/24-11:38:32 - πŸ’‘ Setting magsafe color to orange
10/26/24-11:38:32 - setting LED to orange
Error: SMCWriteKey() = e00002bc
10/26/24-11:38:32 - Battery at 100% (0:00 remaining), 12.954V, smc charging enabled
swifty99 commented 1 week ago

same here M1Air 15.1. I am stuck in a calibration process. battery charging on is working though