You are not logged in.

#1 2020-04-16 16:09:23

tomislavski
Member
Registered: 2010-02-09
Posts: 87

How to manually control battery charging on a ThinkPad T495 Laptop

Most of the time my laptop is connected to the charger, and I don't want to constantly discharge and charge the battery, even if the battery thresholds are set to START=75% MAX=90%.

Can I use the command line to disable the charging of the battery?

I tried using tp-acpi-bat like this:

#tpacpi-bat -s IC 1 1 30 
# tpacpi-bat -g IC 1
yes (60 min)

This should set "-s" the Inhibit Charging (IC) of the battery "1" (2 is not supported) to True (1) for 30 minutes (don't know why it says 60 mins). Now, if I execute this, and I plug in the charger, I expect it no to charge if I have more than 60 minutes of battery time left. I seem to have 6 hours time left, and when I plug the charger, it starts charging.

My idea is to charge the battery, use the laptop with AC when it's available, without constantly recharging the battery, then when I empty the battery below a specific threshold, start charging. Or manually turn on charging if I want to and keep it turned off otherwise. How to do this?

Offline

#2 2020-04-17 11:22:39

blackbearx3
Member
Registered: 2020-02-19
Posts: 5

Re: How to manually control battery charging on a ThinkPad T495 Laptop

My laptop seems to behave as you wish, though I am trying to change that smile essentially as soon as the battery reaches the upper threshold the status switches to "unknown", and the charge levels stays constant. Did you have to change anything to make tpacpi-bat work? I have a T490S.

Offline

#3 2020-04-18 12:13:02

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: How to manually control battery charging on a ThinkPad T495 Laptop

Thanks, it didn't occur to me to check the battery status, because I kept seing that small lightning symbol on the battery icon. OK, currently the status is 84%, so I tried plugging the charger in and executed t

cat /sys/class/power_supply/BAT0/status 
Unknown

so that's right, the status is "Unknown"! Thanks for that info! However, I want to see what really happens: with 84% charge it should just stay there, because the starting threshold is 75%.

I didn't change anything manually, I just played a bit with tpacpi-bat to understand what is happening. I am using "tlp" and I configured the battery thresholds in /etc/tlp.conf, and started the service. They seem to be accepted. Did you install "tlp" or "laptop mode tools" or something similar that may have set the thresholds for the battery? You can check if you have the tlp service running with "systemctl status tlp" or laptop-mode with "systemctl status laptop-mode" as root.

Offline

#4 2020-04-20 12:58:01

blackbearx3
Member
Registered: 2020-02-19
Posts: 5

Re: How to manually control battery charging on a ThinkPad T495 Laptop

Yes, I installed tlp and it seems to be fine. I would guess that we have the same problem, namely that tpacpi-bat cannot switch to battery mode.

What you can try is to force a discharge through either `tlp discharge` or `tpacpi-bat -s FD 1 1`.

Offline

#5 2020-04-21 10:24:29

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: How to manually control battery charging on a ThinkPad T495 Laptop

OK, thanks!

I let the laptop stay in suspend to RAM mode, and then started charging it. "tlp" seems to be doing the right thing, the battery charged up to 80% and then it stopped charging (red battery light). Isn't this better than to have it discharged and charged all the time?

Offline

Board footer

Powered by FluxBB