Comment by withinboredom

4 years ago

Once voltage from the battery gets too low (despite reporting whatever % charge), you aren't getting anything from the battery.

It's the other way around. The PMIC cuts the main system off at a certain voltage, and even in the worse case you have the extra watt/sec to flush everything at that point.

  • I'm really hoping the battery has a low-voltage cutoff... I guess the question is: does the battery cut the power, or does the laptop? In the latter case, this may be "ok" for some definition of ok. The former, there's probably not enough juice to do anything.

    • > does the battery cut the power, or does the laptop?

      Last time I checked (and I could very well be out of date on this), there wasn't really a difference. It wasn't like an 18650 were the cells themselves have protection, but a cohesive power management subsystem that managed the cells more or less directly. It had all the information to correctly make such choices (but, you know, could always have bugs, or it's a metric that was never a priority, etc.).

    • Batteries can technically be used until their voltage is 0 ( it would be hard to get any current under >1 volt for lithium cells but still). The cutoff is either due to the BMS (battery management system) cutting off power to protect the cells from permanent damage or because the voltage is just too low to power the device (but in that case there's still voltage).

      Running lithium cells under 2.7v leads to permanent damage. But, I'm sure laptops have a built-in safety margin and can cut off power to the system selectively. That's why you can still usually see some electronics powered (red battery light, flashing low battery on a screen, etc) even after you "run out" of battery.

      I've never designed a laptop battery pack, but from my experience in battery packs in general, you always try to keep safety/sensing/logging electronics powered even after a low voltage cutoff.

      Even in very cheap commodity packs that are device agnostic, the basic internal electronics of the battery itself always keep themselves powered even after cutting off any power output. Laptops have the advantage of a purpose built battery and BMS so they can have a very fine grained power management even at low voltages.

Batteries don't die instantly; you always have a few seconds where voltage is dropping fast and can take emergency action (shut down unnecessary power consumers, flush NVMe) before it's too late. Weak batteries die by having higher internal resistance; by lowering power consumption, you buy yourself time.

I don't know if macOS explicitly does this, but it does try to hibernate whem the battery gets low, and that might be conservative enough to handle all normal cases.

  • That's why I gave the death at 8%. I imagine the OS controls the hibernation, so it probably won't think that is low enough to trigger hibernation, just a warning. My current laptop will die at 70%, and I have hibernation triggering at 80% just to be safe (it lasts about 10 minutes after being unplugged). From experience, when the power dies it just turns off. The OS has no idea the battery is about to die and when rebooting it requires an fsck (or whatever its called) to get back to normal. So I assume there is data loss.

    Also, thanks for all you're doing with Linux on the new macs. I love your blog posts!