On my lenovo t61 laptop, I have an extra battery in the bay slot. I always can only see the status of one battery (no matter if through the old proc interface or the new one). See output of acpi: Battery 0: Full, 100% Battery 1: Unknown, 99% It switches the battery it correctly shows, e.g. if bat1 is discharging, it shows bat1 correctly and bat0 as unknown, if bat0 is discharging then it's the other way round. This is from dmesg: ACPI: Battery Slot [BAT0] (battery present) ACPI: Battery Slot [BAT1] (battery present) From dmidecode: Handle 0x0034, DMI type 22, 26 bytes Portable Battery Location: Rear Manufacturer: SANYO Name: 42T4619 Design Capacity: 84240 mWh Design Voltage: 10800 mV SBDS Version: 03.01 Maximum Error: Unknown SBDS Serial Number: 1ECB SBDS Manufacture Date: 2010-06-23 SBDS Chemistry: LION OEM-specific Information: 0x00000000 Handle 0x0035, DMI type 22, 26 bytes Portable Battery Location: Bay Manufacturer: SONY Name: 51J0508 Design Capacity: 31320 mWh Design Voltage: 10800 mV SBDS Version: 03.01 Maximum Error: Unknown SBDS Serial Number: 05C5 SBDS Manufacture Date: 2010-06-20 SBDS Chemistry: LiP OEM-specific Information: 0x00000000 laverne hanno # acpi -V Battery 0: Full, 100% Battery 0: design capacity 2498 mAh, last full capacity 2498 mAh = 100% Battery 1: Unknown, 99% Battery 1: design capacity 6734 mAh, last full capacity 6859 mAh = 100% Adapter 0: on-line Thermal 0: ok, 45.0 degrees C Thermal 0: trip point 0 switches to mode critical at temperature 100.0 degrees C Thermal 0: trip point 1 switches to mode passive at temperature 95.5 degrees C Thermal 1: ok, 50.0 degrees C Thermal 1: trip point 0 switches to mode critical at temperature 127.0 degrees C Cooling 0: LCD 0 of 15 Cooling 1: Processor 0 of 10 Cooling 2: Processor 0 of 10
Will you please attach the output of acpidump on your box? thanks.
You can find acpidump and other data at http://int21.de/t61/data/
please attach the output of "grep . /proc/acpi/battery/*/*".
/proc/acpi/battery/BAT0/alarm:alarm: 4233 mWh /proc/acpi/battery/BAT0/info:present: yes /proc/acpi/battery/BAT0/info:design capacity: 84240 mWh /proc/acpi/battery/BAT0/info:last full capacity: 84670 mWh /proc/acpi/battery/BAT0/info:battery technology: rechargeable /proc/acpi/battery/BAT0/info:design voltage: 10800 mV /proc/acpi/battery/BAT0/info:design capacity warning: 4233 mWh /proc/acpi/battery/BAT0/info:design capacity low: 200 mWh /proc/acpi/battery/BAT0/info:cycle count: 0 /proc/acpi/battery/BAT0/info:capacity granularity 1: 1 mWh /proc/acpi/battery/BAT0/info:capacity granularity 2: 1 mWh /proc/acpi/battery/BAT0/info:model number: 42T4619 /proc/acpi/battery/BAT0/info:serial number: 7883 /proc/acpi/battery/BAT0/info:battery type: LION /proc/acpi/battery/BAT0/info:OEM info: SANYO /proc/acpi/battery/BAT0/state:present: yes /proc/acpi/battery/BAT0/state:capacity state: ok /proc/acpi/battery/BAT0/state:charging state: discharging /proc/acpi/battery/BAT0/state:present rate: 17887 mW /proc/acpi/battery/BAT0/state:remaining capacity: 52370 mWh /proc/acpi/battery/BAT0/state:present voltage: 11503 mV /proc/acpi/battery/BAT1/alarm:alarm: 1566 mWh /proc/acpi/battery/BAT1/info:present: yes /proc/acpi/battery/BAT1/info:design capacity: 31320 mWh /proc/acpi/battery/BAT1/info:last full capacity: 31320 mWh /proc/acpi/battery/BAT1/info:battery technology: rechargeable /proc/acpi/battery/BAT1/info:design voltage: 10800 mV /proc/acpi/battery/BAT1/info:design capacity warning: 1566 mWh /proc/acpi/battery/BAT1/info:design capacity low: 200 mWh /proc/acpi/battery/BAT1/info:cycle count: 0 /proc/acpi/battery/BAT1/info:capacity granularity 1: 1 mWh /proc/acpi/battery/BAT1/info:capacity granularity 2: 1 mWh /proc/acpi/battery/BAT1/info:model number: 51J0508 /proc/acpi/battery/BAT1/info:serial number: 1477 /proc/acpi/battery/BAT1/info:battery type: LiP /proc/acpi/battery/BAT1/info:OEM info: SONY /proc/acpi/battery/BAT1/state:present: yes /proc/acpi/battery/BAT1/state:capacity state: critical /proc/acpi/battery/BAT1/state:charging state: charged /proc/acpi/battery/BAT1/state:present rate: 0 mW /proc/acpi/battery/BAT1/state:remaining capacity: 0 mWh /proc/acpi/battery/BAT1/state:present voltage: 11081 mV
Status is still needinfo, it seems I cannot change that myself, please re-open, I've provided all information you've asked for.
Created attachment 31822 [details] GBST method with debug info custom GBST method. please 1. download this GBST.aml file 2. mount debugfs by "mount -t debugfs none /sys/kernel/debug" 3. override the old method via the debugfs by running "cat GBST.aml > /sys/kernel/debug/acpi/custom_method" 4. enable AML debug output by running "echo 1 > /sys/module/acpi/parameters/aml_debug_output" 5. dmesg -c 6. grep . /proc/acpi/battery/*/* >bat-status 7. dmesg > dmesg and then please attach the bat-status and dmesg file here.
Which kenrel options do I need to enable to be able to use the aml file? I have the sysfs-interface, but I get laverne Downloads # cat GBST.aml > /sys/kernel/debug/acpi/custom_method cat: write error: Invalid argument when I try to do that.
so is /sys/kernel/debug/acpi/custom_method available?
The interface file /sys/kernel/debug/acpi/custom_method exists but I can neither cat it nor cat something into it.
Created attachment 32942 [details] GBST
would you please try the new GBST.aml file attached?
Created attachment 33132 [details] dmesg
Created attachment 33142 [details] bat-status
please redo the test and attach the dmesg/bat-status when BAT1 is discharging.
Created attachment 33242 [details] dmesg with bat1 discharging
Created attachment 33252 [details] bat status with bat1 discharging
(In reply to comment #16) > Created an attachment (id=33252) [details] > bat status with bat1 discharging but this file shows that bat0 is still discharging, and bat1 is in critical status, i.e. the battery status doesn't change even if you switch the battery. do I miss something?
What do you mean with switching the battery? I cannot switch them, they are two different kinds of batteries in different slots.
(In reply to comment #17) > (In reply to comment #16) > > Created an attachment (id=33252) [details] [details] > > bat status with bat1 discharging > > but this file shows that bat0 is still discharging, and bat1 is in critical > status, i.e. the battery status doesn't change even if you switch the > battery. > do I miss something? Sorry, I mean the battery status, i.e. the output of "grep . /proc/acpi/battery/*/*" is the same when bat0 is discharging and when bat1 is discharging.
Created attachment 33682 [details] dmesg with bat1 (/proc) discharging I think I found the reason for the confusion: the acpi command line tool shows the batteries in reverse order compared to the /proc-interface. So what I saw as bat1 was bat0 in proc.
Created attachment 33692 [details] bat status with bat1 (/proc) discharging
well, the HB1S value read from EC is 0x00 when the bat0 is unknown and is 0x44 when it's discharging. This seems to be a firmware bug, and it should be described like this, bogus value got from firmware confuses the battery driver. IMO, you'd better check if this has been fixed in the new BIOS/EC firmware.
I'm running latest BIOS available from lenovo. Is there anything I can do about it? It makes the second battery pretty useless. Any idea how I should report this to Lenovo?
do you have a windows partition on this laptop? if yes, it would be great if you can verify if the problem exists in windows.