this post was submitted on 24 Jun 2024
29 points (91.4% liked)

Linux

48323 readers
641 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Using a new laptop with a confirmed healthy battery, do you typically need to do battery calibration after a fresh distro install? Or is that only used when replacing a battery on an existing system?

By battery calibration I mean the multiple cycles of letting battery drain to 0% and then recharging back up to 100%.

Thanks in advance!

top 18 comments
sorted by: hot top controversial new old
[–] bloodfart@lemmy.ml 18 points 5 months ago (3 children)

There’s two things you might be talking about here:

The old way of making sure nickel cadmium batteries didn’t degrade, which was to discharge them all the way and charge them back up all the way. Your new laptop is almost certainly using lithium ion batteries which are chemically “damaged” more through that process than just leaving them plugged up all the time.

You could be talking about the old way of dealing with charge controllers, where the controller relied on the bios or os to tell it what to do and didn’t “know” how to respond to batteries at different stages of charge. This hasn’t been the situation for like fifteen years. Nowadays charge controllers go “yup, ready to go boss, 12345mah of charge, 90%” when some bios or os polls them.

You don’t even need to manually keep your battery in the 20-80 range nowadays since almost every charge controller automatically monitors temperature and adjusts charging parameters to not damage the battery. It’s not like the old days where the charge controller was just an ic controlling a fet acting as a slucegate between the battery and the power brick.

Heck, lithium ion batteries nowadays last longest the longer they’re plugged in. Running them to <10% every charge cycle actually diminishes battery life!

Tldr welcome to the future, don’t worry about it!

[–] MangoPenguin@lemmy.blahaj.zone 6 points 5 months ago* (last edited 5 months ago) (1 children)

You don’t even need to manually keep your battery in the 20-80 range nowadays since almost every charge controller automatically monitors temperature and adjusts charging parameters to not damage the battery.

Sort of. The charge controller will limit charging current if too far outside normal temperature ranges. But it will still charge all the way to 100% unless you manually limit that with the settings on your device.

Heck, lithium ion batteries nowadays last longest the longer they’re plugged in.

That's actually incorrect, charging a Li-ion battery to 100% is significantly worse for it than charging to 80%, and keeping it at 100% plugged in is even worse. Which is why most devices will have the option to stop charging at 80% or near there instead of going all the way to 100%.

Charging while warm is also much worse than charging below 50 degrees F or so.

[–] bloodfart@lemmy.ml 3 points 5 months ago

While you’re right that going all the way up to the 4.2v that the battery is rated for is worse than if it just stayed at 4v, by not discharging to half or more you’re reducing the charge cycles which directly correlates to longer life.

Ultimately in lieu of a charge controller or os that does that for you, the easiest way for a user to extend battery life without going psycho mode is to charge they phone, eat hot chip and lie.

I know all the macs and iphones have that predictive charging thing where if you’re always leaving your phone or computer or phone plugged in overnight they’ll keep it around 80% or so till about an hour before you wake up and charge the rest of the way then.

Windows computers have something called smart charging but I don’t have any experience with it.

Theres a bunch of different ways to control charging in Linux.

It really seems like this is a solved problem and I’m glad to not be worrying about plugging and unplugging my phone to maximize my battery life.

[–] scrion@lemmy.world 4 points 5 months ago

Generally all correct, here is a resource with a lot of in-depth information and additional links:

https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries

[–] mayra@lemmy.world 4 points 5 months ago

Thanks for the detailed reply! I learned a lot from it. Cheers!

[–] MangoPenguin@lemmy.blahaj.zone 13 points 5 months ago* (last edited 5 months ago)

It should never be needed, even when replacing the battery as that data is part of the BMS.

Calibration was a thing like 25 years ago with the awful NiCD/NiMH batteries as I remember.

[–] federalreverse@feddit.de 10 points 5 months ago* (last edited 5 months ago) (1 children)

Not an expert but: tldr don't.

Battery calibration is supposed to help the battery's firmware figure out how low the battery can go. It also tends to hurt your battery, so you should avoid performing these calibrations and keep the charge between 20% and 80% as much as you can.

It seems what you're trying to do is improve battery estimation by the OS on a new machine. And in that case, ~~Is just trey trip love~~* I'd just try to live with possible insecurity of not knowing whether the machine has 15 or 25 minutes left.

  • Thanks, auto-correct!
[–] mayra@lemmy.world 4 points 5 months ago

Appreciated! Thanks!

[–] rotopenguin@infosec.pub 7 points 5 months ago* (last edited 5 months ago) (3 children)

The charge controller's idea of what's going on is totally independent of what's going on in the CPU. It doesn't know and doesn't care about your OS.

Multiple calibration cycles are pointless. Doing it once (every few months) should be enough. Or doing it never is fine too. I had one laptop (thinkpad l480) that would get out of calibration, such that the charge controller would go straight from 45% charge to 1%.

What's happening is that lithium batteries have a very steady voltage for most of their usage. The voltage mostly changes at the top and bottom ~%10 of charge. Everything else in the middle is guesswork - the charge controller has to measure and count every drop of current going in and out of the battery. Measuring consists of a current meter - you put a very low value resistor in line and measure microvolts of drop across it. You can have a high precision current meter, or you can have one that "doesn't burn a lot of power in the dropper resistor", not both. Some systems have too inaccurate a meter. Some have phantom draws that aren't well accounted for (like the battery's own internal resistance and drain). If the battery spends all of its time in the "voltage never changes" region, the current counter's guess will diverge from reality.

When you discharge/recharge the battery, you are forcing its current counter to realign itself with reality. Whatever it thinks is left in the battery, nope that's really zero when we drop to ~3.2 volts.

[–] scrion@lemmy.world 5 points 5 months ago

It's not true that precision measurements are impossible with low value resistors, a lot of measurement equipment works exactly like that - it might just be more expensive than what the manufacturer is willing to budget for.

[–] possiblylinux127@lemmy.zip 2 points 5 months ago

You shouldn't cycle your battery as that wears it out and is very hard on it. Modern batteries don't need it.

[–] mayra@lemmy.world 1 points 5 months ago

Thanks! Very useful info.

[–] independantiste@sh.itjust.works 4 points 5 months ago (1 children)

The battery state should be controlled by the firmware, which is independent of the installed OS, so a calibration should not be needed

[–] mayra@lemmy.world 2 points 5 months ago
[–] GolfNovemberUniform@lemmy.ml 4 points 5 months ago (2 children)

Afaik in almost all cases the battery monitors work independently of the OS (on the BIOS level I guess) so you should only do the calibration if you notice issues with the monitoring and not more often than like once a year. Also if the battery is very worn out, there's no way to get accurate measures.

[–] mayra@lemmy.world 3 points 5 months ago
[–] possiblylinux127@lemmy.zip 1 points 5 months ago

Firmware level not BIOS level technically

[–] possiblylinux127@lemmy.zip 4 points 5 months ago

That should be handled in firmware if I remember correctly.