Linux, T61p, Ultrabay Battery Compatability
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
Linux, T61p, Ultrabay Battery Compatability
Hello,
How is the compatibility with the Ultrabay Battery on Linux? I'm running Ubuntu 8.04 x64 (2.6.24-19-generic) on a T61p (specs in sig). I've read some general things from thinkwiki, which says that the switchover from a dead main battery to a full ultrabay battery should be automatic, but I was hoping for some more specificity with my own setup. Also, are there any GUIs that can show the discharge level of each battery and other sort of stats like that? And how is the hotswapping compatibility?
Thanks
How is the compatibility with the Ultrabay Battery on Linux? I'm running Ubuntu 8.04 x64 (2.6.24-19-generic) on a T61p (specs in sig). I've read some general things from thinkwiki, which says that the switchover from a dead main battery to a full ultrabay battery should be automatic, but I was hoping for some more specificity with my own setup. Also, are there any GUIs that can show the discharge level of each battery and other sort of stats like that? And how is the hotswapping compatibility?
Thanks
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
-
lightweight
- Sophomore Member
- Posts: 234
- Joined: Sat Jun 30, 2007 10:56 pm
- Location: L. A.
tp_smapi gives good control of the ultrabay battery assuming there is hardware support. I have an ugly one liner in this thread that will switch from the ultrabay to the main battery in this thread, if wanted: http://forum.thinkpads.com/viewtopic.php?t=64288
You can monitor your battery stats with a
If you want to spit this to a log file so you can watch it by, say, day, add this to your crontab:
For a GUI of battery status, all desktops (XFCE, Gnome, KDE, etc) have one. If you're looking for lean, you could do it with conky or xbattbar. All of these methods just parse proc/acpi/battery.
You can monitor your battery stats with a
Code: Select all
cat /proc/acpi/battery/BAT{0,1}/*Code: Select all
(date; cat /proc/acpi/battery/BAT{0,1}/*) > ~/battery_stateHave: 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
Had: x22, Debian Testing/SiD, Linux 2.6.18-22
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
Thanks for the info lightweight, but have there been any reports about specific compatibility between the T61p and Ultrabay battery?
Also, I see from your script that it echos to /sys/devices/platform/smapi/BAT0/force_discharge. I can't seem to find that directory, but if I modprobe -l, tp_smapi is loaded
Thanks.
Also, I see from your script that it echos to /sys/devices/platform/smapi/BAT0/force_discharge. I can't seem to find that directory, but if I modprobe -l, tp_smapi is loaded
Code: Select all
user@GAMERA:~$ modprobe -l *smapi*
/lib/modules/2.6.24-19-generic/ubuntu/misc/tp_smapi.ko
Code: Select all
user@GAMERA:~$ ls -a /sys/devices/platform/
. bay.0 bluetooth i8042 pcspkr serial8250 thinkpad_hwmon
.. bay.1 dock.0 iTCO_wdt power thinkpad_acpi uevent
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
-
lightweight
- Sophomore Member
- Posts: 234
- Joined: Sat Jun 30, 2007 10:56 pm
- Location: L. A.
Glad to help. Thinkwiki's based on submissions and I would hope their T61 entry is based on realy input: http://www.thinkwiki.org/wiki/Tp_smapi#T_series
What's in bay.0 and bay.1?
What's in bay.0 and bay.1?
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
Had: x22, Debian Testing/SiD, Linux 2.6.18-22
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
lightweight wrote:What's in bay.0 and bay.1?
Code: Select all
user@GAMERA:~$ ls -a /sys/devices/platform/bay.*/*
/sys/devices/platform/bay.0/eject /sys/devices/platform/bay.1/eject
/sys/devices/platform/bay.0/modalias /sys/devices/platform/bay.1/modalias
/sys/devices/platform/bay.0/present /sys/devices/platform/bay.1/present
/sys/devices/platform/bay.0/uevent /sys/devices/platform/bay.1/uevent
/sys/devices/platform/bay.0/power:
. .. wakeup
/sys/devices/platform/bay.0/subsystem:
. .. devices drivers drivers_autoprobe drivers_probe uevent
/sys/devices/platform/bay.1/power:
. .. wakeup
/sys/devices/platform/bay.1/subsystem:
. .. devices drivers drivers_autoprobe drivers_probe uevent
Do you think that it would show up once I plug it in? But I would think that there would be entries for battery 0 (main battery)?
Last edited by eateryofpiza on Sat Sep 06, 2008 12:09 am, edited 1 time in total.
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
My opinion is that it should work automatically, don't see how software support comes into play except for finer-grained control of the battery. You should be able see individual battery stats, have automatic switchover, etc. I have not tried this myself though, only on T4x (which works fine even without tp_smapi).
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
hrmm... When I was reading the thread you linked to, it said that fully discharging the battery would lead to reduced battery life. I would like to avoid this, so do you know of another way for me to trigger the switchover manually?
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
On my T40, which doesn't have the fine-grained battery control in hardware, the only way to keep it running the battery down to 0 before switching is to remove the battery.eateryofpiza wrote:hrmm... When I was reading the thread you linked to, it said that fully discharging the battery would lead to reduced battery life. I would like to avoid this, so do you know of another way for me to trigger the switchover manually?
-
lightweight
- Sophomore Member
- Posts: 234
- Joined: Sat Jun 30, 2007 10:56 pm
- Location: L. A.
Check this out:
So, unloading tp_smapi on my boxes removes /sys/devices/platform/smapi, which makes sense. Are you sure tp_smapi is loaded? (modprobe -l lists all modules, loaded or not.) If not, this should be as easy as a
You'll have a BAT0 and a BAT1 whether the batteries are in there or not -- empty devices will just be empty, like
(no ultrabay battery)
Hope this helps.
Code: Select all
:~$ ls /sys/devices/platform
bay.0 dock.0 iTCO_wdt pcspkr serial8250 thinkpad_acpi uevent
bluetooth i8042 nsc-ircc.0 power smapi thinkpad_hwmon vesafb.0
:~$ lsmod |grep api
tp_smapi 21296 0
thinkpad_ec 6960 1 tp_smapi
:~$ sudo modprobe -r tp_smapi
:~$ lsmod |grep api
:~$ ls /sys/devices/platform
bay.0 dock.0 iTCO_wdt pcspkr serial8250 thinkpad_hwmon vesafb.0
bluetooth i8042 nsc-ircc.0 power thinkpad_acpi uevent
Code: Select all
sudo modprobe tp_smapi(no ultrabay battery)
Code: Select all
:~$ cat /sys/devices/platform/smapi/BAT1/power_now
cat: /sys/devices/platform/smapi/BAT1/power_now: No such device or addressHave: 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
Had: x22, Debian Testing/SiD, Linux 2.6.18-22
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
@lightweight:
Oh hey, that worked. I didn't know modprobe -l listed every package.
How do I ensure the module is loaded every time I boot?
Thanks a bunch.
Oh hey, that worked. I didn't know modprobe -l listed every package.
How do I ensure the module is loaded every time I boot?
Thanks a bunch.
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
-
lightweight
- Sophomore Member
- Posts: 234
- Joined: Sat Jun 30, 2007 10:56 pm
- Location: L. A.
I didn't know that about modprobe either, and was initially too lazy to go past a modprobe --help. I had to man it 
Append /etc/modules (only writeable by root) with "tp_smapi". You can do this from a terminal with a
Append /etc/modules (only writeable by root) with "tp_smapi". You can do this from a terminal with a
Code: Select all
echo tp_smapi |sudo tee -a /etc/modulesHave: 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
Had: x22, Debian Testing/SiD, Linux 2.6.18-22
-
eateryofpiza
- Posts: 13
- Joined: Wed Feb 20, 2008 7:15 pm
- Location: Plano, TX
Sweet thanks. I'm going to go get that battery now.lightweight wrote:I didn't know that about modprobe either, and was initially too lazy to go past a modprobe --help. I had to man it
Append /etc/modules (only writeable by root) with "tp_smapi". You can do this from a terminal with aCode: Select all
echo tp_smapi |sudo tee -a /etc/modules
Gamera: Lenovo ThinkPad T61p 6459-CTO | Chipset: PM965 Crestline (South: ICH8-M) | CPU: Core 2 Duo T9300 2.50 GHz (Penryn) | HDD: Hitachi Travelstar 200GB 7200rpm SATA | GPU: NVIDIA Quadro FX 570M | RAM: 2x2GB G.SKILL DDR2-667 | Wi-Fi: Intel Wireless 4965AGN
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Ultrabay battery prevents main battery from charging?
by ThorOfAsgard » Mon May 22, 2017 11:25 am » in ThinkPad T430/T530 and later Series - 8 Replies
- 269 Views
-
Last post by Thinkpad4by3
Mon May 22, 2017 8:50 pm
-
-
-
770X Aftermarket Battery? (*And quick PIII linux question)
by Choram » Wed Jan 04, 2017 6:52 am » in ThinkPad Legacy Hardware - 1 Replies
- 928 Views
-
Last post by Dekks
Thu Jan 05, 2017 12:43 am
-
-
-
T400 - Ultrabay Battery won't work
by timtakpad » Mon Jan 30, 2017 6:20 pm » in ThinkPad T400/410/420 and T500/510/520 Series - 9 Replies
- 1673 Views
-
Last post by TonyJZX
Fri Apr 07, 2017 1:39 am
-
-
-
SOLD: ThinkPad T420s, 240GB SSD, UltraBay battery, Win 10 Pro, etc.
by Edward Mendelson » Sat Mar 11, 2017 8:54 am » in Marketplace - Forum Members only - 1 Replies
- 327 Views
-
Last post by mpcook
Sat Mar 11, 2017 10:05 am
-
Who is online
Users browsing this forum: No registered users and 1 guest




