Page 1 of 1

Ubuntu Dual Battery Drainage Question

Posted: Tue Jul 08, 2008 4:53 pm
by mini_g
I received an X32 and an UltraBaseX3 yesterday. I docked the X32 and put in another battery in the UBX3 so that I would be running a dual battery configuration. They both charged up and are showing on the battery meter properly.

Now here's where my question comes in. When battery0 was finished draining (0%), it than started to use battery1. Is there any way to change how the batteries are being utilized so that battery0 don't hit 0% before battery1 is utilized?

Re: Ubuntu Dual Battery Drainage Question

Posted: Tue Jul 08, 2008 6:45 pm
by gator
mini_g wrote:Now here's where my question comes in. When battery0 was finished draining (0%), it than started to use battery1. Is there any way to change how the batteries are being utilized so that battery0 don't hit 0% before battery1 is utilized?
No, that option is not present in thinkpads be it Linux or in windows.

Re: Ubuntu Dual Battery Drainage Question

Posted: Tue Jul 08, 2008 7:41 pm
by mini_g
gator wrote:No, that option is not present in thinkpads be it Linux or in windows.
Pity.

Posted: Thu Jul 10, 2008 6:26 pm
by voneschenbach
I hear (can anyone verify) it also prematurely ages the first battery drained due to the repeated deep discharges - I use a ultrabay battery with my T30 and an ultrabay battery which seems to be aging much faster than it should, so I have taken to pulling it when it gets to 15% or so...

Posted: Thu Jul 10, 2008 7:41 pm
by gator
voneschenbach wrote:I hear (can anyone verify) it also prematurely ages the first battery drained due to the repeated deep discharges - I use a ultrabay battery with my T30 and an ultrabay battery which seems to be aging much faster than it should, so I have taken to pulling it when it gets to 15% or so...
You heard right ...

Posted: Fri Jul 11, 2008 3:14 am
by lightweight
Only for clarity, folks with tp_smapi and the ability to force_discharge (see ThinkWiki) can do this. The trick is forcing the target battery to discharge -- for example, here's a one liner one can put into root's cron to check every 10 minutes (or whatever) to check remaining capacity and then roll to the main battery. There's lots of other ways to do it of course.

Code: Select all

# rolls to BAT0 when remaining capacity on BAT1 is less than 20%.  Change .2 if wanted.  Swap BAT0 and BAT1 if tp_smapi thinks the ultrabay is BAT0.
awk '{if (/remaining capacity/) left=$3; if (/last full capacity/) full=$4} END {if ((left/full) < .2) system("echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge")}' /proc/acpi/battery/BAT1/*

Posted: Fri Jul 11, 2008 2:39 pm
by mini_g
lightweight wrote:Only for clarity, folks with tp_smapi and the ability to force_discharge (see ThinkWiki) can do this. The trick is forcing the target battery to discharge -- for example, here's a one liner one can put into root's cron to check every 10 minutes (or whatever) to check remaining capacity and then roll to the main battery. There's lots of other ways to do it of course.

Code: Select all

# rolls to BAT0 when remaining capacity on BAT1 is less than 20%.  Change .2 if wanted.  Swap BAT0 and BAT1 if tp_smapi thinks the ultrabay is BAT0.
awk '{if (/remaining capacity/) left=$3; if (/last full capacity/) full=$4} END {if ((left/full) < .2) system("echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge")}' /proc/acpi/battery/BAT1/*
Interesting idea. I looked into the abilities supported by X32 under tp_smapi and force_discharge is not one of them. This is a good lead though.