Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Ubuntu Dual Battery Drainage Question

Linux on ThinkPads
Post Reply
Message
Author
mini_g
Freshman Member
Posts: 69
Joined: Fri Jun 27, 2008 1:54 am
Location: Mt Hood, OR

Ubuntu Dual Battery Drainage Question

#1 Post by mini_g » Tue Jul 08, 2008 4:53 pm

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?
R52 1858-AKU - 2Gb RAM
PRII

gator
Moderator Emeritus
Moderator Emeritus
Posts: 3401
Joined: Thu Aug 17, 2006 2:28 am
Location: Gainesville, FL

Re: Ubuntu Dual Battery Drainage Question

#2 Post by gator » Tue Jul 08, 2008 6:45 pm

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.
Now: T60 2613-EKU | T23 2647-9NU | 600X 2645-9FU | HP 100LX
Past: X31 2673-Y13 | T41 2374-3HU | T22 2647-AEU


Rules of the road :thumbs-UP:

mini_g
Freshman Member
Posts: 69
Joined: Fri Jun 27, 2008 1:54 am
Location: Mt Hood, OR

Re: Ubuntu Dual Battery Drainage Question

#3 Post by mini_g » Tue Jul 08, 2008 7:41 pm

gator wrote:No, that option is not present in thinkpads be it Linux or in windows.
Pity.
R52 1858-AKU - 2Gb RAM
PRII

voneschenbach
Posts: 33
Joined: Thu Jan 17, 2008 1:11 am
Location: Seattle, WA

#4 Post by voneschenbach » Thu Jul 10, 2008 6:26 pm

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...
T30 2367-RU8 | 2.2Ghz | 2GB | 120GB HD | SXGA+ | Ubuntu 8.04
X31 2672-CBU | 1.4Ghx | 2GB | 60GB HD | XGA | Ubuntu 8.04

gator
Moderator Emeritus
Moderator Emeritus
Posts: 3401
Joined: Thu Aug 17, 2006 2:28 am
Location: Gainesville, FL

#5 Post by gator » Thu Jul 10, 2008 7:41 pm

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 ...
Now: T60 2613-EKU | T23 2647-9NU | 600X 2645-9FU | HP 100LX
Past: X31 2673-Y13 | T41 2374-3HU | T22 2647-AEU


Rules of the road :thumbs-UP:

lightweight
Sophomore Member
Posts: 234
Joined: Sat Jun 30, 2007 10:56 pm
Location: L. A.

#6 Post by lightweight » Fri Jul 11, 2008 3:14 am

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/*
Have: x60s ultralight 1705-CTO, Debian SiD, Linux 2.6.25-2 | x61s ultralight 7668-CTO, Debian SiD/Experimental, Linux 2.6.27-git5 | Model M 1391401, white label, 07-17-91
Had: x22, Debian Testing/SiD, Linux 2.6.18-22

mini_g
Freshman Member
Posts: 69
Joined: Fri Jun 27, 2008 1:54 am
Location: Mt Hood, OR

#7 Post by mini_g » Fri Jul 11, 2008 2:39 pm

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.
R52 1858-AKU - 2Gb RAM
PRII

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 13 guests