acpi reporting incorrect battery state

Bug #201318 reported by Stas Zytkiewicz
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: linux-source-2.6.11

When testing the hardy alpha6 live cd I came across an bug that was also in the
Feisty release and it isn't resolved.
The problem is that when I start my laptop, plugged into AC, acpi and the gnome-power-manager
think that AC is unplugged and report a popup telling the laptop is unplugged. (Which isn't)

The bug can be reproduced by unplugging the AC and replugging it
again, then after
one minute acpi+g-p-m thinks the battery is unplugged again.

Here's the what acpi reported:
(laptop on AC system up and running, g-p-m gives the unplugged warning)
ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 02:06:43 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: off-line

(laptop after unplugging AC)
ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 04:25:27 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: off-line

( and replugging it again)
ubuntu@ubuntu:~$ acpi -V
     Battery 1: charging, 98%, 00:33:00 until charged
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

Then after one +- one minute g-p-m gave an popup telling the laptop
was disconnected.(Which wasn't the case)
ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 18:23:56 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

The remaining outputs shows that the battery is charging as the remaining times
increases.

ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 25:42:22 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 27:48:38 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

ubuntu@ubuntu:~$ acpi -V
     Battery 1: discharging, 98%, 31:56:44 remaining
     Thermal 1: ok, 53.0 degrees C
  AC Adapter 1: on-line

I can't find anything useful in the logs but if you need more info I'm
happy to provide it.

Stas

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :
Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

Upon further investigation it appears that the problem is related to the charging of the battery.
The laptop battery was discharged about 30% and when charging again there was no problem
but as soon as the battery was completely charged the g-p-m gives the unplugged warning and
the acpi daemon reported that the battery was discharging with increasing 'remaining' times.

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

Hi Stas,

It seems this may have gotten overlooked as it was assigned to a much older 2.6.11 kernel. I've reassigned to the 'linux' kernel source package for Hardy.

Just curious if you've tested against the latest Hardy Beta release - http://www.ubuntu.com/testing ? I recall there being some g-p-m fixes for battery detection that may have gone in.

Changed in linux-source-2.6.11:
status: New → Incomplete
Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote : Re: [Bug 201318] Re: acpi reporting incorrect battery state

On Fri, Mar 28, 2008 at 12:05 AM, Leann Ogasawara <email address hidden> wrote:

> Just curious if you've tested against the latest Hardy Beta release -
> http://www.ubuntu.com/testing ? I recall there being some g-p-m fixes
> for battery detection that may have gone in.
I just did, with the Hardy Beta live cd, but it makes no different.
The g-p-m icon now disappears, crashes?, for a brief moment when the
battery is done
charging and then the when it appears again the "running on battery" message
is given.
I can't find anything about the, possible, disappearing/crashing in any logs.

Stas

--
Free-source educational programs for schools
http://www.schoolsplay.org and http://wiki.laptop.org/go/Schoolsplay
http://gvr.sf.net and http://wiki.laptop.org/go/Guido_van_Robot

Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

As this problem doesn't appear when using other desktops like kde or enlightenment 17
I've reassigned it to gnome-power-manager.
When looking at the gpm source I think that the real problem lies in the hal stuff that
gpm uses to check the battery state.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thank you for taking the time to report this bug and help make Ubuntu better. Could you please provide the following information as separate text files, in all battery charge states (charging/charged/discharging):

  gnome-power-bugreport.sh
  hal-find-by-capability --capability "battery" | xargs -n 1 hal-device
  hal-find-by-capability --capability "ac_adapter" | xargs -n 1 hal-device

In addition, could you also state whether this happens with the current Intrepid beta? This should be reproducible from the live CD environment.

Thanks in advance.

Changed in gnome-power-manager:
status: Confirmed → Incomplete
Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

Ok here they are.

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

second

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

And the last one.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, but this isn't a gnome-power-manager bug as HAL is providing inconsistent information. I assume that these readings were taken with AC adapter present? HAL is providing the following information about your battery and AC adapter:

battery.rechargeable.is_charging = false
battery.rechargeable.is_discharging = true
ac_adapter.present = true

I've re-assigned to HAL for the time being.

Could you please provide the same information, both with the battery fully charged, and the AC adapter disconnected.

Thanks

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

Here they are, on fully charged battery.

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :
Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks. Am I correct to assume that the last logs were taken with the AC adapter disconnected?

From your original bug description, it seems that that the correct state is indicated after unplugging and reconnecting your AC adpater. If that is the case, could you please provide the same information requested above, but when the AC adapter is connected and the status is indicated correctly.

Thanks

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

On Sun, Oct 19, 2008 at 8:52 PM, Chris Coulson
<email address hidden> wrote:
> Thanks. Am I correct to assume that the last logs were taken with the AC
> adapter disconnected?
Yes.

> >From your original bug description, it seems that that the correct state
> is indicated after unplugging and reconnecting your AC adpater. If that
> is the case, could you please provide the same information requested
> above, but when the AC adapter is connected and the status is indicated
> correctly.
OK.

Stas

--
Free-source educational programs for schools
http://www.schoolsplay.org and http://wiki.laptop.org/go/Schoolsplay
http://gvr.sf.net and http://wiki.laptop.org/go/Guido_van_Robot

Revision history for this message
Heinrich Kruger (heindsight-deactivatedaccount) wrote :

I'm having a similar problem on my laptop running Hardy. If I boot on AC, the gnome-power-manager notification icon seems to indicate that that I'm running on AC but when holding the mouse over the icon, the tooltip indicates that I'm running on battery. If I unplug the power cable and plug it back in again, both the icon and tooltip correctly indicate that I'm running on AC.

I first noticed that something strange was going on when I tried to debug a problem with gnome-screensaver only blanking the screen instead of showing my screensaver - it turned out to be because gnome-screensaver also thought I was running on battery when I'm actually on AC.

running acpi -v (or cat /proc/acpi/ac_adapter/ACAD/status) correctly shows that AC is online.
 hal-find-by-capability --capability "ac_adapter" | xargs -n 1 hal-device
shows: ac_adapter.present = false (bool)

I'll upload output from
  gnome-power-bugreport.sh
  hal-find-by-capability --capability "battery" | xargs -n 1 hal-device
  hal-find-by-capability --capability "ac_adapter" | xargs -n 1 hal-device
before and after unplugging and reconnecting the power cable.

Revision history for this message
Heinrich Kruger (heindsight-deactivatedaccount) wrote :
Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

I have the same problem in Kubuntu Intrepid 8.10 using KDE 4.2.2.

The 'Guidance Power Manager' on the system tray shows "Battery: fully charged", but at the same time the battery progress always shows 98%. It looks very strange !!

$ acpi -V
     Battery 0: Full, 98%
  AC Adapter 0: on-line

Please let me know what information is needed and I ll attach them.

Thanks a lot...

Revision history for this message
Vish (vish) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Revision history for this message
Stas Zytkiewicz (stas-zytkiewicz) wrote :

On Sat, Jun 19, 2010 at 3:14 PM, Vish <email address hidden> wrote:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering if this is still an issue
> for you. Can you try with the latest Ubuntu release? Thanks in advance.

Using Ubuntu 10.4.
It's still an issue on a asus H2500L laptop but other laptops like
dell inspirion
and acer don't have this issue.
It seems hardware related.

Regards,
Stas

> --
> acpi reporting incorrect battery state
> https://bugs.launchpad.net/bugs/201318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Free-source educational programs for schools
http://www.schoolsplay.org and http://wiki.laptop.org/go/Schoolsplay
http://gvr.sf.net and http://wiki.laptop.org/go/Guido_van_Robot

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for hal (Ubuntu) because there has been no activity for 60 days.]

Changed in hal (Ubuntu):
status: Incomplete → Expired
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.