Bug 6183 - Battery incorrectly detected as "absent" on boot
Summary: Battery incorrectly detected as "absent" on boot
Status: REJECTED DUPLICATE of bug 7200
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Vladimir Lebedev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-07 13:59 UTC by Jeroen Habraken
Modified: 2006-11-07 11:28 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.16-rc5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg from kernel (15.09 KB, text/plain)
2006-03-07 14:00 UTC, Jeroen Habraken
Details
acpidump output (107.51 KB, text/plain)
2006-03-08 05:58 UTC, Jeroen Habraken
Details
battery spy (2.92 KB, patch)
2006-04-06 08:09 UTC, Vladimir Lebedev
Details | Diff

Description Jeroen Habraken 2006-03-07 13:59:42 UTC
Most recent kernel where this bug did not occur: -
Distribution: Gentoo
Hardware Environment: Nec Versa P550
Software Environment: Unstable gentoo install
I have full ACPI support in my kernel, if I boot my pc from battery or ac
adapter I get: ACPI: Battery Slot [BAT1] (battery absent) in my dmesg. If I plug
in my ac, and then out again ( or out in out if it was in ) then the battery is
detected. It is a NEC Versa P550 btw. It knows there can be a battery in it, as
/proc/apci/battery/BAT1/state is there. Just says there's no battery there when
there is.

Reproducible: Always
Steps to Reproduce:
1. Compile kernel with acpi
2. Boot
3. have a look at /proc/acpi/battery/BAT1/state

Actual Results:  
battery absent

Expected Results:  
batteyr should be detected

Battery info after it is detected:
present:                 yes
design capacity:         4800 mAh
last full capacity:      4945 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 400 mAh
design capacity low:     197 mAh
capacity granularity 1:  64 mAh
capacity granularity 2:  64 mAh
model number:            PC-VP-WP66/OP-570-76620
serial number:
battery type:            Lion
OEM info:                NEC
Comment 1 Jeroen Habraken 2006-03-07 14:00:54 UTC
Created attachment 7527 [details]
dmesg from kernel

Dmesg from the latest development kernel with CONFIG_ACPI_DEBUG enabled
Comment 2 Daniel Drake 2006-03-07 14:11:54 UTC
Downstream report: http://bugs.gentoo.org/show_bug.cgi?id=105570
Comment 3 Vladimir Lebedev 2006-03-07 23:20:03 UTC

Do you have any problems with ac/battery state, I mean wrong system behaviour 
or something else, or you have wrong "battery absent" line in dmesg messages 
only?

Comment 4 Vladimir Lebedev 2006-03-07 23:31:49 UTC
What is the content of /proc/acpi/ac_adapter and /proc/acpi/battery files if 
you have "battery absent" message?


Comment 5 Jeroen Habraken 2006-03-07 23:35:47 UTC
Well, my battery note being seen implies; /proc/acpi/battery/BAT1/state saying:
present: no.
Most battery monitoring programs use this, meaning I don't know how empty my
battery is, and this makes it a problem. When I don't have my AC plugged in, I
would like to know the amount of power I have left, so I can shutdown correctly etc.
Comment 6 Jeroen Habraken 2006-03-07 23:49:59 UTC
Nice timing :)
Here is what you wanted to know:

1 - When booted with ac unplugged:
s050414 ~ # cat /proc/acpi/ac_adapter/ACAD/state
state:                   off-line
s050414 ~ # cat /proc/acpi/battery/BAT1/*
present:                 no
present:                 no
present:                 no

1.1 - When I then plug in AC:
s050414 ~ # cat /proc/acpi/ac_adapter/ACAD/state 
state:                   on-line
s050414 ~ # cat /proc/acpi/battery/BAT1/*
alarm:                   unsupported
present:                 yes
design capacity:         4800 mAh
last full capacity:      4689 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 400 mAh
design capacity low:     187 mAh
capacity granularity 1:  64 mAh
capacity granularity 2:  64 mAh
model number:            PC-VP-WP66/OP-570-76620
serial number:            
battery type:            Lion 
OEM info:                NEC 
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            0 mA
remaining capacity:      4689 mAh
present voltage:         18930 mV

2 - When booted with ac plugged in:
s050414 ~ # cat /proc/acpi/ac_adapter/ACAD/state 
state:                   on-line
s050414 ~ # cat /proc/acpi/battery/BAT1/*        
present:                 no
present:                 no
present:                 no

2.1 When I when unplug AC:
s050414 ~ # cat /proc/acpi/ac_adapter/ACAD/state 
state:                   off-line
s050414 ~ # cat /proc/acpi/battery/BAT1/*
alarm:                   unsupported
present:                 yes
design capacity:         4800 mAh
last full capacity:      4689 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 400 mAh
design capacity low:     187 mAh
capacity granularity 1:  64 mAh
capacity granularity 2:  64 mAh
model number:            PC-VP-WP66/OP-570-76620
serial number:            
battery type:            Lion 
OEM info:                NEC 
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            1945 mA
remaining capacity:      4533 mAh
present voltage:         18632 mV
Comment 7 Vladimir Lebedev 2006-03-08 01:59:14 UTC
Yes, this is a real problem.
What kernel version do you use?
Do you have any info on other kernels?
Please attach 'acpidump' output for the wrong state.
Comment 8 Jeroen Habraken 2006-03-08 05:35:56 UTC
I have this problem now with the 2.6.15-suspend2-r8 kernel (gentoo patches and
suspend2 patch), and with the vanilla kernel 2.6.16-r5 (the attached dmesg is
from that kernel). Had this problem before with an older kernel with gentoo
patches (it was 2.6.12 kernel).

How can I get an acpidump (Can't find a package called acpidump, and it's not
already installed on my system) ?
Comment 9 Jeroen Habraken 2006-03-08 05:58:42 UTC
Created attachment 7532 [details]
acpidump output

Found acpidump (Thanks Daniel).
Comment 10 Luming Yu 2006-03-11 09:01:49 UTC
Please try build kernel with preempt off, and re-test.

Comment 11 Jeroen Habraken 2006-03-12 00:44:01 UTC
Tryed it, changed CONFIG_PREEMPT to n, and recompiled, rebooted. Didn't change
anything. Tryed it for both the development kernel, as the suspend2-sources
(gentoo patches and suspend2 paches).
Comment 12 Maurizio Lombardi 2006-04-01 08:21:41 UTC
I have the same problem with 2.6.16 kernel version.

At boot sometimes i get the following errors:

----------------------------------
ACPI: read EC, OB not full
ACPI Exception (evregion-0409): AE_TIME, Returned by Handler for
[EmbeddedControl] [20060127]
ACPI Exception (dswexec-0458): AE_TIME, While resolving operands for
[AE_NOT_CONFIGURED] [20060127]
ACPI Error (psparse-0517): Method parse/execution failed
[\_SB_.PCI0.ISA_.EC0_.SMRD] (Node c122bbe0), AE_TIME
ACPI Error (psparse-0517): Method parse/execution failed
[\_SB_.PCI0.ISA_.EC0_.SMSL] (Node c122bb80), AE_TIME
ACPI Error (psparse-0517): Method parse/execution failed
[\_SB_.PCI0.ISA_.EC0_._Q09] (Node c122bae0), AE_TIME
--------------------------------

When it happens my laptop is unable to read battery remaining capacity level
Comment 13 Vladimir Lebedev 2006-04-06 08:09:41 UTC
Created attachment 7788 [details]
battery spy

Jeroen,

Please install and boot the latest stable kernel 2.6.16.1.
Check that problem persists.
Apply the battery patch.
Install and reboot the patched kernel.
Post the dmesg output, content of /proc/acpi/battery & /proc/acpi/ac_adapter
files and /var/log/acpid.
It will help us to understand and fix the problem.
Comment 14 Vladimir Lebedev 2006-04-06 20:40:00 UTC
Maurizio.

This is other problem. Please create the new bug.

> When it happens my laptop is unable to read battery remaining capacity level

Please describe it.
Comment 15 Jeroen Habraken 2006-04-07 03:42:40 UTC
At the moment I don't have my laptop, it is being fixed. It looks like the
battery fails to load, so it might simply have been that. I expect it back in a
week, and will let you know then.
Comment 16 Vladimir Lebedev 2006-05-16 08:55:26 UTC
No response from bug submitter, please reopen if problem persists. 
Comment 17 Jeroen Habraken 2006-11-07 11:28:49 UTC

*** This bug has been marked as a duplicate of 7200 ***

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