Comment by CrLf

4 years ago

Laptops are fine unless your battery has issues and you get occasional power losses, which seems to be not too uncommon for third-party batteries (which themselves are not too uncommon since Apple will charge you an arm and a leg to replace half your laptop if you have a defective battery).

Bad batteries generally allow for last-gasp handling, and I've definitely seen the SMC throw a fit on some properties a few seconds before shutdown due to the battery being really dead. Not sure if macOS handles this properly, but I'd hope it does, and if it doesn't they could certainly add the feature. It would be quite an extreme case to have a battery failure be so sudden the voltage doesn't drop slowly enough to invoke this.

  • A fair fraction of the bad batteries I have seen have not behaved like this. Things like immediate power failure on disconnecting AC power, or claiming to be at 30% and then dying, or denying the existence of the battery altogether (two of these have happened to me personally—one at the ripe age of four months rather than due to age—and three or four to other family members). It’s certainly more common for them to just fade fairly rapidly to zero and die there, but it’s by no means rare for them to spontaneously fall over.

    • We're talking different timescales here. All you need is one second or so to command the NVMe controller to flush, and killing other power consumers in the mean time would buy you more time by reducing load, possibly even giving you several minutes the way batteries work (they tend to fall over under load when defective/dead). What may visually appear as power suddenly failing isn't necessarily so at the scale of voltage threshold interrupts and PMICs.

      What usually happens is battery internal resistance is too high to sustain a given power load, so once load crosses a threshold the system goes into a spiral of doom increasing current as battery voltage decreases and you end up in a shutdown. That's the "30% and suddenly 0% or a shutdown" scenario. But if you catch it before it's too late, you can just stop consuming power and let the NVMe controller flush.

      3 replies →

  • iOS doesn’t. A bad battery makes it think it has more time than it does, and cleanup tasks can get killed just as they start.