Hacker News new | past | comments | ask | show | jobs | submit login
The life and death of a laptop battery (2015) (skolelinux.org)
58 points by luu on Oct 26, 2018 | hide | past | favorite | 37 comments



> Is there a good and generic way with Linux to tell the battery to stop charging at 80%

I wish every device with a lithium battery had this feature. Maybe I would still have a battery in my MBP today ...

I had to remove it since it was expanding and pushing the trackpad out of the chassis. Thankfully it was easy to do and the machine still works plugged into main.


In my experience, the damage of not stopping at 80% is minimal. Perhaps it is more related to the quality of the battery / hardware surrounding it?

I have not been particularly kind to my battery, but all the same my Samsung Ativ Book 9 Plus from 2012/2013 still has 83% capacity and can live for about 4-5 hours browsing/reading/programming.


I am not a battery expert, but my understanding is that the most significant way that batteries degrade is through the heat production when charging near capacity (say 80-100%). This is why high end laptops like macbooks or thinkpads have battery management hardware/software that never automatically charges the battery to 100%.

For instance, based on recommendations by TLP, my thinkpad internal battery only charges to 60% and external to 75%.


> This is why high end laptops like macbooks or thinkpads have battery management hardware/software that never automatically charges the battery to 100%.

Here:

> Software may limit charging above 80% when the recommended battery temperatures are exceeded

https://www.apple.com/ca/batteries/maximizing-performance/

I recall seeing another document on apple.com (that I can't find) that described the behaviour where leaving a macbook plugged continuously cycles between back and forth charge and discharge between something like 90-96% to avoid trickle charge and prevent wear due to heat.

Anecdata: my work laptop has been basically stationary and therefore plugged in for the best part of the last three years, and the battery is in outstanding condition. My personal one has been mobile more often but still plugged in for extended durations, and at four years old its battery is in a similarly awesome condition.


The definition of 80% (or 0 or 100) is up to the manufacturer, so the apparently same charging behavior may have vastly different effects on the cells.


I'm a bit confused, I never had any battery die like that on me. I am currently using almost 5-year old T440s which has two batteries (internal and removable) and they are both still about 80% of their initial capacity. My laptop currently says it will last 8h on fully charged batteries which in my experience is fairly accurate.

I am using this laptop every day at work and at home. I am lugging it to every meeting, I am lounging on the sofa trying to get up to date with news and email. It has VMWare Workstation installed on it running at least one vm with Ubuntu at any point in time.

The ONLY two rules I follow is to 1) never allow battery to run very low and 2) make sure the laptop never uses a lot of power by trying to remove the culprit whenever fan starts to spin without apparent reason.

The laptop is on AC power as much as possible, whenever possible. I always alow it to charge to 100%. Whenever laptop is less than 100% I will make sure to connect it to AC as soon as practically possible.

Now, X230 is another premium laptop from Lenovo and it was debuted less than 2 years before T440s. It looks improbable to me that the difference in longevity can be attributed to some advancement made in that short time. I think taking good care of laptop (not letting it run hot or run out of juice completely) is much more significant effect here.


I think it really depends on how many cycles the batteries have gone through. You say you keep yours on AC most of the time so maybe that’s why.


What I meant is that laptop spens large portion of the day discharging, doing work. But I rarely let it get below 50% which is when main 6 cell battery starts running out before switching to internal 3 cell one. I unfortunately don't record the usage of my battery but mine would be different from the author of the article. In mine, I guess, you would see say 80% of days not going below 60% of charge.

While I could technically last entire day on one charge bI never venture from home without charger and I always let it charge even if I have just few minutes between meetings. I also use the regular 65W charger to charge large battery which charges slowly (but I guess it helps maintain lower temperature).


Well if you only discharge it partially, that only counts as a partial cycle, which helps keep your battery good.

It's good to let it get completely flat every now and then, I believe...


You're confused why your batteries lasted longer when you took excessively good care of them? I don't think I'd be confused if a 30 year old car engine with low miles and proper oil changes still ran well


For old macbook users (with magsafe connectors), covering the middle pin in connector stops charging the battery while running the laptop on main power supply.

Details: https://apple.stackexchange.com/a/132332/87309


That's excellent - thank you! I use my macbook at my desk quite a lot, and so usually it's plugged in and sat at 100% charge for hours (days?) at a time. So the ability to hold it at around a 40%-70% SOC is really useful


Sorry, why would I want that? Didn't they have smart overcharge protection yet?


Yes, they have over-charge protection. But apple laptops still go all the way to 100% whenever you plug in.

It is not a good idea to charge a lithium battery to 100% all the time. The source article also specifically mentions it, giving reference to Battery University.


Some time ago, I stumbled upon a graph (sorry unable to retrieve its URL) showing correlation between the discharge depth of a battery and its lifetime in cycles.

Obviously, the less you discharge it, the longer it'll last. OTOH, the less you discharge it, the more you'll cycle it.

From data scraped from the graph, despite all of this is not linear, I found the best compromise was to not go lower than 50 % discharge.

I've been applying this discipline to my new notebook battery for 6 months and its full capacity is now at 95 % after almost daily use. And 3% on the lost 5% were after I ONLY ONCE let it go to full discharge.


And 3% on the lost 5% were after I ONLY ONCE let it go to full discharge.

It is probable that what you saw was your capacity gauge calibrating to the actual capacity of the battery. The device doesn’t actually know its capacity until it hits empty.


I believe a cycle is considered a cumulative discharge/charge of 100%, so discharging to 50% twice and back to 100% is one cycle.


It had probably already lost the 3% but now realized it after your unintentional "calibration".


> OTOH, the less you discharge it, the more you'll cycle it

While by some accounting it may be more cycling (although I think most count total energy in/out for cycles), it is much easier on the batteries. They are pretty robust in the midle regions.


If you never let the battery go past 50%, then what use is your healthy, high capacity battery? Might as well have one that can only hold 50% of it's charge.


> Is there a good and generic way with Linux to tell the battery to stop charging at 80%

There is, if your device contains a Texas Instruments charging chip. Many Laptops, not only Thinkpads, use them and they can be told a maximal charge voltage via SMBus.

You don't even need a kernel module for this, but its source might be a good starting point.

Please let me know if you write (or know of) a tool for this or need some help regarding SMBus/TI datasheets.


Hey, I would love to write a tool to manage this! Do you have any documentation on how to access the TI chip?


I thought the more important thing was not to discharge your battery too deeply. It's especially bad to keep it at a very low state of charge for a long time (use the device until it dies and then not recharge it for a day or two). If you try to keep your battery charged to above 40%, its lifetime should be a lot longer. I also don't charge my ThinkPad to 100% (I limited it to 85% using tlp), but afaik that's not as important.

My iPhone 7 is now a little over two years old, and battery health reports that the maximum capacity is 90%. I use around 60% of charge every day, but I can count the number of times it went below 20% on my fingers.


Apple replaces a laptop battery for free under Apple Care if its capacity falls below 80% of design capacity.

(Note that it's measured using Apple's diagnostic tools, not using the value displayed in the System Report).

Assuming, hypothetically, that some selfish person were happy to get a new battery paid by Apple for their expensive laptop as it approaches the end of the AppleCare contract, but the diagnostic pegs it at over 80% - would it be possible to push it under 80% over a few months? How? (Not a question most articles on laptop batteries address, for some reason...)


I know when I was interested in a similar question several months ago, the advice I found was that laptop batteries like to stay at a higher charge level. Depleting the charge and allowing the cells to remain empty should damage the battery's capacity.


Lithium-Ion batteries really dislike being used to their limits, e.g. charging to 100% and discharging to 0%. They also dislike heat. Those should kill your battery fairly quickly.


I find balloons to be a useful analogy when describing charge limits to users (and when configuring ThinkPads I limit the max charges). If you have a balloon and repeatedly inflate it to 100% then deflate it, at some point it's going to pop (or you're going to have to start putting less and less air in) due to the repeated stress and stretching. If instead you inflate it only to 80-90% you're avoiding that last extra bit of stretch and will likely get far more inflation cycles.


this is actually a topic I took very seriously recently. I have a 1yr old Precision 5520, a great laptop made greater by the fact you can get it with a 9cell battery.

However I checked the status of that battery around six months ago and it had dropped to 91% of its initial capacity. Might not sound like a lot but it was only six months old and I upgraded the battery because I didn’t want to worry about looking for an outlet during long flights/travel essentially.

So I looked into what makes l-ion batteries wear out and found that (unsurprisingly to many of you) batteries that are fully charged are under stress, and the heat of charging from 80%->100% is what causes harm also. The Dell BIOS allows you to set a maximum charge cap, actually they allow much more granular tuning too such as “office hours” where charging will be full speed but out of those hours the battery will trickle charge etc. However I was interested in setting a hard limit, since the bios is uefi; you are exposed to its settings in the OS (Linux in my case), I was wondering if there was any way to alter these values from inside the OS- so that I don’t have to reboot to go into “road warrior” mode (and summarily charge my battery after rebooting of course).

Ideally I’d be able to manually trickle charge too to preserve the life of the battery;

Any ideas?


I don't know about Dell, but my Lenovo laptop has a tray icon where you can set a "Battery Miser" mode where it only charges the laptop to 80%.

I know some Dells have a function key that will tell the laptop to stop charging the battery, but that's pretty crude and manual. However, if you figure out what exactly that function key is doing you might be able to replicate it with a custom tray icon/system service.


You may be able to use `efivar` https://wiki.archlinux.org/index.php/Unified_Extensible_Firm....

Be careful to not brick your machine.



The battery of my old laptop (HP nc8430 2006-2014) went much like the one in the post.

The battery of the new one (HP ZBook 15 2014-now) looks still new. My usage pattern is almost all the time plugged into main, sleep during the night (charge goes down, especially after I upgraded from 16 to 32 GB), occasional battery only when at customer sites or traveling.

I run the script in the post (s/energy/charge/ on Ubuntu 16.04):

    timestamp,manufacturer,model_name,technology,charge_full,charge_full_design,charge_now,cycle_count,status,
    1540545130,Hewlett-Packard,Primary,Li-ion,3648000,3648000,3648000,0,Full,
Maybe it's lying to me but maybe not. I remember that HP described the battery more or less as "long lasting", not intending that it can power the laptop for all the day (it's about 3 hours, which is more than OK for me) but that it will keep going on for years without degradation.


I live in Saigon and I was commuting about an hour each way with my Late 2015 MBP in my motorbike under the seat, where it gets hot (yes, stupid me). After a few months of this, I realized my laptop wouldn't shut properly. One of the speakers also failed. I took it into shop and found this [1]. The fans were also really dirty from working in a data center, so the machine was having a hard time cooling itself (good idea to clean those fans!). Luckily, being in Vietnam and close proximity to China, the repair was pretty cheap.

[1] https://imgur.com/Dvo4Xw9


This data would be greatly enhanced if the number of charge cycles was also logged. From the graph it looks like that battery is deeply cycled frequently. That's hell on batteries.

At my org (a school) we used to disallow charging our students' laptops in class. We did that for about three years. During that time, it was not uncommon for a battery to fail in the first year, with most failing after two. Since we started allowing charging, most batteries stay above failure threshold the students' whole four years here. My hypothesis has been that students charging opportunistically avoid the deep discharge cycles that are very bad for batteries.


"But why is this happening? Why are my laptop batteries always dying in a year or two, while the batteries of space probes and satellites keep working year after year. If we are to believe Battery University, the cause is me charging the battery whenever I have a chance, and the fix is to not charge the Lithium-ion batteries to 100% all the time, but to stay below 90% of full charge most of the time."

https://batteryuniversity.com/index.php/learn/article/how_to...


I think the MacBook charge controller (probably not all model years) will reduce the max charge to below 100% if it detects prolonged AC use to reduce wear. Of course, this means you won't actually get 100% when you may need it for the first deeper discharge.

One nice thing about the Dell XPS laptops (others too I assume) is that you can configure min/max charge in the BIOS.

In any case, just leaving my devices plugged in most of the time seems to have the battery last many years, with the exception of some Android phones that don't tolerate this at all. Improvements in the last 5-10 years have probably come from better charge controllers.


Yet another insidious example of engineered obsolescence. Alternate battery chemistries (Lithium Iron Phosphate, Lithium Titanate)exist offering at least 4x-12x the durability and cycle life.

https://en.m.wikipedia.org/wiki/Lithium%E2%80%93titanate_bat...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: