macbook battery info not readable, appears empty

Bug #215074 reported by Zach
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Daniel T Chen

Bug Description

Not clear how battery state gets read/reported, so reporting against linux, generically.

On my 2nd gen, C2D macbook, occasionally the battery state will be unreadable and appear to be at 0% charge. This condition persists across reboots. However, if I boot into OS X, the batter state appears as normal, and then, when booting back to Ubuntu, battery state works correctly again.

/proc/acpi/battery/BAT0/info:
present: yes
design capacity: 50200 mWh
last full capacity: 50290 mWh
battery technology: rechargeable
design voltage: 10950 mV
design capacity warning: 250 mWh
design capacity low: 100 mWh
capacity granularity 1: 10 mWh
capacity granularity 2: 10 mWh
model number: ASMB013
serial number:
battery type: LION013
OEM info: DPON013

/proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: 0 mW
remaining capacity: 49550 mWh
present voltage: 12504 mV

Next time it happens, I'll post the battery info and state.

Revision history for this message
Marcus Asshauer (mcas) wrote :

Thank you for reporting this bug. Please add your ubuntu version.

Changed in linux:
status: New → Incomplete
Revision history for this message
Zach (uid000) wrote :

Using Ubuntu 8.04 beta up to date as of 2008-04-10.

uname -a:
Linux tatooine 2.6.24-15-generic #1 SMP Tue Apr 8 00:33:51 UTC 2008 i686 GNU/Linux

lspci:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Unknown device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Network controller: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter (rev 01)
03:03.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

Marcus Asshauer (mcas)
Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
Anthony Mercatante (tonio) wrote :

I can confirm it worked only a few days ago... and suddenly stopped working....
I suspected latest hal-info package, but reinstalling previous version didn't help....
Maybe a hal dependancy or something ?

I use an up-to-date kubuntu hardy

Revision history for this message
Zach (uid000) wrote :

I was afraid this bug wasn't going to manifest itself again but, at last, it has.
As described above, the battery info and state are unreadable. At this point, I have powered off the computer and removed/reseated the battery and powered it back on. I also have rebooted several times.

As reported previously, If I reboot into OS X, that should put things right, but I haven't done that yet, in case anyone monitoring this bug would like me to post additional diagnostic details.

Below is the /proc/acpi/battery/BAT0/{info,state} while the bug is manifesting:

info:
present: yes
design capacity: 0 mWh
last full capacity: 0 mWh
battery technology: rechargeable
design voltage: 0 mV
design capacity warning: 250 mWh
design capacity low: 100 mWh
capacity granularity 1: 10 mWh
capacity granularity 2: 10 mWh
model number:
serial number:
battery type:
OEM info:

state:
present: yes
capacity state: ok
charging state: charging
present rate: 0 mW
remaining capacity: 0 mWh
present voltage: 0 mV

The proper battery info & state are posted in the original bug report.

I am on Ubuntu 8.04, up to date as of 2008-04-23
uname -a:
Linux tatooine 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

Revision history for this message
Antono Vasiljev (antono) wrote :

Same bug here.

MacBook2,1 (version 1.0)
Linux libero 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux

But I can't boot macos (removet it).
So my battery status always at 0%:

cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 0 mWh
last full capacity: 0 mWh
battery technology: rechargeable
design voltage: 0 mV
design capacity warning: 250 mWh
design capacity low: 100 mWh
capacity granularity 1: 10 mWh
capacity granularity 2: 10 mWh
model number:
serial number:
battery type:
OEM info:

Revision history for this message
Zach (uid000) wrote :

I wonder if booting from your OS X install disc will reset the battery info.

Revision history for this message
theo (jacco-meijer-redmouse) wrote :

Linux 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux

Same here, resetting the System Management Controller (SMC) makes the battery info come back but not for long. One or two reboots and the problem is back.

Here's howto reset the SMC:
http://support.apple.com/kb/HT1411

Revision history for this message
Sebastian Busch (webmaster-thamnos) wrote :

I confirm, too. Battery state at 0%, charging / discharging works fine, though. Booting into OS X (I was prompted there to install several updates and did so) resolved the problem.

MacBook2,1
Ubuntu 8.04, uname -a:
Linux macbook 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Antono Vasiljev (antono) wrote :

I resetted the SMC as descirbed here (http://support.apple.com/kb/HT1411) and problem has gone.

I haven't met this problem with updated kernel:
Linux libero 2.6.24-21-generic #1 SMP Mon Aug 25 17:32:09 UTC 2008 i686 GNU/Linux

antono@libero:~> cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 50200 mWh
last full capacity: 50240 mWh
battery technology: rechargeable
design voltage: 10950 mV
design capacity warning: 250 mWh
design capacity low: 100 mWh
capacity granularity 1: 10 mWh
capacity granularity 2: 10 mWh
model number: ASMB013
serial number:
battery type: LION013
OEM info: DPON013

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

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
theo (jacco-meijer-redmouse) wrote :

Problem remains with kernel 2.6.27
Linux 2.6.27-6-generic #1 SMP Tue Oct 7 04:15:04 UTC 2008 i686 GNU/Linux

Revision history for this message
theo (jacco-meijer-redmouse) wrote :

Updating the kernel from 2.6.27-6 to 2.6.27-7 solves the problem here.
Linux 2.6.27-7-generic #1 SMP Tue Oct 14 18:40:44 UTC 2008 i686 GNU/Linux

Revision history for this message
Zach (uid000) wrote :

Theo said:
"Updating the kernel from 2.6.27-6 to 2.6.27-7 solves the problem here."

Are you able to produce the problem consistently enough to know that it is solved? I haven't had the problem in a while, but while I was having it, it was very intermittent and sometimes go months in between.

Revision history for this message
theo (jacco-meijer-redmouse) wrote :

@Zach

Unfortunatley I can't reproduce the problem consistently. Here is why I assume it's solved in my case:

The battery indicator never worked the way I expeced it to work. For example setting it to ony display the icon when charging or discharging didn't work. The icon could be there when it was not charging or discharging and the icon could be not there when charging.

I've had the icon working for months correctly as well, but not since hardy. When using hardy the icon always stopped working within three times booting. Where I boot and shutdown my system practically every day. Resetting the SMC made the indicator work again.

When updating to intrepid beta I hoped the problem was solved. I've reset the SMC but booting for the second time made the icon stop working. The kernel then was 2.6.27-6.

Last week I noticed the icon stayed. Setting the icon to ony display when charging or discharging worked. And remained while I've booted at least 15 times.

Unfortunately this still could be a happy coincidence. I'll let you know if the icon fails again after all.

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

I'm going to mark this "Fix Released" for now. If the issue returns, feel free to set the status back to "New". Thanks.

Changed in linux:
status: Confirmed → Fix Released
Revision history for this message
theo (jacco-meijer-redmouse) wrote :

The bug is back. I've been updating the Inetrepid packages daily.

On oktober 30 I noticed the bug was back. I've reset the SMC which made it seem OK. Not for long.

I've updated to intrepid final. Same pattern as before. One or two reboots and the battery indicator gets lost.

It feels like it's something in one of the intrepid packages that were added to the repository around oktober 29th. As mentioned before, it can be total random either, though I find that unlikely.

Linux 2.6.27-7-generic #1 SMP Thu Oct 30 04:18:38 UTC 2008 i686 GNU/Linux

Changed in linux:
status: Fix Released → New
Revision history for this message
bitinerant (bitinerant) wrote :

Perhaps this problem has something to do with the battery calibration.

I experience this problem in Ubuntu 7.04, 7.10, and 8.04. A while back, I read something about Apple's recommendation to occasionally allow the MacBook battery to completely discharge and then recharge in order to recalibrate. (I think this may help prolong the battery's life anyhow.) On June 26, I shut down Ubuntu, booted OS X, changed the power settings so that it would never shut off if left idol on battery power, and went to bed. In the morning, as hoped, the battery was completely depleted (according to the lights on the bottom of the physical battery). I turned on the computer, booted OS X, and I let it charge to about 17%.

Then I rebooted into Ubuntu and the battery icon has worked well ever since (over 4 months now)! I don't think I have even booted into OS X since then. (I am currently running Ubuntu 8.04 on a MacBook2,1.)

Revision history for this message
Daniel T Chen (crimsun) wrote :

theo/tonio, if you follow bitinerant's procedure of completely discharging the battery in os x and then allowing it to charge partially in os x, then reboot into Ubuntu 8.10/9.04, is this symptom reproducible?

Changed in linux:
assignee: nobody → crimsun
status: New → Incomplete
Revision history for this message
theo (jacco-meijer-redmouse) wrote :

I haven't got a clue on how to reprocude this bug. Thereby, behaviour changed. It's been good for several weeks now. I suggest closing this bug until we find out how to reproduce the bug.

Revision history for this message
bitinerant (bitinerant) wrote :

I should say that a couple of weeks after I wrote the above description, the problem did re-occur, and at that point I had upgraded to 8.10. This time I discharged from 100% to 75% in OS X; we'll see how long that 'fixes' it.

Revision history for this message
bitinerant (bitinerant) wrote :

This seems to be the same problem described on http://ubuntuforums.org/showthread.php?t=502674

It says it is solved by resetting the SMC to factory defaults (http://support.apple.com/kb/HT1411?viewlocale=en_US). However, this seems like a work-around rather than a solution.

Revision history for this message
Alessio Bolognino (themolok) wrote :

The bug is still here, what info do you need?

cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charging
present rate: 0 mW
remaining capacity: 0 mWh
present voltage: 0 mV

I'm using a MacBook 2,1. I'm not sure how to reproduce it but it happens quite often.

Revision history for this message
polycarbonate1 (polycarbonate1-deactivatedaccount) wrote :
Revision history for this message
Alessio Bolognino (themolok) wrote :

For the record the bug is still present in Lucid

Revision history for this message
Alessio Bolognino (themolok) wrote :

May I ask why the status of this bug is still "Incomplete"?

Revision history for this message
Sir_Spot_A_Lot (mailing54) wrote :

I can confirm that this annoying bug has been present for a while now and is still present in 10.04 on my second generation macbook.

Booting into OSX fixes the issue. My guess is that something related to suspend/resume triggers it, also the connection to the external power supply might be of influence. IIRC, I could trigger this behaviour by suspending while connected to the powersupply, disconnect, resume. Maybe someone else can confirm this or play around.

Revision history for this message
spbrereton (simon-brereton) wrote :

I have exactly the same issue as reported in comment 22. (and second the comments in 24, and the query in 25).

$ cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: discharging
present rate: 0 mW
remaining capacity: 0 mWh
present voltage: 0 mV

Revision history for this message
spbrereton (simon-brereton) wrote :

And it's not related to 23 as far as I can tell..

Revision history for this message
Chris Chernesky (chernesk) wrote :

I have the same issue on a Macbook Pro 2,2.

Does anyone know if people are working on this issue? I'm glad to contribute in any way possible. This bug makes it really hard for me to use my Macbook with Ubuntu on it when it's not plugged in. I'm glad to do whatever I can do to help it get resolved so that we all can be more productive on our Macbooks.

Thanks for a great distro. Ubuntu rocks!

Revision history for this message
Chris Chernesky (chernesk) wrote :

Updating from my system. Booting into OS X shows 90% remaining, but booting into Ubuntu shows 15%. Mine is not like the ones above, right now, that show 0%, but I've had that before as well. The time remaining is actually pretty close on both systems.

If I reset the SMC, Ubuntu will then show the correct percent remaining and that'll last for a few suspend cycles and then it'll go back to what I'm experiencing now.

Any thoughts?

Revision history for this message
Nikolaj Sheller (nikolajsheller) wrote :

I'm seeing this issue on a macbook 2,1 C2D:
~$ uname -a
Linux AppleCider 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux

When I remove the power cable the machine suspends as it is convinced there is no power on the battery (it is fully charged according to the indicator on the battery itself).

~$ less /proc/acpi/battery/BAT0/info
present: yes
design capacity: 0 mWh
last full capacity: 0 mWh
battery technology: rechargeable
design voltage: 0 mV
design capacity warning: 250 mWh
design capacity low: 100 mWh
cycle count: 0
capacity granularity 1: 10 mWh
capacity granularity 2: 10 mWh
model number:
serial number:
battery type:
OEM info:

~$ less /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charging
present rate: 0 mW
remaining capacity: 0 mWh
present voltage: 0 mV

As has been mentioned before, this is an intermittent error and I don't know how to reproduce it.

Revision history for this message
Alan Aversa (aversa) wrote :

Yes, I can confirm "Nikolaj Sheller" who "wrote on 2011-02-05."

Revision history for this message
Graham Seaman (graham-theseamans) wrote :

I have the same intermittent problem on gentoo with a 2nd gen Macbook. I have had it on kernels between 2.6.39 and 3.2.1. The battery status is always at 0% (so without mains connected it always hibernates immediately). Booting into OSX fixes the problem temporarily. While it is 'fixed' all the battery readings seem sensible.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers