No battery detected in Alpha2

Bug #178125 reported by Cold
6
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
Ubuntu
Invalid
Undecided
Unassigned
linux (Fedora)
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: linux-image-2.6.24-2-generic

Adapter detection works great as does brightness control.
But the battery is just not detected on my notebook a MSI PR200

maarten@MSI-PR200:~$ acpi -V
     Thermal 1: ok, 51.0 degrees C
  AC Adapter 1: off-line

maarten@MSI-PR200:~$ acpi -V
     Thermal 1: ok, 52.0 degrees C
  AC Adapter 1: on-line

On 8.04 A1 it did work but the power management kept switching between AC end battery.

On 8.04 Alpha1:
root@ubuntu:/home/ubuntu# acpi -V
     Battery 1: charging, 64%, 00:49:32 until charged
     Thermal 1: ok, 50.0 degrees C
  AC Adapter 1: on-line

root@ubuntu:/proc/acpi/battery# cat BAT1/info
present: yes
design capacity: 786 mAh
last full capacity: 49170 mAh
battery technology: rechargeable
design voltage: 8504 mV
design capacity warning: 0 mAh
design capacity low: 0 mAh
capacity granularity 1: 1 mAh
capacity granularity 2: 1 mAh
model number: MS-1221

serial number:

battery type: LION

OEM info: MSI Corp.

root@ubuntu:/proc/acpi/battery/BAT1# cat state
present: yes
capacity state: ok
charging state: charging
present rate: 777 mA
remaining capacity: 12812 mAh
present voltage: 25919 mV

Cold (maartenlameris)
description: updated
Revision history for this message
anagor (anagor) wrote :

second that.
On MSI EX600
I get the same output from acpi as Cold submitted.
Did a fresh install of alpha2 to check this out.

Revision history for this message
anagor (anagor) wrote :

Just tried it out with fedora 8/9:
under the 2.6.23 kernel the battery is detected, but not under 2.6.24-rc6
it seems like a bug in the 2.6.24 kernel.

Revision history for this message
impact (impact-atlas) wrote :

I have the same problem with Hardy Heron Alpha 2 and MSI GX700. The good thing is that the following bug https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/147560 appears to be fixed in alpha 2 (I haven't been able to reproduce it). The bad thing is the battery isn't detected properly.

I have attached a dmesg.txt - it contains these suspicious lines:

[ 24.168076] ACPI Error (evregion-0316): No handler for Region [EC__] (ffff81007dc1ddc0) [EmbeddedControl] [20070126]
[ 24.168080] ACPI Error (exfldio-0289): Region EmbeddedControl(3) has no handler [20070126]
[ 24.168084] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC__.BAT1._STA] (Node ffff81007bc33b00), AE_NOT_EXIST

/proc/acpi/battery/ doesn't contain neither BAT0 nor BAT1

Revision history for this message
anagor (anagor) wrote :

Well further investigation led me to the exact errors as "impact" wrote and to conclusion that maybe MSI is the faulty party here I'm currently trying to learn the ASL language and ACPI specifications to try and inderstand/repair a DSDT table.

impact: it will help if you can submit your DSDT here or to my email, just execute in console
$ cat /proc/acpi/dsdt > dsdt.raw
and send/submit the resulting file.

Revision history for this message
impact (impact-atlas) wrote :

Here's the dsdt dump. Decompilation will give you one error (compiler related - not an actual fault in the dsdt table, just reserved variable name) and some warnings related to unhandled timeouts.

Revision history for this message
anagor (anagor) wrote :

This is bugs me, its hard to believe that we 3 people are the only ones that affected.
I looked over impact's dsdt and mine thoroughly and wasn't able to find any errors in the device(BAT1):method(_STA) section or the ones that related.
Maybe there is a specific implementation of MSI that throws this errors, but than again it will affect many others along with any LG laptop owners,since MSI is making them also.

I'm running now a 2.6.22-10-generic kernel from Gutsy, and the battery is detected and dmesg doesn't show any ACPI related errors.
So there is obviously something wrong with ACPI code in 2.6.24 kernel, I've tried openSuse and fedora and they also show the same errors when ran from 2.6.24 and 2.6.23 kernels, but work fine with 2.6.22.

I saw many related errors on the internet, but they all apply to much older kernels.
Is there any more info we can give to help kernel developers?

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi All,

Thanks for all of your comments. Per the kernel team's bug policy, can you please attach the following information. Please be sure to attach each file as a separate attachment.

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies

It does sound like this is a regression from 2.6.22. If any of you are ambitious and willing, it would be very helpful if you could do the following:

1) Verify this bug exists in the upstream mainline kernel. Steps to build and boot the mainline kernel can be found here: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
2) Perform a git-bisect to narrow down the offending patch which causes the regression. Refer to the following link for help: http://www.kernel.org/doc/local/git-quick.html
3) Lastly, if the bug does exist upstream, it would be great to also open an upstream bugzilla report. Refer to the "Reporting Bugs Upstream" section from https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

Thanks again and we appreciate your help and feedback.

Changed in linux:
status: New → Incomplete
Revision history for this message
impact (impact-atlas) wrote :

uname -a > uname-a.log

Revision history for this message
impact (impact-atlas) wrote :

cat /proc/version_signature > version.log

Revision history for this message
impact (impact-atlas) wrote :

dmesg > dmesg.log

Revision history for this message
impact (impact-atlas) wrote :

sudo lspci -vvnn > lspci-vvnn.log

Revision history for this message
anagor (anagor) wrote :

dmesg

Revision history for this message
anagor (anagor) wrote :

lspci -vvnn

Revision history for this message
anagor (anagor) wrote :

uname

Revision history for this message
anagor (anagor) wrote :

I do believe it's an upstream bug,
since the same bugs shows in Fedora 2.6.24 kernel,openSUSE 2.6.24 kernel and Debian/expiremental 2.6.24 kernel.
But it doesn't show in 2.6.22 or 2.6.23 kernels for any of the mentioned distro's.

I will try to compile the mainline kernel to confirm.

Revision history for this message
anagor (anagor) wrote :

OK, I've submitted the bug on kernel.org since the latest mainline kernel also have the exact problem.
here is the link:
http://bugzilla.kernel.org/show_bug.cgi?id=9697
also attached is the dmesg of that kernel.

Revision history for this message
Cold (maartenlameris) wrote :

Updating to Ubuntu kernel 2.6.26-4 dit not solve the problem

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Anagor, thanks for testing the upstream kernel and making a bug report at the kernel bugzilla. It appears you have confirmed that the patch upstream will resolve this issue. I am reassigning to the kernel team. Thanks!

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Also including upstream git commit id and log info:

ogasawara@yoji:~/linux-2.6$ git log -p c04209a7948b95e8c52084e8595e74e9428653d3

commit c04209a7948b95e8c52084e8595e74e9428653d3

Author: Alexey Starikovskiy <email address hidden>

Date: Tue Jan 1 14:12:55 2008 -0500

    ACPI: EC: Enable boot EC before bus_scan

    Some _STA methods called during bus_scan() might require EC region handler,

    which might be enabled later in the scan.

    Enable it explicitly before scan to avoid errors.

    Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9627

    Signed-off-by: Alexey Starikovskiy <email address hidden>

    Signed-off-by: Len Brown <email address hidden>

Changed in linux:
status: Unknown → Invalid
Revision history for this message
Ben Collins (ben-collins) wrote :

Marking as in progress, since Tim is working to rebase with upstream, which will automatically include this patch.

Changed in linux:
assignee: ubuntu-kernel-team → timg-tpi
status: Triaged → In Progress
Changed in linux:
status: Unknown → Fix Released
Changed in linux:
status: New → Invalid
Revision history for this message
impact (impact-atlas) wrote :

After today's update and a reboot, my laptop succesfully detected it's battery. :)

cat /proc/acpi/battery/BAT1/state

present: yes
capacity state: ok
charging state: charged
present rate: 0 mA
remaining capacity: 4736 mAh
present voltage: 12435 mV

Revision history for this message
impact (impact-atlas) wrote :

Forgot to add - the kernel version is 2.6.26-5.

Revision history for this message
impact (impact-atlas) wrote :

dmesg shows new ACPI errors tho

[ 266.107185] ACPI Exception (evregion-0420): AE_TIME, Returned by Handler for [EmbeddedControl] [20070126]
[ 266.107202] ACPI Exception (dswexec-0462): AE_TIME, While resolving operands for [OpcodeName unavailable] [20070126]
[ 266.107220] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC__.BAT1.UPBS] (Node ffff81007c350bc0), AE_TIME
[ 266.107305] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC__.BAT1._BST] (Node ffff81007c350b40), AE_TIME
[ 266.107378] ACPI Exception (battery-0356): AE_TIME, Evaluating _BST [20070126]

Revision history for this message
Tim Gardner (timg-tpi) wrote :

as of 2.6.24-7.12

Changed in linux:
assignee: timg-tpi → nobody
milestone: none → hardy-alpha-5
status: In Progress → Fix Released
Revision history for this message
impact (impact-atlas) wrote :

The last update to 2.6.24-7-generic made the battery info a lot more stable, however it is still not perfect - usually during charging when the battery is nearly full and the charging is about to stop, battery info starts going crazy, also the well-know ac adapter plugged/unplugged loop happens every now and then.

There's another related kernel bug reported and being investigated here: http://bugzilla.kernel.org/show_bug.cgi?id=9823

Changed in linux:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.