Difference between revisions of "Ultrabay 2000 Battery"

From ThinkWiki
Jump to: navigation, search
(Linux Support)
Line 41: Line 41:
  
 
Test machine: T23.
 
Test machine: T23.
 +
 +
=== Battery Control ===
 +
 +
The system only charges/discharges one battery at a time.
 +
If you have both batteries present, the system will completely deplete the UltraBay battery before using the main battery.
 +
When charging, the system will completely charge the main battery before it starts on the UltraBay battery.
 +
 +
{{WARN|You need to keep an eye on the charge in the UltraBay battery and physically remove it from the bay when it gets too low. Failure to do so will result in the system completely discharging the UltraBay battery. This will significantly reduce the lifetime of your battery. }}
 +
 +
Switching between the batteries is instant, so if you pull the UltraBay battery from the bay when it is being discharged, the system will instantly switch to the main battery. You can therefore use the UltraBay battery to hot-swap the main battery (i.e., replace it without the need to reboot, hibernate or use an external power adapter).
 +
 +
Someone suggested that the [[SMAPI support for Linux|tp_smapi]] module could be used to control which battery gets used first. As of tp_smapi-0.13, the only way this could be possible is using <tt>force_discharge</tt>. But none of the functions to manipulate the battery are implemented on the T23 (may work on T30 though).
  
 
=== Supported with ===
 
=== Supported with ===

Revision as of 15:51, 4 January 2006

UltraBay 2000 Battery

This is a battery that slides into a supported UltraBay 2000.

Features

  • 10.8V Lithium-Ion
  • 9 cells
  • Up to 3 hours of battery life
  • Weight: 268g (0.59 lbs)
  • Charge time: 2.0 h

UltraBay 2000 Battery

IBM Partnumbers

  • Marketing PN: 02K6646
  • FRU PN: 02K6645

Linux Support

The second battery is correctly detected by either the APM or ACPI subsystem. However, the Linux ACPI subsystem only scans for batteries on boot. This means that the second battery must be present at boot time, or you will not be able to get any info for it via /proc/acpi/battery/BAT1.

With kernel 2.6.14.2 (possibly only with ibm-acpi) there is a sysfs file: /sys/firmware/acpi/namespace/ACPI/_SB/PCI0/LPC/EC/BAT1/eject. There isn't one for BAT0, but # cat /proc/acpi/battery/BAT0/* shows not present when there is no internal battery.

For BAT1 all the states go to 0, critical, etc. .

# echo 1 > /sys/firmware/acpi/namespace/ACPI/_SB/PCI0/LPC/EC/BAT1/eject will remove /proc/acpi/battery/BAT1 and turn off the UltraBay led. Interestingly the battery will still be discharging (charging not tested) until it is physically removed.

Also, if you compile the battery module of ACPI as a module, boot with the UltraBay battery present, remove the UltraBay battery (without doing the eject above), /proc/acpi/battery/BAT1 is still there, while after # rmmod battery && modprobe battery /proc/acpi/battery/BAT1 is gone (BAT0 is back). Put the battery back in and /proc/acpi/battery/BAT1 is still missing, do # rmmod battery && modprobe battery and /proc/acpi/battery/BAT1 is back.

If you boot without the second battery BAT1 never appears in /proc or /sys.

If you eject using the sysfs file above, BAT1 disappears from both /proc and /sys and never comes back.

Fortunately, the battery status is accessible independently of the ACPI system. The tp_smapi module gives battery status (and other features) via the sysfs interface in /sys/devices/platform/smapi/BAT{0,1}. The BAT1 interface is always present, regardless of whether the battery is present, was present on boot, or was ejected using the sysfs interface above.

Unfortunately, all battery monitor scripts/applets currently use the ACPI interface to get battery status information.

Test machine: T23.

Battery Control

The system only charges/discharges one battery at a time. If you have both batteries present, the system will completely deplete the UltraBay battery before using the main battery. When charging, the system will completely charge the main battery before it starts on the UltraBay battery.

ATTENTION!
You need to keep an eye on the charge in the UltraBay battery and physically remove it from the bay when it gets too low. Failure to do so will result in the system completely discharging the UltraBay battery. This will significantly reduce the lifetime of your battery.

Switching between the batteries is instant, so if you pull the UltraBay battery from the bay when it is being discharged, the system will instantly switch to the main battery. You can therefore use the UltraBay battery to hot-swap the main battery (i.e., replace it without the need to reboot, hibernate or use an external power adapter).

Someone suggested that the tp_smapi module could be used to control which battery gets used first. As of tp_smapi-0.13, the only way this could be possible is using force_discharge. But none of the functions to manipulate the battery are implemented on the T23 (may work on T30 though).

Supported with