BCLM_Loop
85BEbclm_loop is a background looping utility that maintains the battery level of Apple Silicon based Mac computers. This project was inspired by several battery management solutions, including Apple's own battery health management.
The purpose of limiting the battery's max charge is to prolong battery health and to prevent damage to the battery. Various sources show that the optimal charge range for operation of lithium-ion batteries is between 40% and 80%, commonly referred to as the 40-80 rule [1][2][3]. This project is especially helpful to people who leave their Macs on the charger all day, every day.
This project was forked from upstream (https://github.com/zackelia/bclm).
$ make build
$ make test
$ sudo make install
$ unzip bclm_loop.zip
$ sudo mkdir -p /usr/local/bin
$ sudo cp bclm_loop /usr/local/bin
$ bclm_loop
OVERVIEW: Battery Charge Level Max (BCLM) Utility.
USAGE: bclm_loop <subcommand>
OPTIONS:
--version Show the version.
-h, --help Show help information.
SUBCOMMANDS:
loop Loop bclm on battery level 80%.
persist Persists bclm loop service on reboot.
unpersist Unpersists bclm on reboot.
See 'bclm_loop help <subcommand>' for detailed help.
The program must be run as root.
It can run in the background to maintain battery levels. Just create a new plist in /Library/LaunchDaemons
and load it via launchctl
.
$ sudo bclm_loop persist
Likewise, it can be unpersisted which will unload the service and remove the plist.
$ sudo bclm_loop unpersist