Not loading battery to 100%

Biertrinker

New Member
Credits
73
Hey all.

Thinking about switching to Linux. Currently running Huawei Matebook D15.
On my Huawei I have a programm called PC Manager that prevents my battery to load to 100% when running on AC.

Is there anything that can do this on linux? I dont want my battery to drain since I always use it on AC.

Thank you for your help in this.


Clipboard01.jpg
 


brickwizard

Well-Known Member
Credits
6,783
Huawei Matebook D15.
you don't say if its the Ryzen5 or intel I3 chipset, not that it makes any difference for this question..

As far as I am aware, with Modern laptops/netbooks etc, when it says 100% charged it is usualy between 96 &98 % charged ,
In most laptops is the Embedded Controller the one responsible for the charge rate not the software you use
with the modern batteries they are less susceptible to derogation than the older ones [ I remember when permanently running on a/c would kill a battery in weeks] and although I have a modern battery in my laptop [which is also mainly used on mains supply] , once a week i will run it on battery till flat and re-charge, My current Battery lasted 2 Hrs when first fitted it now last 2 1/2 hrs ,this is because when you proof them [fully charge and fully discharge 3/5 times] this improves the condition, this battery is now 2 yrs old and shows no sign of reduction in capacity

Bwiz
 

Biertrinker

New Member
Credits
73
Thank you very much for your time in replying to me.

So if I understand correct my Huawei Windows programm that does what I describes is useless since the battery itself takes care of it?

I did some research on this topic and all over the web I found articles saying what you say but many other also say that it is important to not fully charge.

So I'm wondering now what is correct? That is why I'm aksing because some people say it is not important (like you do), but some say that it's good to take care of this.

So if this is really not something I can controll why is there a programm that does exact this? And if it's useless and only more "good feel" then real effect, there is no reason that prevents me from swichting to Linux.

But as I said... everyone says different, and that is why I am not sure about it.

Oh and btw: I own the Ryzen version of the D15
 

brickwizard

Well-Known Member
Credits
6,783
@Biertrinker

Like any question there is always more than one answer, All I can offer is what I have learnt 0ver the last 30+ years of maintaining /repairing/upgrading mine and my families machines
 

Biertrinker

New Member
Credits
73
In most laptops is the Embedded Controller the one responsible for the charge rate not the software you use
If I set the Huawei programm to load to battery to max 75% it lasts only 3 hrs. Do I set the programm to charge to 100% it lasts 4 hrs. So the setting must have some effect? If the controller is the only one in charge for charge :D, than it shoud last always the same no matter what settings I have? Or is there some wrong understanding by my side? Maybe you meant something else and I do not understand what u mean. If that is the case than sorry for asking again.
 

gvisoc

Active Member
Credits
1,797
Is there anything that can do this on linux? I dont want my battery to drain since I always use it on AC.
Yes, that's supported, subject to hardware compatibility.

If your laptop supports the module natacpi, then you can do that with TLP. As you can see in the next screenshot I start charging my laptop when it goes below 75% and stop charging at 85%.

Screenshot from 2021-09-20 17-15-38.png


You need to configure the thresholds in the TLP configuration file, either through the console or using an opensource frontend called tlpui. You can also manually override those thresholds once using the tlp command on the terminal, and plenty other options.

Refer to its documentation: https://linrunner.de/tlp/#
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,413
G'day @Biertrinker from The Land Down Under (Australia) and welcome to linux.org :)

Bugger, fellow Aussie @gvisoc just mentioned TLP which I was going to mention, but that is only for Linux, is it not @gvisoc ?

I checked AlternativeTo, and

PowerTop is an alternative that runs cross-platform, and so the OP could try it with his Windows and see if it fulfills the functions provided by the Huawei.

Let me know

Chris Turner
wizardfromoz
 

gvisoc

Active Member
Credits
1,797
For Windows needs to be manufacturer-specific, as it is a function of the battery embedded controller that the ntacpi exposes for Linux if your laptop supports such module. For example in my case, when I had Windows for my laptop that was done through Lenovo Vantage (I have a ThinkPad).
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,413
I'll say I understand that (;)) ... ta, Mate
 

Biertrinker

New Member
Credits
73
Okay thank you all for your help, I appreciate.

@gvisoc is there any way to find out if my device supports this function BEFORE installing Linux? Is it possible to find out via a live system?

@wizardfromoz thank you for the hint, I don't know how to configure this program but looks good for my purpose. U mentioned there is also a DL for windows. But I cannot find it. Can you give me a link? Just finding it for linux only.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,413
But I cannot find it
No, it may be my mistake, I apologise - I thought I had seen that it was cross-platform (Windows, Linux, Mac) but I cannot find that now.

Wizard
 

gvisoc

Active Member
Credits
1,797
Okay thank you all for your help, I appreciate.

@gvisoc is there any way to find out if my device supports this function BEFORE installing Linux? Is it possible to find out via a live system?
You should be able to test this with a live system, but if the live image doesn’t install natacpi by default it may require some good advanced terminal usage to load the modules without rebooting. Depending on the distribution it may or may not be possible at all.

Later today I will be able to tell you whether you can do this with Manjaro, which is the one I use.
 

brickwizard

Well-Known Member
Credits
6,783
Just a point on safety.. the reason the onboard controller dosn't allow a charge of more than 98% is to avoid overcharging which can lead to Li batteries exploding or catching fire [do you remember the news reports from the late 90's and the plane disaster in 2003] ..
taken from a safety warning

Avoid overcharging your batteries. These batteries do not suffer "memory effect" as badly as other types of rechargeable batteries, so they can be discharged and recharged many times nearly back to their original charge. However, they do not fare well if they are completely drained before recharging or are over-charged.
 

gvisoc

Active Member
Credits
1,797
I am running a ThinkPad, but I'm not so sure that it's only for these. As it depends on a module which is not part of the TLP project, you may find some support, too. Anyway let me reboot in a live boot and come back to you to see whether or not you can give it a try.
 

gvisoc

Active Member
Credits
1,797
So, here's the thing: Manjaro Gnome Live (the full thing, not the minimal) loads both TLP and natacpi by default.
Screenshot from 2021-09-20 08-33-09.png

So what you need to check is whether your battery supports thresholds, not your laptop, and it's going to be a feature "declared" by the battery and picked up, is possible, by natacpi. As you can see in the capture above, it's marked as "Battery Features", which in my case is also Recalibrate (that's provided by the module acpi_call). tp-smapi is a very old module that newer thinkpads don't support, and I think it was for battery swapping when a thinkpad had 2 batteries and not one.

This is the important bit:

Screenshot from 2021-09-20 08-45-02.png


What I'd do is to:
  1. Download Manjaro Gnome and prepare the thumbdrive.
  2. Drain the battery to about 50%,
  3. boot the Live System with proprietary drivers (just in case)
  4. Run sudo tlp-stat -b. If you see an output with a positive battery recognition like me , and natacpi loaded, like in my second picture, proceed to the next step.
  5. Set up some thresholds in /etc/tlp.conf for the battery to start charging at 60% and stop at 65%.
  6. After editing the tlp.conf file, plug the AC and see what happens.
To set the thresholds, run sudo nano /etc/tlp.conf, scroll down and uncomment + edit the following lines (3 lines total, marked with a GVISOC >> ....):
Code:
# Battery charge thresholds (ThinkPad only).
# May require external kernel module(s), refer to the output of tlp-stat -b.
# Charging starts when the remaining capacity falls below the
# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH
# value.

# Main / Internal battery (values in %)
# Default: <none>

# GVISOC >> THESE TWO
START_CHARGE_THRESH_BAT0=60
STOP_CHARGE_THRESH_BAT0=65

# Ultrabay / Slice / Replaceable battery (values in %)
# Default: <none>

#START_CHARGE_THRESH_BAT1=75
#STOP_CHARGE_THRESH_BAT1=80

# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
# Default: 0
# GVISOC >> AND THIS ONE, TOO
RESTORE_THRESHOLDS_ON_BAT=1
Then, CTRL+X and CTRL+O to save. After this, plug the AC and repeat sudo tlp-stat -b
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top