How to pause charging on MacBook via CLI
— 1 min read
Build your own binary: command-line, a pure plain c code
- checkout https://github.com/hholtmann/smcFanControl/tree/master/smc-command with
svn co https://github.com/hholtmann/smcFanControl/trunk/smc-command
- build with
make
Usage (for [MacBook Pro 2021 (ambp)])
- general usage:
./smc -k <key> -w <value>
- for charging: available values are
02
for disable, and00
for enable - key may vary on models, in my case, available keys including
CH0B
,CH0C
- e.g. to disable charging on 2021 16inch m1pro macbook, run
sudo ./smc -k CH0C -w 02
- find more tips on using smc: https://github.com/actuallymentor/battery/blob/main/battery.sh