Laptop battery indicator indicates 0% charge when fully charged

Bug #405148 reported by Richard Cavell
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
DeviceKit-Power
New
Undecided
Unassigned
gnome-power
Invalid
Undecided
Unassigned
devicekit-power (Ubuntu)
Triaged
Undecided
Unassigned
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

[Please adjust the package choice if I got it wrong.]

richard@richard-laptop:~$ uname -a
Linux richard-laptop 2.6.31-4-generic #22-Ubuntu SMP Fri Jul 24 18:05:56 UTC 2009 x86_64 GNU/Linux

I'm on a 2nd generation 15 inch white MacBook (not Pro, not Air). 64-bit Karmic alpha 3 with all updates applied. In OS X I have applied the latest Battery firmware (which is 1.4).

In my panel, there's a laptop battery indicator. My battery is fully charged - I have had it plugged into AC all day and it has an external charge indicator which allows me to verify that it is 100% charged. Yet, the indicator clearly reads 0.0%. Screenshot should verify this.

The applet has correctly identified that my AC was plugged in when this screenshot was taken. If I unplug AC power, it changes to the icon without the plug, and a red minimum-charge indication.

Revision history for this message
Richard Cavell (richardcavell) wrote :
affects: gnome-panel (Ubuntu) → gnome-power-manager (Ubuntu)
Revision history for this message
Scott Howard (showard314) wrote :

Thanks for the report. In Karmic could you run the following:
apport-collect 405148
with the AC adapter plugged in?

Also, is this a regression? Could you test this with Jaunty to confirm that it worked in Jaunty? Thanks in advance.

Changed in gnome-power-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Richard Cavell (richardcavell) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.27.2-0ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_AU.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-4.22-generic
Uname: Linux 2.6.31-4-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Revision history for this message
Richard Cavell (richardcavell) wrote :
Changed in gnome-power-manager (Ubuntu):
status: Incomplete → New
tags: added: apport-collected
Revision history for this message
Richard Cavell (richardcavell) wrote :

apport-collect has done its thing, with the AC adapter plugged in.

I have used Jaunty extensively and I never had this problem in Jaunty.

Richard

Revision history for this message
Scott Howard (showard314) wrote :

from devicekit-power -dump:

Device: /org/freedesktop/DeviceKit/Power/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  power supply: yes
  updated: Tue Jul 28 09:33:38 2009 (7 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: charging
    energy: 0 Wh
    energy-empty: 0 Wh
    energy-full: 0 Wh
    energy-full-design: 0 Wh
    energy-rate: 0 W
    percentage: 0%

no information is getting to GPM, it appears to be a bug with the HAL/DKP switch since this wasn't a problem in Jaunty. Assigning devicekit-power

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Richard Cavell (richardcavell) wrote :

Scott,

I'm adding a screenshot of "Power Statistics - Device Information", which I can access by right clicking on the power icon.

By the way, my battery has external lights that tell me not only the charge status of the battery, but whether or not it is currently charging. Power Statistics always claims that it is charging, even though it is not charging most of the time.

Richard

Revision history for this message
Richard Cavell (richardcavell) wrote :

Guys,

I recently applied the latest updates to Karmic alpha 3 (devicekit-power and gnome-power-manager), and it looks as though the problem is entirely fixed.

Richard

Revision history for this message
Scott Howard (showard314) wrote :

Great! If it comes back, please reopen this bug by setting it to "new."

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Invalid
Changed in devicekit-power (Ubuntu):
status: New → Fix Released
Revision history for this message
Richard Cavell (richardcavell) wrote :

Okay, I spoke too soon. The problem is back. I don't know what I did that made it work briefly, or what I did to make it broken again.

I have experimented by letting my battery discharge and recharge, putting the AC power in and out and so on to see if I can find what fixed it temporarily, but I can't reproduce the fixed state.

I'm happy to investigate if anyone has any ideas.

Richard

Changed in devicekit-power (Ubuntu):
status: Fix Released → New
Changed in gnome-power-manager (Ubuntu):
status: Invalid → New
Revision history for this message
Scott Howard (showard314) wrote :

setting back to confirmed in GPM. DKP is misreporting the battery level so GPM is reporting "what it is told." Until someone starts working on this, keep checking the newestversions

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
mcwtlg (mcwtlg) wrote : apport-collect data

Architecture: i386
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.28.0-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
Uname: Linux 2.6.31-11-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
mcwtlg (mcwtlg) wrote : Dependencies.txt
Revision history for this message
mcwtlg (mcwtlg) wrote : DevkitPower.txt
Revision history for this message
mcwtlg (mcwtlg) wrote : GConfNonDefault.txt
Revision history for this message
mcwtlg (mcwtlg) wrote : gnome-power-bugreport.txt
Revision history for this message
Martin Pitt (pitti) wrote :

Do you see correct values when the battery is not fully charged? I. e. do all numbers suddenly jump at 0 once it gets fully charged?

If so, can you please do

  tar czf /tmp/dkp-history.tar.gz /var/lib/DeviceKit-power/

and attach /tmp/dkp-history.tar.gz here? Please also do

  /usr/share/gnome-power-manager/gnome-power-bugreport > /tmp/report.txt

and attach /tmp/report.txt here. Thanks!

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Invalid
Changed in devicekit-power (Ubuntu):
status: New → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Richard Cavell (richardcavell) wrote :

Martin,

The answer to your first question is "no". The problem only occurs some of the time. When it does occur, it is not the case that the numbers go to 0 once it is fully charged. The numbers all went to 0 when it was partially charged.

Richard

Revision history for this message
Martin Pitt (pitti) wrote :

OK, thanks. So please only run gnome-power-bugreport and attach the output here.

Revision history for this message
Scott Howard (showard314) wrote :

The output from gnome-power-bug report is up at comment 7, and "devkit-power -d" is at comment 5. If Richard wants to add a fresh gnome-power-bugreport, the command is:
$ /usr/share/gnome-power-manager/gnome-power-bugreport

Changed in devicekit-power (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

I can confirm. gnome-power-manager displays 0,0% battery charge most of the time. devkit-power --monitor-detail always seems to show:

"energy: 0 Wh"

no matter if the AC adapter is plugged in or not.

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please do the following: Start with the battery fully charged, so that dk-p does not see it. Now do

   sudo killall devkit-power-daemon
   sudo /usr/lib/devicekit-power/devkit-power-daemon --verbose 2>&1 | tee /tmp/dkp.log

in a Terminal. Wait some seconds, press control-c, and attach /tmp/dkp.log here.

Now let the battery discharge for a while (the situation where dk-p does see the correct charge), and to the same set of commands again.

With those I get some more detailled information and can also compare the output when it does and when it doesn't see the battery charge. Thank you!

Changed in devicekit-power (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

I'm attaching the requested files below.

I've noticed a strange development since my confirmation of this bug. After several hours with 0,0% charge displayed (even though the battery has been fully charged at all time), the charge display suddenly started rising.

I'm attaching a gnome-power-manager graph showing this. The first blue line is the ~4 hours of 0,0%. The sudden red increase tops around ~60% (not shown in screenshot), and would probably have continued. The second blue line is me doing the test you requested. Note the rapid discharge though, even though I only disconnected the AC supply for a few minutes.

Something is awfully broken here...

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :
Changed in devicekit-power (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Your second log is broken; apparenlty you forgot the "sudo killall devkit-power-daemon" before it?

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

Sorry. I wasn't aware of the fact that devkit-power-daemon was being restarted automatically.

Attaching a new discharging log.

Martin Pitt (pitti)
Changed in devicekit-power (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-power:
status: New → Invalid
Revision history for this message
Brett (breusshe) wrote : apport-collect data

Architecture: i386
DistroRelease: LinuxMint 8
Package: devicekit-power 011-1ubuntu1
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
Uname: Linux 2.6.31-15-generic i686
UserGroups: adm admin audio cdrom dialout lpadmin plugdev sambashare
XsessionErrors:
 (gnome-settings-daemon:2556): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2556): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2594): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2585): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:2584): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

Revision history for this message
Brett (breusshe) wrote : Dependencies.txt
Revision history for this message
Brett (breusshe) wrote : apport-collect data

Architecture: i386
DistroRelease: LinuxMint 8
Package: devicekit-power 011-1ubuntu1
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
Uname: Linux 2.6.31-15-generic i686
UserGroups:

XsessionErrors:
 (gnome-settings-daemon:2556): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2556): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2594): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2585): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:2584): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

Revision history for this message
Brett (breusshe) wrote : Dependencies.txt
Revision history for this message
Brett (breusshe) wrote :

I'm having a similar issue. Only, it isn't 0%. The amount changes. Lowest it has been was 62.3%. I thought this was odd, so decided to test my battery using the built-in indicator that is on the battery (Dell Inspiron 1720). The external test determined that my battery was at 100%. Now, here is the odd part. Once I pressed that button on the battery to see if the battery agreed with the battery indicator in Gnome, the Gnome indicator changed to 100%. I was plugged into the wall when this happened, so I'm not sure if it was an incredible fluke or if pressing the button caused the battery to pass info onto the kernel (or where ever the Gnome battery indicator gets its info from) that updated the indicator.

Sorry for the double posting for the apport-collect info, I wasn't sure if I needed to run the utility as my user account or root, so I did both. The root account is the second one (comments #33 and 34).

Revision history for this message
Blaine (frikker) wrote :

Are there any updates on this? I'm having this problem with 10.04. It usually happens after I come back from standby. I didn't care about it too much before. However, this problem is causing gkrellm to refuse to boot up because of a divide by 0 error. (battery status in gkrellm has BatteryCharge as the denominator, which is set to 0% even though I am fully charged).

Revision history for this message
Blaine (frikker) wrote :

I forgot to mention: I have a 2nd gen macbook as well.

Revision history for this message
Blaine (frikker) wrote :

For the lurkers or anyone else having this problem with a 2nd gen macbook, do this: http://support.apple.com/kb/HT3964?viewlocale=en_US (Reset the SMC on the laptop). This will fix the battery issue at the hardware level allowing gnomes power management to work correctly.

Sorry about digging up an old bug - turns out this isn't a bug with gnome (at least so it seems)

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.