Bug 16109 - (Solved) ACPI shows the battery capacity is 0% and fully charged, sometimes not detected, sometimes no AC adapter is detected
Summary: (Solved) ACPI shows the battery capacity is 0% and fully charged, sometimes n...
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: EC (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 19:13 UTC by Jose Maria de Pedro
Modified: 2011-03-23 02:38 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.32.11-pclos2.bfs
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmesg file R700 (42.37 KB, text/plain)
2010-06-02 19:13 UTC, Jose Maria de Pedro
Details
acpidump output (100.93 KB, text/plain)
2010-06-04 13:13 UTC, Jose Maria de Pedro
Details
custom UPBS method (666 bytes, application/octet-stream)
2010-06-29 07:40 UTC, Zhang Rui
Details
dmesg -c output (122.05 KB, text/plain)
2010-08-11 11:52 UTC, Jose Maria de Pedro
Details
dmesg output when the ac adapter is plugged (118.85 KB, text/plain)
2010-08-11 11:57 UTC, Jose Maria de Pedro
Details
dmesg output when the ac adapter is unplugged (118.84 KB, text/plain)
2010-08-11 11:58 UTC, Jose Maria de Pedro
Details
dmidecode of laptop R700-U.AP79B (8.98 KB, text/plain)
2010-12-27 16:15 UTC, Jose Maria de Pedro
Details

Description Jose Maria de Pedro 2010-06-02 19:13:29 UTC
Created attachment 26622 [details]
dmesg file R700

ACPI shows the battery capacity is 0% and fully charged, sometimes not detected,other times shows it OK, sometimes no AC adapter is detected.

Hardware: Laptop R700-U.AP79B
Chipset: Intel PM965
Software: PCLinuxOS 2010.1
Kernel: 2.6.32.11-pclos2.bfs

I used 'acpi' to see the status in a console.
I tried another GNU-Linux distros with the same kernel and the result is the same.
I tried other kernels in the 2.6.27 it work fine but with the 2.6.32.11.bfs and the 2.6.33.4.bfs no work.

Thanks

dmesg | grep ACPI

 BIOS-e820: 00000000bffb0000 - 00000000bffbe000 (ACPI data)
 BIOS-e820: 00000000bffbe000 - 00000000bfff0000 (ACPI NVS)
ACPI: RSDP 000f89e0 00014 (v00 LGE   )
ACPI: RSDT bffb0000 00040 (v01 LGE    LGPC     20071120 MSFT 00000097)
ACPI: FACP bffb0200 00084 (v02 LGE    LGPC     20071120 MSFT 00000097)
ACPI: DSDT bffb05b0 04E25 (v01 LGE    LGPC     00000000 INTL 20051117)
ACPI: FACS bffbe000 00040
ACPI: APIC bffb0390 0005C (v01 LGE    LGPC     20071120 MSFT 00000097)
ACPI: MCFG bffb03f0 0003C (v01 LGE    LGPC     20071120 MSFT 00000097)
ACPI: SLIC bffb0430 00176 (v01 LGE    LGPC     20071120 MSFT 00000097)
ACPI: OEMB bffbe040 00071 (v01 LGE    LGPC     20071120 MSFT 00000097)
ACPI: HPET bffb53e0 00038 (v01 LGE    OEMHPET  20071120 MSFT 00000097)
ACPI: SSDT bffbe960 004E6 (v01  PmRef    CpuPm 00003000 INTL 20051117)
ACPI: Local APIC address 0xfee00000
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0xffffffff base: 0xfed00000
ACPI: Checking initramfs for custom DSDT
ACPI: Core revision 20090903
ACPI: bus type pci registered
ACPI: EC: Look up EC in DSDT
ACPI: Executed 1 blocks of module-level executable AML code
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S4 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: MCFG area at e0000000 reserved in ACPI motherboard resources
ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62
ACPI Warning: Incorrect checksum in table [OEMB] - 58, should be 83 (20090903/tbutils-314)
ACPI: No dock devices found.
ACPI: PCI Root Bridge [PCI0] (0000:00)
pci 0000:00:1f.0: quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P8._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P2._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P6._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P7._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11 12 14 *15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs *3 4 5 6 7 10 11 12 14 15)
PCI: Using ACPI for IRQ routing
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 13 devices
ACPI: ACPI bus type pnp unregistered
ACPI: Lid Switch [LID0]
ACPI: Power Button [PWRB]
ACPI: Power Button [PWRF]
ACPI: AC Adapter [ADP1] (on-line)
ACPI: SSDT bffbe190 0027A (v01  PmRef  Cpu0Ist 00003000 INTL 20051117)
ACPI: SSDT bffbe4a0 004B6 (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
ACPI: SSDT bffbe0c0 000C8 (v01  PmRef  Cpu1Ist 00003000 INTL 20051117)
ACPI: SSDT bffbe410 00085 (v01  PmRef  Cpu1Cst 00003000 INTL 20051117)
ACPI: Thermal Zone [THRM] (55 C)
ACPI: Battery Slot [BAT1] (battery present)
ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
Comment 1 Zhang Rui 2010-06-04 03:21:47 UTC
Please attach the acpidump of your laptop.
Please attach the output of "grep . /proc/acpi/battery/*/*" when you think it's working/broken.

> sometimes no AC adapter is detected.

BTW, do you mean there is no notification when AC is plugged/unplugged?
Comment 2 Jose Maria de Pedro 2010-06-04 13:13:13 UTC
Created attachment 26649 [details]
acpidump output
Comment 3 Jose Maria de Pedro 2010-06-04 13:25:41 UTC
Hi

When I do 'acpidump > acpidump.txt' displays this error 'Wrong checksum for generic table!' and with 'dmesg' displays this error 'ACPI Warning: Incorrect checksum in table [OEMB] - 58, should be 83 (20090903/tbutils-314)'

I attached acpidump output

grep . /proc/acpi/battery/*/*

/proc/acpi/battery/BAT1/alarm:alarm:                   unsupported
/proc/acpi/battery/BAT1/info:present:                 no
/proc/acpi/battery/BAT1/state:present:                 yes
/proc/acpi/battery/BAT1/state:capacity state:          ok
/proc/acpi/battery/BAT1/state:charging state:          charged
/proc/acpi/battery/BAT1/state:present rate:            unknown
/proc/acpi/battery/BAT1/state:remaining capacity:      unknown
/proc/acpi/battery/BAT1/state:present voltage:         10000 mV


The battery is charged, when I see other state I will send it to you.


do you mean there is no notification when AC is plugged/unplugged?

No, the AC adapter is always plugged, but acpi shows that sometimes is plugged and sometimes it isn't.

Thanks
Comment 4 Jose Maria de Pedro 2010-06-05 10:35:32 UTC
Another battery state: Battery full and it shows all OK

[usuario@localhost BAT1]$ grep . *
alarm:alarm:                   unsupported
info:present:                 yes
info:design capacity:         4800 mAh
info:last full capacity:      3800 mAh
info:battery technology:      rechargeable
info:design voltage:          11100 mV
info:design capacity warning: 0 mAh
info:design capacity low:     0 mAh
info:capacity granularity 1:  1 mAh
info:capacity granularity 2:  1 mAh
info:model number:            MS-1719
info:serial number:           
info:battery type:            LION
info:OEM info:                MSI Corp.
state:present:                 yes
state:capacity state:          ok
state:charging state:          charged
state:present rate:            0 mA
state:remaining capacity:      3800 mAh
state:present voltage:         12531 mV
Comment 5 Jose Maria de Pedro 2010-06-06 00:46:08 UTC
The battery is charged,but ACPI shows this 55339mV (55 V battery voltage)

alarm:present:                 no
info:present:                 yes
info:design capacity:         2322 mAh
info:last full capacity:      49166 mAh
info:battery technology:      rechargeable
info:design voltage:          55339 mV
info:design capacity warning: 0 mAh
info:design capacity low:     0 mAh
info:capacity granularity 1:  1 mAh
info:capacity granularity 2:  1 mAh
info:model number:            MS-1719
info:serial number:           
info:battery type:            LION
info:OEM info:                MSI Corp.
state:present:                 yes
state:capacity state:          ok
state:charging state:          charging
state:present rate:            2304 mA
state:remaining capacity:      14 mAh
state:present voltage:         55344 mV
Comment 6 Zhang Rui 2010-06-07 06:43:29 UTC
(In reply to comment #3)
> 
> do you mean there is no notification when AC is plugged/unplugged?
> 
> No, the AC adapter is always plugged, but acpi shows that sometimes is
> plugged
> and sometimes it isn't.
> 
so you mean that sometimes the AC status is unplugged even if the AC adapter is always plugged, right?

                        Method (_PSR, 0, NotSerialized)
                        {
                            Return (POWS)
                        }

so POWS is not correct sometimes.

I think this is the root cause of the Battery problems as well, as _BST return value varies when POWS is cleared/set.
Comment 7 Jose Maria de Pedro 2010-06-07 14:07:22 UTC

>so you mean that sometimes the AC status is unplugged even if the AC adapter
>is
always plugged, right?

Yes, that is.

Well, then what I do with:
                        Method (_PSR, 0, NotSerialized)
                        {
                            Return (POWS)
                        }

Usually , battery state doesn't work very often, the AC adapter sometimes.

Thanks for your help.
Comment 8 Zhang Rui 2010-06-08 02:49:59 UTC
(In reply to comment #7)
> 
> Usually , battery state doesn't work very often, the AC adapter sometimes.
> 
is there any case that the AC adapter status is correct but the battery status is broken?
If yes,please attach the ac/battery status in that case.
Comment 9 Jose Maria de Pedro 2010-06-09 15:27:02 UTC
The ac-adapter is OK and the battery shows a 0% of charge.


[user@localhost ac_adapter]$ cat /proc/acpi/ac_adapter/ADP1/state 
state:                   on-line
[user@localhost ac_adapter]$ cat /proc/acpi/battery/BAT1/state 
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            2304 mA
remaining capacity:      14 mAh
present voltage:         55344 mV
Comment 10 Jose Maria de Pedro 2010-06-09 15:33:34 UTC
Add to Comment #9 

The ac-adapter us plugged and the battery is charged 100%

Thanks
Comment 11 Jose Maria de Pedro 2010-06-14 07:36:02 UTC
Like you said I tried to plug and unplug the ac-adapter. And sometimes when I turn on the laptop (plugged and the battery charged 100%) shows all OK,then I unplug the ac-adapter and it shows OK,in 1-2 minutes the battery shows charged 0% but battery detected, then I unplug the ac-adapter and it shows the battery isn't present.
Comment 12 Zhang Rui 2010-06-29 07:40:31 UTC
Created attachment 26969 [details]
custom UPBS method

please
1. build a kernel later than 2.6.34 with CONFIG_ACPI_DEBUG set.
2. reboot with acpi.debug_layer=0x80 acpi.debug_level=0x06
3. dmesg -c
4. get the AC & battery state
5. attach the dmesg output when AC is online/offline
Comment 13 Jose Maria de Pedro 2010-07-02 14:28:17 UTC
Do I anything with this file custom UPBS method   (666 bytes, application/octet-stream)?

Thanks
Comment 14 Zhang Rui 2010-07-05 07:13:15 UTC
(In reply to comment #13)
> Do I anything with this file custom UPBS method   (666 bytes,
> application/octet-stream)?
> 
oops, please follow the steps below.

(In reply to comment #12)
> Created an attachment (id=26969) [details]
> custom UPBS method
> 
> please
> 1. build a kernel later than 2.6.34 with CONFIG_ACPI_DEBUG set.
> 2. reboot with acpi.debug_layer=0x80 acpi.debug_level=0x06
> 3. dmesg -c

4. mount debugfs
5. the custom UPBS file by running "cat UPBS.aml > /sys/kernel/debug/acpi/custom_method"

> 4. get the AC & battery state
> 5. attach the dmesg output when AC is online/offline
Comment 15 Jose Maria de Pedro 2010-08-11 11:52:51 UTC
Created attachment 27404 [details]
dmesg -c output
Comment 16 Jose Maria de Pedro 2010-08-11 11:57:03 UTC
Created attachment 27405 [details]
dmesg output when the ac adapter is plugged
Comment 17 Jose Maria de Pedro 2010-08-11 11:58:20 UTC
Created attachment 27406 [details]
dmesg output when the ac adapter is unplugged
Comment 18 Jose Maria de Pedro 2010-08-11 11:59:06 UTC
Sorry, I have had lot of problems with the Kernel's compilation,I've finaly not been able to make it work the system graphic fine with my nvidia.I did everything from console.

1. build a kernel later than 2.6.34 with CONFIG_ACPI_DEBUG set.

I've begun compiling 2.6.35.rc5.git3, I've finished doing it with 2.6.35 stable.I've not found the CONFIG_ACPI_DEBUG option but I've actived all the options in ACPI menu in make menuconfig

2. reboot with acpi.debug_layer=0x80 acpi.debug_level=0x06

I've inserted these options in my menu.lst archive

3. dmesg -c

In the file dmesg_c.txt

4. mount debugfs

I've mounted with 'mount -t debugfs nonedebugs /sys/kernel/debug'

5. the custom UPBS file by running "cat UPBS.aml >
/sys/kernel/debug/acpi/custom_method"

I did it without errors

4. get the AC & battery state

The problem persists , all is equal

> 5. attach the dmesg output when AC is online/offline

They are in the dmesg_ac_on.txt and dmesg_ac_off.txt

there is something else,when I always quit the ac_adapter the battery shows as if It's not present ( It is always plugged)
Comment 19 Jose Maria de Pedro 2010-12-09 19:59:36 UTC
Hi Zhang

Several months ago I probed kernel 2.6.35 stable without changes in battery problem,after I'd been probing others kernels still 2.6.37.rc3, now I have the same problem, Can I do anything more?

Thank you very much
Comment 20 Zhang Rui 2010-12-27 01:19:53 UTC
so this is a regression, right?
Please attach the dmidecode of your laptop.
Comment 21 Jose Maria de Pedro 2010-12-27 16:15:21 UTC
Created attachment 41732 [details]
dmidecode of laptop R700-U.AP79B
Comment 22 Jose Maria de Pedro 2010-12-27 21:54:09 UTC
Yes, for me is a regression
Comment 23 Jose Maria de Pedro 2011-03-05 14:38:18 UTC
Can I do anything more?

I am trying the latest kernels.
Comment 24 Jose Maria de Pedro 2011-03-22 15:31:47 UTC
I've tried kernel 2.6.37.4 and all it work very fine.

A lot of thanks for your work.

I modify the post title like solved.

Note You need to log in before you can comment on or make changes to this bug.