more questions about the MacBook Pro, Core i5, 2.8 GHz (I5-4308U), model A1502 (EMC 2875), a model where I cannot disconnect the battery, because the whole case is closed, a model Im going to use to experiment with mac and create a partition to install a linux distro alongside the mac os.

My favorite notebook is a one that lets me take the battery off if I don’t need it. This way I’ve been able to need just one battery in the last 8 years. Regarding the mac, I’m going to need a new battery (it lasts 5 hours the most) and don’t want to waste charging cycles.

My question is twofold:

  • Is there any linux program that lets me manage the battery so I can choose to rely solely on outlet power, even if I cannot physically remove the battery?

  • the same question for mac.

  • For devices where the kernel directly supports controlling the charging limits, you may be able to do that with the controls in /sys/class/power_supply/{probably BAT0}/. Specifically you should be looking for the charge_start_threshold and charge_stop_threshold files, but I remember as if sometimes there would be some variance in the names.
    If you have kernel support, you should be able to use TLP to make better use of this functionality, and in theory KDE’s xbattery and brightness" widget should also show controls related to it, but I couldn’t see it in action myself.

    For devices that use the EC (Embedded Controller) of chromebooks (I think such are the Framework laptops too) you can use the ectool command utility made for those. Framework makes available a precompiled version, that should work for chromebooks too when running Linux.
    Possibly it still depends on your specific device whether it will work, but the ectool chargecontrol idle command should make it stop using the battery while it is plugged in to a sufficiently powerful charger, and ectool chargecontrol normal should be able to restore it.
    I recommend checking out the other commands of both the ectool command and the chargecontrol subcommand if you see anything interesting (though do be cautios!), for instance with chargecontrol you can also set an interval of a charging boundaries, or read the current state.
    It’s worth to note though that I remember reading somewhere (maybe in the chrome ec docs?) that this does not work with all chargers, but it should be ok with the original one you got with the device.