Bug 13410
Summary: | Switching batteries during suspend gives bogus values for BATx/info | ||
---|---|---|---|
Product: | ACPI | Reporter: | wilderjds (jacopods+kernel) |
Component: | Power-Battery | Assignee: | ykzhao (yakui.zhao) |
Status: | REJECTED INVALID | ||
Severity: | normal | CC: | acpi-bugzilla, lenb, rui.zhang, yakui.zhao |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.29 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
output of acpidump
acpidump in a normal situation with 12-cell battery acpidump output in a normal situation with 6-cell battery customized DSDT with more debug info dsdt for my laptop |
Description
wilderjds
2009-05-31 08:57:36 UTC
Will you please attach the output of acpidump? It will be great if you can attach the output of "cat /proc/acpi/battery/BAT0/*" while booting with the different battery. Thanks. Created attachment 21655 [details]
output of acpidump
I'll attach cat BAT0/* with different batteries as soon as I will switch them again in ~2-3 hours. If the bogus values will persist, I'll do a fresh reboot and attach the output again
Created attachment 21657 [details]
acpidump in a normal situation with 12-cell battery
After one more suspend to RAM/resume cycle everything is back to normal;
# cat /proc/acpi/battery/BAT0/*
alarm: unsupported
present: yes
design capacity: 8800 mAh
last full capacity: 8765 mAh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 435 mAh
design capacity low: 304 mAh
capacity granularity 1: 131 mAh
capacity granularity 2: 8330 mAh
model number: Primary
serial number:
battery type: LION
OEM info: Hewlett-Packard
present: yes
capacity state: ok
charging state: discharging
present rate: 0 mA
remaining capacity: 2615 mAh
present voltage: 10618 mV
The attached file is the output of acpidump in this (normal) situation
ykzhao: do you need more infos? Created attachment 21669 [details]
acpidump output in a normal situation with 6-cell battery
# cat /proc/acpi/battery/BAT0/*
alarm: unsupported
present: yes
design capacity: 5100 mAh
last full capacity: 2507 mAh
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 125 mAh
design capacity low: 87 mAh
capacity granularity 1: 38 mAh
capacity granularity 2: 2382 mAh
model number: Primary
serial number:
battery type: LION
OEM info: Hewlett-Packard
present: yes
capacity state: ok
charging state: discharging
present rate: 0 mA
remaining capacity: 1481 mAh
present voltage: 11366 mV
It appears that when the battery is switched during a suspend/resume cycle, the acpi module does not (obviously) get the proper event and it does not query the battery on resume, so that the old values are still reported and used.
Is the battery info correct if you switch the battery while the system is in working state? Thanks. Yes, I did not reboot to obtain the previous outputs. I plugged in the ac adaptor and switched batteries. Thanks Jacopo this is part of the _BST AML code ... If (LEqual (Local0, 0x00)) { Return (Arg3) /* this is the right value */ } ... Store (Local0, Index (Arg3, 0x00)) Store (0x00, Index (Arg3, 0x01)) /* the "present rate" is cleared */ Store (Local2, Index (Arg3, 0x02)) Store (Local3, Index (Arg3, 0x03)) Return (Arg3) so I suspect that the _BST runs different code path when battery is changed during suspend. Created attachment 21680 [details]
customized DSDT with more debug info
please apply this custom DSDT, set CONFIG_ACPI_DEBUG,
rebuild your kernel and boot with acpi.debug_layer=0xffffffff, acpi.debug_level=0x07
please attach the dmesg output after
1. resume without battery change
2. the first resume with battery change
3. the second resume with battery change
I've been traveling for the past few days, I'll test as requested as soon as I am able to. thx ping wilderjds, any updates? Sorry for the delay, I've been quite busy in the last weeks. I am confused about the customized dsdt; In particular why should the provided dsdt work on my machine? I thought they were OEM specific; In case you want to have a look at it, I attach here my dsdt.dat obtained with # acpidump --table DSDT -b -o dsdt.dat Zhang Rui, could you please provide your original AND patched dsdt.dsl so that I can try and patch my DSDT accordingly? Thanks Created attachment 21961 [details]
dsdt for my laptop
you have already attached your acpidump in this bug report, and that's why I can get your DSDT table. the custom DSDT attached in comment #9 is made based on your dsdt table, so please feel free to apply it. :) ok thanks, and sorry for the dumb comment :P This bug appears to be filed against tux-on-ice hibernate. But bugzilla.kernel.org is for the upstream kernel, which does not contain tux-on-ice. So there are two paths forward: 1. report this to the tux-on-ice developers at http://www.tuxonice.net/ 2. reproduce this issue using the upstream kernel and re-open this bug report. |