You are not logged in.

#1 2011-02-06 22:36:10

SternGerlachExperiment
Member
Registered: 2009-10-11
Posts: 51

Charge threshold problem (tp-smapi)

On ThinkPad T60, I have a problem setting the charge thresholds properly.

It happens so that it charges to the level I've set in /sys/devices/platform/smapi/stop_charge_threshold and then stops, but it won't drain. It just stays at that level, stalled.

At this point command "acpi" returns something like "Battery 0: Unkown, 80%".
And "acpitool -B" says the battery is charged, but not discharging.

If I unplug the power cord it starts to drain. But if I plug the cord back in, it won't drain down to the level set in start_charge_threshold, but instead it keeps the level the battery had when the cord was plugged back in.

My typical values are 30 % for start and 90 % for stop. If I use it on battery until the charge has dropped to 60 % and then plug in the power cord, it will stay at the 60 %. It won't charge, it won't drain.

To remedy this I have to blacklist tp-smapi, shut down the T60 and remove and reinsert the battery.

Any ideas?

Offline

#2 2011-02-06 23:07:15

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: Charge threshold problem (tp-smapi)

Hmm... I don't get it. Isn't that the normal behavior of a laptop that the battery isn't used when the laptop is on AC power?

Offline

#3 2011-02-06 23:38:40

SternGerlachExperiment
Member
Registered: 2009-10-11
Posts: 51

Re: Charge threshold problem (tp-smapi)

I understood from https://wiki.archlinux.org/index.php/Tp_smapi that tp-smapi offers the possibility to control that.

tp_smapi lets you control the start and stop charging threshold to do just that.

--
This will cause the battery to begin charging when it falls below 40% charge and stop charging once it exceeds 80% charge. This will extend the lifetime of your battery.

Edit: Ok, never mind.

For some reason, probably because I was just being dumb, I thought that this keeps the laptop on battery power whenever not charging, even if plugged in.

I was in the belief that the battery would be charged to full whenever the laptop is on AC power, and so I thought that tp-smapi just reverts to battery power when  the charge reaches the stop threshold. And when it reaches the start threshold it enables AC power.

I did not understand that I can have AC power connected without loading my battery. But I can. Quite understandable now that I think about it.

I think I was a bit misguided by this part:

if you let the battery discharge below 40%, you will get problems, since it is not charged anymore. A solution consists in setting only the parameter stop_charge_thresh and control manually the lower battery value.

So if it doesn't start charging if there's more than 40 % juice, and it doesn't drain the battery either, then how can I ever get the battery to charge?

The way I understand the quote above, I shouldn't let the charge drop below the value set in start_charge_thresh (40 % in this case). But I can't reach it if I keep my laptop on AC power, and I might get below it if I keep my laptop on battery power?

My only option is to plug it in at exactly 40 % (or control the start threshold manually)?

Edit2:

Well, a HOWTO on the Ubuntu forums says that "keep the charge constantly varying between 30 and 85% while plugged into AC". So if this is correct, then it should discharge on AC power also? The HOWTO also mentioned that this would interfere with acpi reports, so that would explain my initial problem.

http://ubuntuforums.org/showthread.php?t=546537

Last edited by SternGerlachExperiment (2011-02-07 00:23:15)

Offline

#4 2011-02-07 08:21:09

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Charge threshold problem (tp-smapi)

You are seeing it wrong and you are trying to blindly follow a tutorial/howto without knowing the reasons for doing it. Not draining the battery while on AC is perfectly normal and the _expected_ behavior.

You are lucky enough to have a laptop + battery that allow you to control when to start charging the battery and how much to charge it. The thresholds you mention are not meant to make a yoyo out of the battery but to help extend its useful life if used properly, as it is clearly stated on _both_ the links you provide.

If you you want to get the battery to charge when you have 50% then just set the start_charge_thresh to something higher than the current battery charge. Your other option is to leave this functionality alone, the charge start and charge end should have sensible defaults and should work properly.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2011-02-07 09:21:37

SternGerlachExperiment
Member
Registered: 2009-10-11
Posts: 51

Re: Charge threshold problem (tp-smapi)

The thresholds you mention are not meant to make a yoyo out of the battery but to help extend its useful life if used properly, as it is clearly stated on _both_ the links you provide.

How's that clearly stated? In that Ubuntu HOWTO the author clearly says "keep the charge constantly varying between 30 and 85% while plugged into AC" which, as I see it, means just that it is a yoyo motion. At least one other person also came to the same conclusion as I did, he wrote about it, and the author didn't correct this in his response.

If you you want to get the battery to charge when you have 50% then just set the start_charge_thresh to something higher than the current battery charge.

Then why does the Arch wiki say that I get problems if the battery discharges below the threshold?

"if you let the battery discharge below 40%, you will get problems, since it is not charged anymore"

Specifically, I don't really understand what "not charged" means in this context. For example 35 % is below 40 %, but there's still 35 % charge left.

Last edited by SternGerlachExperiment (2011-02-07 09:29:51)

Offline

#6 2011-02-07 10:52:57

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Charge threshold problem (tp-smapi)

SternGerlachExperiment wrote:

The thresholds you mention are not meant to make a yoyo out of the battery but to help extend its useful life if used properly, as it is clearly stated on _both_ the links you provide.

How's that clearly stated? In that Ubuntu HOWTO the author clearly says "keep the charge constantly varying between 30 and 85% while plugged into AC" which, as I see it, means just that it is a yoyo motion. At least one other person also came to the same conclusion as I did, he wrote about it, and the author didn't correct this in his response.

The Ubuntu page you referenced says:

You may or may not be aware that lithium ion batteries (like those present in the newer Thinkpad models) survive best when kept charged between 30%-85%. They should not be kept fully charged, and should be left off for long periods of time charged to ~%40. See here for more tips on Thinkpad battery treatment.

One way to extend the life of your Thinkpad's battery is to control the way it charges -- that is, to make sure that you keep it in the 30%-85% charged range whenever possible. This is possible easily and quickly through the tp_smapi kernel module.

Do note it says "survive best when kept charged between 30%-85%" in the introduction and that is the correct statement, "keep the charge constantly varying between 30 and 85% while plugged into AC" is a bad choice of words and that behavior would be considered by anyone as a defect and not as a feature, I'd say the correct sentence should be "keep the charge between 30 and 85% while plugged into AC"

SternGerlachExperiment wrote:

If you you want to get the battery to charge when you have 50% then just set the start_charge_thresh to something higher than the current battery charge.

Then why does the Arch wiki say that I get problems if the battery discharges below the threshold?

"if you let the battery discharge below 40%, you will get problems, since it is not charged anymore"

Specifically, I don't really understand what "not charged" means in this context. For example 35 % is below 40 %, but there's still 35 % charge left.

Again I'll repeat what I said in my first reply, you are trying to blindly follow a tutorial/howto without knowing the reasons for doing it. The statement on Arch's wiki is not too clear, however if you are trying to keep your battery charged between 30%-85% you should already know why instead of doing it just because someone says so or because it is in a wiki.

The reason is that deep discharges and holding a full charge for a long time reduce the battery's ability to hold and/or deliver the charge, go google about it. If you can't be bothered to google about it or you still can't understand why you should do it, leave it alone, it should work just fine without changing anything.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2011-02-07 11:27:45

SternGerlachExperiment
Member
Registered: 2009-10-11
Posts: 51

Re: Charge threshold problem (tp-smapi)

Ok, thanks for the clarification. I understood from the discussion in the HOWTO that it doesn't really matter if the battery is being charged and discharged repeatedly as long as it keeps between 30 and 85 %. Also, when charging cellphones I've seen that even if plugged into AC all the time, the battery charges, then drains a bit, then charges again, and I thought this was common in all li-ion devices.

The reason is that deep discharges and holding a full charge for a long time reduce the battery's ability to hold and/or deliver the charge, go google about it.

I was aware of the problems regarding deep discharge, but I was confused as to why there will be problems if the charge drops below 40 % (as it says in the wiki). I had understood deep discharge problems occur at a much lower level. Guess it's just a matter of optimality then: the less it drops below 40 %, the better for the battery.

Offline

#8 2011-02-07 12:05:54

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: Charge threshold problem (tp-smapi)

I had a look at the Thinkpad Wiki and actually you can use tp_smapi to force battery usage, even on AC. But I'm not sure if it stops discharging when it drops below the start threshold.
It just doesn't make much sense to stress the battery when there is no need to.

echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge

Offline

#9 2011-02-07 14:25:52

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Charge threshold problem (tp-smapi)

It's a matter of what you consider too much discharge, the recommendations I've seen point to trying to keep the charge above 30% or so, deep discharge for a lithium battery is not the same as for nimh for example. The 40% threshold is probably a conservative value, much like the 85%, you could probably get away with 30%-90% without much lifetime penalty depending on the battery.

You will want to avoid to keep continuously charging and discharging the battery, even between the 30% and 85% limits as that will count towards the charge cycles of the battery, that said, there is always some self discharge and discharge caused by the charge monitoring circuit so all batteries will periodically top up even when continuously plugged into AC.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB