upower (devkit-power) reporting bad data when AC cable is unplugged

Bug #531190 reported by Konstantin Lavrov
878
This bug affects 223 people
Affects Status Importance Assigned to Milestone
DeviceKit-Power
Fix Released
Medium
upower (Debian)
Confirmed
Unknown
upower (Fedora)
Won't Fix
Critical
upower (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Mark Williams

Bug Description

Binary package hint: upower

upower reports enormous energy-rate for first time after cord is unplugged.
GPM reacts on this first event not checking subsequent events.

This bug is started because I found no ways to collect data for bug #473552.
I have no devkit-power package.

=== EFFECTS ===

This is the underlying cause to gnome-power-manager immediately reporting critical battery after unplug even while charge is good. It is not a gnome-power-manager problem, the root is here in upower. Please do not report bugs against gnome-power-manager for this!

To workaround the effects execute:

gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

(from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/572541/comments/1>)

=== apport information ===

ProblemType: Bug
Architecture: i386
Date: Wed Mar 3 11:15:13 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/lib/upower/upowerd
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
ProcEnviron:

ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: upower
Uname: Linux 2.6.32-15-generic i686
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
Tags: lucid
Uname: Linux 2.6.32-15-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
In , Michael Biebl (mbiebl) wrote :

When I unplug AC, I get a warning from g-p-m that I only have 3 min. remaining time left, although my battery is fully charged and usually lasts for ~2-3h.

As you can see from the attached log, it takes a few seconds, until dk-power reports plausible values for remaining time.

Revision history for this message
In , Michael Biebl (mbiebl) wrote :

Created attachment 30606
output of dk-power --monitor-details while unplugging AC

Revision history for this message
Konstantin Lavrov (lacosta) wrote :
Revision history for this message
Konstantin Lavrov (lacosta) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Konstantin Lavrov (lacosta) wrote :

AC cable was unplugged then after about 5 sec. plugged back then
wait until suspend
and after wake up I stop it with Ctrl-C

Revision history for this message
tekstr1der (tekstr1der) wrote :

upower --dump thinks I'm still on AC power with 100% charge.

This is after 5 minutes unplugged and running on battery.

This was previously reported as a regression in devicekit-power which I followed in Bug #384304. It was finally working properly just in time for the switch to upower. This has regressed again.

Revision history for this message
tekstr1der (tekstr1der) wrote :

Still seeing this on lucid. Any info I can add to help out?

Changed in upower (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Michael Biebl (mbiebl) wrote :

Immediately after AC unplug, upower is showing incorrect numbers for remaining time.
In my particular case, the battery is fully charged, I then unplug, and g-p-m pops up a dialog, saying that I have 3 minutes left before my battery is empty (which is obviously bogus). After a short period of time (usually a matter of 30+ secs), the values reported by upower are correct.

This might actually be a kernel/hardware problem, reporting incorrect current_now values (as shown in the referenced downstream bug reports [1][2])

Nonetheless, upower should probably workaround this by either:
a/ having some sanity checks to ignore unreasonable high/low (static) values
b/ ignore current values for say 60secs after ac unplug
c/ compute the mean values for properties like current_now and filter values which exceed a certain ratio
d/ other ideas?

Please also see the relevant downstream bug reports:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571161
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574850

Changed in upower (Debian):
status: Unknown → Confirmed
Revision history for this message
Konstantin Lavrov (lacosta) wrote :

It seems that log from gpm I attached in #3 has no related information.

In fact I post logs in bugs filled against g-p-m by others.

Need I provide more logs to this bug?

Last days more testers of Lucid had filled bugs against g-p-m but the root is here:

badly calculeted remaining time.

Changed in upower (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in upower (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
David Tombs (dgtombs)
description: updated
Revision history for this message
David Tombs (dgtombs) wrote :

Note from duplicates that this occurs often on MSI Wind laptops, but not exclusively.

description: updated
Revision history for this message
Kris Marien (kris-marien) wrote :

Same problem on my netbook with UNR 10.04, fully updated.

When I unplug the power cable the system goes standby after displaying the time message (2 minutes left). When I press the power to revive the system everything is alright again.

The workaround did not work for me. I also did set the action for critical battery to nothing in gconf-editor but that don't work either.

If I have to take an action or post an output of some kind here let me know.

Revision history for this message
Kris Marien (kris-marien) wrote :

I also found out that:

if I change the value for suspend from yes to no in /usr/share/polkit-1/actions/org.freedesktop.upower.policy

that I can unplug the power cable without problems (after 1 reboot)

but then the following occurs:

if I change the value for behaviour when I close my laptop screen from blank to hibernate

then when I unplug the power cable my laptop does suspend with the screen open.

For now I leave the option for closing the screen to blank and I can work with the cable unplugged without problems.

I don't know if this information is related to the bug but maybe it can help.

I also could change the settings for critical battery back to hibernate, wich I set to nothing as trying to work around the bug.

Revision history for this message
Ken Yagen (ken-yagen) wrote :

I finally discovered my issue was due to a bad battery. My laptop has 2 batteries in it and the 2nd one (replaces the dvd) had gone bad. So while I could run on battery, if I pulled the power cord, I think it tried to power from the bad battery first somehow and the power was cut. Once I removed the defective battery, everything works fine.

Revision history for this message
meshellwm (meshellwm5) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

Hi,

I have Windows XP and Ubuntu 10.04 LTS on my laptop. XP works fine, but Ubuntu does not. At this point, I am not convinced that it is a hardware problem.....

--- On Mon, 6/14/10, Ken Yagen <email address hidden> wrote:

From: Ken Yagen <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged
To: <email address hidden>
Date: Monday, June 14, 2010, 3:34 PM

I finally discovered my issue was due to a bad battery. My laptop has 2
batteries in it and the 2nd one (replaces the dvd) had gone bad. So
while I could run on battery, if I pulled the power cord, I think it
tried to power from the bad battery first somehow and the power was cut.
Once I removed the defective battery, everything works fine.

--
upower (devkit-power) reporting bad data when AC cable is unplugged
https://bugs.launchpad.net/bugs/531190
You received this bug notification because you are a direct subscriber
of a duplicate bug.

Revision history for this message
Mark Cariaga (mzc) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

The bios version of my netbook was not compatible to linux at all. When the
bios was flushed to a compatible version the power issues were resolved. It
seems most of the cheap netbook have proprietary firmware that works
exclusively on a ms win platform

On Jun 14, 2010 3:25 PM, "meshellwm" <email address hidden> wrote:

Hi,

I have Windows XP and Ubuntu 10.04 LTS on my laptop. XP works fine, but
Ubuntu does not. At this point, I am not convinced that it is a hardware
problem.....

--- On Mon, 6/14/10, Ken Yagen <email address hidden> wrote:

From: Ken Yagen <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC
cable is unplugged
To: <email address hidden>
Date: Monday, June 14, 2010, 3:34 PM

I finally discovered my issue was due to a bad battery. My laptop has 2
batteries in it and the 2nd...

Revision history for this message
David Tombs (dgtombs) wrote :

@meshellwm: This bug is always triggered by quirky hardware, but upower could do a better job of hiding the quirky effects from the user. (See upstream report for details.)

Revision history for this message
meshellwm (meshellwm5) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

Hey,

It's possible that my laptop has a hardware issue that Windows can handle but Ubuntu can't. It doesn't seem right that Windows would do better than Linux in any area ;-)

--- On Mon, 6/14/10, David Tombs <email address hidden> wrote:

From: David Tombs <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged
To: <email address hidden>
Date: Monday, June 14, 2010, 6:38 PM

@meshellwm: This bug is always triggered by quirky hardware, but upower
could do a better job of hiding the quirky effects from the user. (See
upstream report for details.)

--
upower (devkit-power) reporting bad data when AC cable is unplugged
https://bugs.launchpad.net/bugs/531190
You received this bug notification because you are a direct subscriber
of a duplicate bug.

David Tombs (dgtombs)
tags: added: metabug
Revision history for this message
Kris Marien (kris-marien) wrote :

For clearing up some things:

if I set options for "closing the laptop screen" to suspend or hibernate

then, when I unplug the AC power cable:

my laptop goes into suspend or hibernate mode

even if I set the options for critical battery to "nothing"

Revision history for this message
Kris Marien (kris-marien) wrote :

Addendum to my previous post:

this happens with the laptop screen open

Revision history for this message
Kris Marien (kris-marien) wrote :

Another addendum to previous posts:

I even could reset the value of event when "critical battery" to suspend (I also changed policy of upower suspend back to yes).

So it seems that unpluggin the power cable puts the system to suspend/hibernate/blank screen only because it thinks that the laptop screen is being closed.

I also get the warning message of "2 minutes left" when unpluggin the power cable but there is no action because of this.

Maybe there is a better way to let the system check that the laptop screen is open/closed.

Revision history for this message
David Tombs (dgtombs) wrote :

Kris, it sounds like you're affected by a different bug, like bug 481312. Please report your own bug against upower (ubuntu-bug upower) and feel free to email me the bug # so I can take a look at it. Thanks!

Revision history for this message
Kris Marien (kris-marien) wrote :

@David

You are right. bug 481312 is the same problem as I have. I marked the bug as affecting me and I will follow the posting there.

Thanks.

Revision history for this message
Daniel Botelho (botelho-daniel) wrote :

I think I have this problem too...
I've my AC cable unplugged and in gnome-manager it says that is charging.
Look at this:
$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/ACPI0003:00/power_supply/ADP1
  power supply: yes
  updated: Wed Jun 30 20:04:11 2010 (303 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:00/PNP0C0A:00/power_supply/BAT1
  vendor: MSI Corp.
  model: MS-1221
  power supply: yes
  updated: Wed Jun 30 20:08:47 2010 (27 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: charging
    energy: 468.964 Wh
    energy-empty: 0 Wh
    energy-full: 619.569 Wh
    energy-full-design: 53.28 Wh
    energy-rate: 16.9608 W
    voltage: 27.692 V
    time to full: 8.9 hours
    percentage: 75.692%
    capacity: 75.2708%
  History (charge):
    1277924927 75.692 charging
    1277924897 68.812 charging
    1277924867 26.617 charging

Daemon:
  daemon-version: 0.9.1
  can-suspend: yes
  can-hibernate yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes

I've a LG E500

Revision history for this message
C de-Avillez (hggdh2) wrote :

Marking Triaged/Medium.

Changed in upower (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Matthew Planchard (msplanchard) wrote :

Just confirming this bug on a Toshiba Satellite L455-S5975. The workaround worked fine for me.

Revision history for this message
David Tombs (dgtombs) wrote :

@Daniel: that looks like a different bug, please file a new report with "ubuntu-bug upower" or look for an existing report. Thanks!

Revision history for this message
Matthew East (mdke) wrote :

I have seen what I think is this bug with an HP Mini 2133 - GPM tells me that the battery is critically low when I unplug the AC and offers to hibernate, even though the battery is at 100%. Happy to add any hardware or debugging information if that is useful.

Revision history for this message
Jeremy Jongsma (jeremy-jongsma) wrote :

Also happens on my Dell Vostro 1710. Unplug, and instant hibernate at 100% power.

Revision history for this message
Matthew East (mdke) wrote :

This is a regression in Lucid and from the number of duplicates appears to affect quite a few people with a serious symptom in an essential hardware component (laptop battery) so I'm increasing the importance to "High" in line with the guidelines at https://wiki.ubuntu.com/Bugs/Importance

tags: added: regression-release
Changed in upower (Ubuntu):
importance: Medium → High
Revision history for this message
Ben de Mora (ben-demora) wrote :

Also happens on my eMachines 350 Netbook, using both the standard battery and the extended 6-cell battery. Very annoying.

Revision history for this message
Richard Moore (richard-darton-moore) wrote :

I have this problem on a Samsung Q45. I've replaced the battery once (about 6 months ago) and I now (again) get the 'battery may be damaged' message. Running time has been extremely poor even from the initial replacement of the battery. 1:50 if I'm lucky, sometimes only 40 minutes. The workaround has not worked for me. When i first bought this laptop i was using Hardy, and the battery life was in excess of 4 hours. This is a serious issue for me, as I spend a lot of time on the road.

Revision history for this message
Ketil Wendelbo Aanensen (ketilwaa-deactivatedaccount) wrote :

Still present on Maverick for me

Changed in devicekit-power:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
JimD (jndeakin) wrote :

I have a Sony Vaio VGN-NR21S with the above problem.
the "gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false" seems to be a workaround, but using upower -d tells me the energy rate reading is wrong.
Running on A/C :
    state: charging
    energy: 50.23 Wh
    energy-empty: 0 Wh
    energy-full: 53.28 Wh
    energy-full-design: 53.28 Wh
    energy-rate: 782.82 W
    time to full: 14 seconds
    percentage: 94.2755%
    capacity: 100%
    technology: lithium-ion

I get a warning that there is only four minutes power when I unplug. The info corrects itself when on D/C
    state: discharging
    energy: 49.98 Wh
    energy-empty: 0 Wh
    energy-full: 53.28 Wh
    energy-full-design: 53.28 Wh
    energy-rate: 24.396 W
    time to empty: 2.0 hours
    percentage: 93.8063%
    capacity: 100%
    technology: lithium-ion

The error returns if plugged in again.

Revision history for this message
JimD (jndeakin) wrote :

Forgott to say.. It's running fully patched Lucid.

Revision history for this message
Larraby (crain) wrote :

I've got a MSI Wind U100 and have the same issue. While on 10.04 I've tried to deselect use_time_policy but it didn't worked, upgraded to 10.10 - same thing. But in 10.04 netbook ed. everything worked right. Is there any way to solve this?

Revision history for this message
Daniel Botelho (botelho-daniel) wrote :

I've installed the new Ubuntu 10.10 version and the same old problem...

Revision history for this message
meshellwm (meshellwm5) wrote :

Hey,

I went back to Ubuntu 9.04, then I unpluged my laptop. I have not had any power problems! (It was nice to go back to 9.04!) Windows XP also works fine.

Before going back to Ubuntu 9.04, I tried the following, all failed:

Ubuntu 9.10,
Ubuntu 10.04 LTS,
LinuxMint 9
PCLinuxOS Zen Mini
Fedora 12.

The code in Ubuntu 9.04 is obviously more robust. There may be a hardware problem with this laptop, but it is clear from Ubuntu 9.04, that it can be solved.

I hope this information helps.......

--- On Thu, 10/14/10, Daniel Botelho <email address hidden> wrote:

From: Daniel Botelho <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged
To: <email address hidden>
Date: Thursday, October 14, 2010, 2:14 PM

I've installed the new Ubuntu 10.10 version and the same old problem...

--
upower (devkit-power) reporting bad data when AC cable is unplugged
https://bugs.launchpad.net/bugs/531190
You received this bug notification because you are a direct subscriber
of a duplicate bug (490632).

Revision history for this message
meshellwm (meshellwm5) wrote :
Download full text (13.8 KiB)

I just wanted to include some more info. (below). Oh, I noticed that Ubuntu correctly identified my video, the others did not.

Laptop: Compaq Presario X1000, 1 Mb RAM, Centrino.

Ubuntu 9.04

vmlinuz-2.6.28-11-generic

and

vmlinuz-2.6.28-19-generic

Work fine when laptop is unpluged and is running on battery power.

lshw output: -----------------------------------------------------------------

laptopwgl
    description: Notebook
    product: Compaq Presario X1000 DK571A#ABA
    vendor: Hewlett-Packard
    version: F.09
    serial: CND32802JC
    width: 32 bits
    capabilities: smbios-2.3 dmi-2.3
    configuration: boot=normal chassis=notebook uuid=D9DE7020-3EC3-D711-02A0-669906293129
  *-core
       description: Motherboard
       product: 0860
       vendor: COMPAL
       physical id: 0
       version: 8051 Version 24.1B
     *-firmware
          description: BIOS
          vendor: Hewlett-Packard
          physical id: 0
          version: 68BAL Ver. F.09 (08/15/2003)
          size: 128KiB
          capacity: 960KiB
          capabilities: pci pcmcia pnp apm upgrade shadowing cdboot bootselect edd int13floppy720 int5printscreen int9keyboard int14serial int17printer acpi usb agp ls120boot smartbattery biosbootspecification netboot
     *-cpu
          description: CPU
          product: Intel(R) Pentium(R) M processor 1300MHz
          vendor: Intel Corp.
          physical id: 4
          bus info: cpu@0
          version: 6.9.5
          slot: U10
          size: 600MHz
          capacity: 1300MHz
          width: 32 bits
          clock: 100MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2 cpufreq
        *-cache:0
             description: L1 cache
             physical id: 5
             slot: Internal L1 Cache
             size: 64KiB
             capacity: 64KiB
             capabilities: burst internal write-back unified
        *-cache:1
             description: L2 cache
             physical id: 6
             slot: Internal L2 Cache
             size: 1MiB
             capacity: 1MiB
             capabilities: burst external write-back unified
     *-memory
          description: System Memory
          physical id: 9
          slot: System board or motherboard
          size: 1280MiB
        *-bank:0
             description: SODIMM DDR Synchronous
             physical id: 0
             slot: DIMM #1
             size: 1GiB
             width: 64 bits
        *-bank:1
             description: SODIMM DDR Synchronous
             physical id: 1
             slot: DIMM #2
             size: 256MiB
             width: 64 bits
     *-pci
          description: Host bridge
          product: 82855PM Processor to I/O Controller
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 03
          width: 32 bits
          clock: 33MHz
          configuration: driver=agpgart-intel module=intel_agp
        *-pci:0
             description: PCI bridge
             product: 82855PM Processor to AGP Controller
             vendor: Intel Corporation
             phy...

Revision history for this message
Konstantin Lavrov (lacosta) wrote :

@meshellwm: There was no upower in Ubuntu 9.04. but hal

Revision history for this message
ToRA (wadritora) wrote :

gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

OMG, THANKS!!!! thansk thanks thanks and thanks.

I love this company! :)

ArchLinux Gnome Kernel 2.6.35 i686 And the same problem, but no more!

Revision history for this message
Oscar Sandoval Torres (oscar.st) wrote :

I have the same problem in Ubuntu 10.10 with a Dell Vostro 3300 with a 8-cell Lithium Ion battery.

Revision history for this message
Anders Hall (kallebolle) wrote :

I have the same problem in Ubuntu 10.10 with a Lenovo x201, Lithium Ion battery.

Revision history for this message
B.J. Herbison (bj-herbison) wrote :

Could someone explain the full effect of the "gconftool ..." command? The page http://live.gnome.org/GnomePowerManager/FAQ says to use it if my battery is faulty, but my battery gives consistent results -- except I get the bogus alert when I disconnect the external power. (Is there way to tell whether this is a battery glitch or a upower issue?)

I want low power alerts when my battery runs down, just not the bogus report. I'm worried that I will lose the correct alerts if I use the "gconftool ..." command.

Ubuntu 10.10, Dell Studio laptop.

Revision history for this message
Jonas Diaz (jonasdiaz) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when ACcable is unplugged
Download full text (3.4 KiB)

I ran the command and nothing has changed, I get the same bogus behaviour. And for what it seems now every bug will be addressed for natty and no for Maverick. Many of my unity's bugs will never be fixed, so at least I hope that this one will or it will damage my netbook. I'm just crossing my fingers.

Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

-----Original Message-----
From: "B.J. Herbison" <email address hidden>
Sender: <email address hidden>
Date: Mon, 15 Nov 2010 21:58:25
To: <email address hidden>
Reply-To: Bug 531190 <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC
 cable is unplugged

Could someone explain the full effect of the "gconftool ..." command?
The page http://live.gnome.org/GnomePowerManager/FAQ says to use it if
my battery is faulty, but my battery gives consistent results -- except
I get the bogus alert when I disconnect the external power. (Is there
way to tell whether this is a battery glitch or a upower issue?)

I want low power alerts when my battery runs down, just not the bogus
report. I'm worried that I will lose the correct alerts if I use the
"gconftool ..." command.

Ubuntu 10.10, Dell Studio laptop.

--
upower (devkit-power) reporting bad data when AC cable is unplugged
https://bugs.launchpad.net/bugs/531190
You received this bug notification because you are a direct subscriber
of a duplicate bug (666330).

Status in DeviceKit based power management D-Bus backend: Confirmed
Status in “upower” package in Ubuntu: Triaged
Status in “upower” package in Debian: Confirmed

Bug description:
Binary package hint: upower

upower reports enormous energy-rate for first time after cord is unplugged.
GPM reacts on this first event not checking subsequent events.

This bug is started because I found no ways to collect data for 473552.
I have no devkit-power package.

=== EFFECTS ===

This is the underlying cause to gnome-power-manager immediately reporting critical battery after unplug even while charge is good. It is not a gnome-power-manager problem, the root is here in upower. Please do not report bugs against gnome-power-manager for this!

To workaround the effects execute:

gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

(from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/572541/comments/1>)

=== apport information ===

ProblemType: Bug
Architecture: i386
Date: Wed Mar 3 11:15:13 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/lib/upower/upowerd
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
ProcEnviron:

ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: upower
Uname: Linux 2.6.32-15-generic i686
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
ProcV...

Read more...

Revision history for this message
JanisA (janis-adati) wrote :

@ToRA: thanks for tip, it worked for my MSI x340

Revision history for this message
AdamOutler (adamoutler) wrote :

Well, thanks for the help with the workaround.

This bug is about a year old and still has no repair, and noone assigned to work on the Ubuntu portion?

here is some information from my netbook. it's a Gateway LT21. Hope it helps.

adam@adam-netbook:/etc/apt/sources.list.d$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/ACPI0003:00/power_supply/AC
  power supply: yes
  updated: Fri Dec 3 17:08:48 2010 (674 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT0
  vendor: SANYO
  model: UM09H31
  power supply: yes
  updated: Fri Dec 3 17:19:55 2010 (7 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 41.8824 Wh
    energy-empty: 0 Wh
    energy-full: 46.0296 Wh
    energy-full-design: 47.52 Wh
    energy-rate: 7.8408 W
    voltage: 12.117 V
    time to empty: 5.3 hours
    percentage: 90.9901%
    capacity: 96.8636%
    technology: lithium-ion
  History (rate):
    1291418395 7.841 discharging
    1291418363 8.230 discharging
    1291418332 7.927 discharging
    1291418301 8.316 discharging

Daemon:
  daemon-version: 0.9.5
  can-suspend: yes
  can-hibernate yes
  on-battery: yes
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes

Revision history for this message
Jonas Diaz (jonasdiaz) wrote :
Download full text (4.4 KiB)

The workaround did not work for me...And I'm worried for the lifetime of my battery.

Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

-----Original Message-----
From: AdamOutler <email address hidden>
Sender: <email address hidden>
Date: Fri, 03 Dec 2010 23:27:57
To: <email address hidden>
Reply-To: Bug 531190 <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC
 cable is unplugged

Well, thanks for the help with the workaround.

This bug is about a year old and still has no repair, and noone assigned
to work on the Ubuntu portion?

here is some information from my netbook. it's a Gateway LT21. Hope it
helps.

adam@adam-netbook:/etc/apt/sources.list.d$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/ACPI0003:00/power_supply/AC
  power supply: yes
  updated: Fri Dec 3 17:08:48 2010 (674 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT0
  vendor: SANYO
  model: UM09H31
  power supply: yes
  updated: Fri Dec 3 17:19:55 2010 (7 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 41.8824 Wh
    energy-empty: 0 Wh
    energy-full: 46.0296 Wh
    energy-full-design: 47.52 Wh
    energy-rate: 7.8408 W
    voltage: 12.117 V
    time to empty: 5.3 hours
    percentage: 90.9901%
    capacity: 96.8636%
    technology: lithium-ion
  History (rate):
    1291418395 7.841 discharging
    1291418363 8.230 discharging
    1291418332 7.927 discharging
    1291418301 8.316 discharging

Daemon:
  daemon-version: 0.9.5
  can-suspend: yes
  can-hibernate yes
  on-battery: yes
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes

--
You received this bug notification because you are a direct subscriber
of a duplicate bug (666330).
https://bugs.launchpad.net/bugs/531190

Title:
  upower (devkit-power) reporting bad data when AC cable is unplugged

Status in DeviceKit based power management D-Bus backend:
  Confirmed
Status in “upower” package in Ubuntu:
  Triaged
Status in “upower” package in Debian:
  Confirmed

Bug description:
  Binary package hint: upower

upower reports enormous energy-rate for first time after cord is unplugged.
GPM reacts on this first event not checking subsequent events.

This bug is started because I found no ways to collect data for 473552.
I have no devkit-power package.

=== EFFECTS ===

This is the underlying cause to gnome-power-manager immediately reporting critical battery after unplug even while charge is good. It is not a gnome-p...

Read more...

Revision history for this message
Diederen (jjhdiederen) wrote :

I am experiencing the same problems on a MacBook 2,1. I am on battery only at the moment and I see the icon for charging, which is bogus. My battery is nearly full and it says 0% charged.

jeroen@jeroen-mint ~ $ upower -d
Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP1
  power supply: yes
  updated: Mon Dec 6 21:05:57 2010 (661 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: yes

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0
  power supply: yes
  updated: Mon Dec 6 21:16:33 2010 (25 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%

Daemon:
  daemon-version: 0.9.1
  can-suspend: yes
  can-hibernate yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes
jeroen@jeroen-mint ~ $

Revision history for this message
Jeremy Jongsma (jeremy-jongsma) wrote :

Brand new Dell Vostro 3700 running Maverick, fully charged battery, seeing the same behavior - it wants to hibernate as soon as I unplug. Using the workaround, when I unplug it still says "5 minutes of power left" (but at least does not hibernate), then within a few seconds it updates to tell me I have 2 hours 45 minutes of power. This looks really sloppy and confusing.

Revision history for this message
Kris Marien (kris-marien) wrote : RE: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

As a mentioned before: changing the action for "lid closed" to "do nothing" or "blank screen" is an other solution.

With this change if unplugging the ac cable the laptop just does nothing or blanks the screen.

This worked for me. Is anybody else helped with this info? Maybe there is a solution to find in this workaround.

The initial workaround did not work for me.

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens Jeremy Jongsma
Verzonden: woensdag 8 december 2010 18:22
Aan: <email address hidden>
Onderwerp: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

Brand new Dell Vostro 3700 running Maverick, fully charged battery, seeing the same behavior - it wants to hibernate as soon as I unplug.
Using the workaround, when I unplug it still says "5 minutes of power left" (but at least does not hibernate), then within a few seconds it updates to tell me I have 2 hours 45 minutes of power. This looks really sloppy and confusing.

--
You received this bug notification because you are a direct subscriber of the bug.
https://bugs.launchpad.net/bugs/531190

Title:
  upower (devkit-power) reporting bad data when AC cable is unplugged

Status in DeviceKit based power management D-Bus backend:
  Confirmed
Status in “upower” package in Ubuntu:
  Triaged
Status in “upower” package in Debian:
  Confirmed

Bug description:
  Binary package hint: upower

upower reports enormous energy-rate for first time after cord is unplugged.
GPM reacts on this first event not checking subsequent events.

This bug is started because I found no ways to collect data for 473552.
I have no devkit-power package.

=== EFFECTS ===

This is the underlying cause to gnome-power-manager immediately reporting critical battery after unplug even while charge is good. It is not a gnome-power-manager problem, the root is here in upower. Please do not report bugs against gnome-power-manager for this!

To workaround the effects execute:

gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

(from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/572541/comments/1>)

=== apport information ===

ProblemType: Bug
Architecture: i386
Date: Wed Mar 3 11:15:13 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/lib/upower/upowerd
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
ProcEnviron:

ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: upower
Uname: Linux 2.6.32-15-generic i686
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
Tags: lucid
Uname: Linux 2.6.32-15-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscribe

Revision history for this message
Roberto Luttino (mindcontact-subscriptions) wrote :

Hi all.

I have a EEEPC 901 GO (with 3G modem) and Ubuntu Maverick, and the problem still present.

What can I do?

Revision history for this message
tlindvall (tarmo-lindvall) wrote :

HP 2133 and Lucid. Is there any progress?

Revision history for this message
Jonas Diaz (jonasdiaz) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when ACcable is unplugged

I'm still waiting for this to be solved. It's really annoying and I'm worried for the lifetime of my battery. I have an Hacer 532H... I've seen that the bug was triaged but the fix has not come yet. This bug should have a really really high importance.
Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

-----Original Message-----
From: tlindvall <email address hidden>
Sender: <email address hidden>
Date: Wed, 22 Dec 2010 16:25:47
To: <email address hidden>
Reply-To: Bug 531190 <email address hidden>
Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC
 cable is unplugged

HP 2133 and Lucid. Is there any progress?

--
You received this bug notification because you are a direct subscriber
of a duplicate bug (666330).
https://bugs.launchpad.net/bugs/531190

Title:
  upower (devkit-power) reporting bad data when AC cable is unplugged

Status in DeviceKit based power management D-Bus backend:
  Confirmed
Status in “upower” package in Ubuntu:
  Triaged
Status in “upower” package in Debian:
  Confirmed

Bug description:
  Binary package hint: upower

upower reports enormous energy-rate for first time after cord is unplugged.
GPM reacts on this first event not checking subsequent events.

This bug is started because I found no ways to collect data for 473552.
I have no devkit-power package.

=== EFFECTS ===

This is the underlying cause to gnome-power-manager immediately reporting critical battery after unplug even while charge is good. It is not a gnome-power-manager problem, the root is here in upower. Please do not report bugs against gnome-power-manager for this!

To workaround the effects execute:

gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

(from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/572541/comments/1>)

=== apport information ===

ProblemType: Bug
Architecture: i386
Date: Wed Mar 3 11:15:13 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/lib/upower/upowerd
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
ProcEnviron:

ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: upower
Uname: Linux 2.6.32-15-generic i686
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
Tags: lucid
Uname: Linux 2.6.32-15-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscribe

Revision history for this message
Alfrenovsky (alfredo-fing) wrote :

El 22/12/10 13:50, Jonas Diaz escribió:
> I'm still waiting for this to be solved. It's really annoying and I'm worried for the lifetime of my battery. I have an Hacer 532H... I've seen that the bug was triaged but the fix has not come yet. This bug should have a really really high importance.
> Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet
>
> -----Original Message-----
> From: tlindvall<email address hidden>
> Sender: <email address hidden>
> Date: Wed, 22 Dec 2010 16:25:47
> To:<email address hidden>
> Reply-To: Bug 531190<email address hidden>
> Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC
> cable is unplugged
>
>
> HP 2133 and Lucid. Is there any progress?
>
La bateria de tu notebook no corre peligro, no es que gaste más o dure
menos, solo hay un instante de transición entre enchufado y desenchufado
en el que el medidor de consumo interpreta cualquier cosa y upower
piensa que como estas consumiendo 700watts queda poco tiempo de bateria.

Revision history for this message
Jonas Diaz (jonasdiaz) wrote :
Download full text (3.8 KiB)

Si pero eso obliga a mi sistema a hibernar a cada momento, entonces cada 10
minutos mi maquina arbitrariamente decide hibernar y es algo fastidioso ya
que tengo que encenderla de nuevo. Simplemente no puedo trabajar con mi
maquina sin que este conectada al cargador AC. Mi batería debería durar 7
horas, así que imagínate cuantas veces tengo que encender mi netbook si
hiberna cada 10 minutos. Por eso digo que el bug debería tener una
criticidad aún mayor ya que vuelve mi equipo prácticamente inutilizable.

Saludos,

2010/12/22 Alfrenovsky <email address hidden>

> El 22/12/10 13:50, Jonas Diaz escribió:
> > I'm still waiting for this to be solved. It's really annoying and I'm
> worried for the lifetime of my battery. I have an Hacer 532H... I've seen
> that the bug was triaged but the fix has not come yet. This bug should have
> a really really high importance.
> > Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet
> >
> > -----Original Message-----
> > From: tlindvall<email address hidden>
> > Sender: <email address hidden>
> > Date: Wed, 22 Dec 2010 16:25:47
> > To:<email address hidden>
> > Reply-To: Bug 531190<email address hidden>
> > Subject: [Bug 531190] Re: upower (devkit-power) reporting bad data when
> AC
> > cable is unplugged
> >
> >
> > HP 2133 and Lucid. Is there any progress?
> >
> La bateria de tu notebook no corre peligro, no es que gaste más o dure
> menos, solo hay un instante de transición entre enchufado y desenchufado
> en el que el medidor de consumo interpreta cualquier cosa y upower
> piensa que como estas consumiendo 700watts queda poco tiempo de bateria.
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (666330).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for 473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately reporting
> critical battery after unplug even while charge is good. It is not a
> gnome-power-manager problem, the root is here in upower. Please do not
> report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set
> /apps/gnome-power-manager/general/use_time_for_policy false
>
> (from <
> https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/572541/comments/1
> >)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0...

Read more...

Revision history for this message
Carsten Agger (agger) wrote :

Jonas, if your computer is hibernating every ten minutes, i think it's a different bug from the one reported here. I haven'st seen that behaviour with equipment affected by this bug. With my laptop, if the cable is u nplugged and it threatens to go into hibernation, everything is OK on battery if I reboot. Maybe you or someone else should report a new bug?

Revision history for this message
tlindvall (tarmo-lindvall) wrote :

Hi all,

Just wandered why so critical bug like this has been open so long. People here are talking, but there isn't anyone listening. Looks like the system goes like this:
This is reported to ubuntu
Ubuntu forwards this to debian
debian forwards this to FreeDesktop
Every movement takes time, repeated reporting and looks like the guy at the end of the chain gets no information at all. At the end of the chain this is a low priority issue and no-one is commenting or giving any further information. Looks like there is something wrong in ubuntu bug coordination process. This is a critical bug and has been open over many releases.

I assume the final destination of this bug is:
https://bugs.freedesktop.org/show_bug.cgi?id=27399
Is that the place where discussion should take place?

Revision history for this message
In , Roberto Luttino (mindcontact-subscriptions) wrote :

The notebook is unusable, it turns off every few minutes and could seriously damage the hard disk.

I tried to download a patch (http://ppa.launchpad.net/brian-rogers/power/ubuntu), the failure was reduced but every now and then reappears.

If this bug is not resolved soon I will be forced to use another operating system in spite of myself .. ;(

Revision history for this message
In , Richard Hughes (richard-hughes) wrote :

The importance flag is for the developer to assign priorities, not the reporter. Could you please try with upstream versions of upower and gnome-power-manager please, as Ubuntu include lots of patches that are not upstream. You probably want to check to see if there are any BIOS upgrades available. Thanks.

Revision history for this message
efa (efa) wrote :

about this effort duplication, all of you can read the opensource book: "After the software wars":
http://en.wikipedia.org/wiki/After_the_Software_Wars
It speak exacly about the relationship between Ubuntu and the Debian distributions (toghether others very interesting arguments inside MS, and its relationship with future of opensource).
Remember that everything is developed and fixed in Debian beta distribution, then got transferred to Ubuntu:
http://en.wikipedia.org/wiki/Debian
http://www.debian.org/misc/children-distros
Only the CDRom distro installer and some other minor parts are developed and manteined by Ubuntu itself, so only those should be reported to Ubuntu. For all the others, to speed up fixing, please post the bugs on the proper uptream lists (kernel.org, freedesktop.org, gnome.org, sourceforge.net, debian.org, etc)

Revision history for this message
In , Roberto Luttino (mindcontact-subscriptions) wrote :

(In reply to comment #2)
> The importance flag is for the developer to assign priorities, not the
> reporter.
I'm very sorry...
It's the first time that I use a bugtracker.

> Could you please try with upstream versions of upower and
> gnome-power-manager please, as Ubuntu include lots of patches that are not
> upstream. You probably want to check to see if there are any BIOS upgrades
> available. Thanks.

I have a EEEPC 901GO with latest BIOS (2103 from ASUS support site) and Ubuntu 10.10 installed from scratch.

Every now and then my laptop low battery warning (0% when in reality the battery was freshly charged) and switches off.

What logs can help you? I would be very pleased to help you in any way.

In the meantime I'll try this other ppa: https://launchpad.net/~brian-rogers/+archive/power
seems more updated

Thanks for your support,
Roberto Luttino

Revision history for this message
In , Sobukus (sobukus) wrote :

Well, then ... I really would like to see this issue resolved. I hope to help with linking in some noise from users that somehow went into the wrong channels (i.e., did not end up here):

https://bugzilla.redhat.com/show_bug.cgi?id=509190
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/531190
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/665806

This is really a very annoying issue that is making Linux unusable on some machines for a very long time now. At least somewhere in the software stack there must be some kind of workaround, if the root cause is flaky hardware.

Settling if/where there is a bug in upower would be a start.

Revision history for this message
In , Sobukus (sobukus) wrote :

And another one:
http://bugs.gentoo.org/334345

Man, why don't we talk to each other?

Revision history for this message
In , Richard Hughes (richard-hughes) wrote :

I'm not sure what the best course of action here is. Usually introducing heuristics causes more issues that working out why the hardware / kernel reports invalid values.

Richard.

Revision history for this message
In , Michael Biebl (mbiebl) wrote :

Maybe the heuristic can be as simple as simply waiting for 10 to 30 secs after unplug before reading the values and just use the old values from before the unplug for that time frame

Revision history for this message
In , tlindvall (tarmo-lindvall) wrote :
Download full text (4.4 KiB)

From this we can see that hardware and kernel reports right figures when unplugging the powercord:
tarmo@tarmo-hpmini ~ $ cat /proc/acpi/battery/BAT1/info
present: yes
design capacity: 2600 mWh
last full capacity: 2383 mWh
battery technology: non-rechargeable
design voltage: 10800 mV
design capacity warning: 120 mWh
design capacity low: 24 mWh
capacity granularity 1: 0 mWh
capacity granularity 2: 100 mWh
model number: Primary
serial number: 100000
battery type: LiOn
OEM info: Hewlett-Packard
tarmo@tarmo-hpmini ~ $ cat /proc/acpi/battery/BAT1/state
present: yes
capacity state: ok
charging state: charging
present rate: 64269 mW
remaining capacity: 1959 mWh
present voltage: 12548 mV
tarmo@tarmo-hpmini ~ $ cat /proc/acpi/battery/BAT1/state
present: yes
capacity state: ok
charging state: discharging
present rate: 1260 mW
remaining capacity: 1959 mWh
present voltage: 11789 mV

Here we can see how upower miscalculates remaining battery charge (time to empty 2.2 minutes):
tarmo@tarmo-hpmini ~ $ upower --dump
Device: /org/freedesktop/UPower/devices/line_power_AC0
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/ACPI0003:00/power_supply/AC0
  power supply: yes
  updated: Wed Jan 12 14:35:07 2011 (835 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: yes

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT1
  vendor: Hewlett-Packard
  model: Primary
  serial: 100000
  power supply: yes
  updated: Wed Jan 12 14:35:13 2011 (829 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: fully-charged
    energy: 2.383 Wh
    energy-empty: 0 Wh
    energy-full: 2.383 Wh
    energy-full-design: 2.6 Wh
    energy-rate: 65.535 W
    voltage: 12.364 V
    percentage: 100%
    capacity: 91.6538%
    technology: lithium-ion

Daemon:
  daemon-version: 0.9.1
  can-suspend: yes
  can-hibernate yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes
tarmo@tarmo-hpmini ~ $ upower --dump
Device: /org/freedesktop/UPower/devices/line_power_AC0
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/ACPI0003:00/power_supply/AC0
  power supply: yes
  updated: Wed Jan 12 14:50:10 2011 (3 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT1
  vendor: Hewlett-Packard
  model: Primary
  serial: 100000
 ...

Read more...

Paul Sladen (sladen)
description: updated
Revision history for this message
tlindvall (tarmo-lindvall) wrote :

Sorry for the previous post. I didn't fully realize how the system works. But back to the problem itself. I took a look about figures kernel reports in sysfs. Looks like current_now is always same figure as power_now, meaning current_now is insane, but power_now is reasonable. I'm on upower 0.9.1 and hp 2133.

I took a look at sourcecode of upower 0.9.1. With knowledge of just one c-course, I came to an idea that the problem might be the following piece of code in up-device-supply.c:

 /* get rate; it seems odd as it's either in uVh or uWh */
 energy_rate = fabs (sysfs_get_double (native_path, "current_now") / 1000000.0);

 /* convert charge to energy */
 if (energy == 0) {
  energy = sysfs_get_double (native_path, "charge_now") / 1000000.0;
  if (energy == 0)
   energy = sysfs_get_double (native_path, "charge_avg") / 1000000.0;
  energy *= voltage_design;
  energy_rate *= voltage_design;
 }

energy_rate rate gets converted from Ampere to Watts only when energy is zero (bug?). But in addition to correcting this we could use power_now as primary source of information. How about changing this code to:

 /* get rate; it seems odd as it's either in uVh or uWh */
 energy_rate = fabs (sysfs_get_double (native_path, "power_now") / 1000000.0);
 if (energy_rate == 0) {
  energy_rate = fabs (sysfs_get_double (native_path, "current_now") / 1000000.0);
  energy_rate *= voltage_design;
 }

 /* convert charge to energy */
 if (energy == 0) {
  energy = sysfs_get_double (native_path, "charge_now") / 1000000.0;
  if (energy == 0)
   energy = sysfs_get_double (native_path, "charge_avg") / 1000000.0;
  energy *= voltage_design;
 }

I would like to test this idea in my netbook, but couldn't figure out how to build ubuntu version of upower 0.9.1. There are some source packages in
http://packages.ubuntu.com/source/lucid/upower
but when extrating package upower_0.9.1.orig.tar.gz, it creates a directory UPower-0.9.1. When trying to apply upower_0.9.1-1.diff.gz by
patch -p0 < upower_0.9.1-1.diff
I get another directory upower-0.9.1 with debian subdirectory.
Could anyone explain in layman terms the whole ubuntu version of upower build and installation process??

Revision history for this message
David Tombs (dgtombs) wrote :

tlindvall: Thanks for being willing to help! You can check out <https://help.ubuntu.com/community/UpdatingADeb> for some instructions.

Revision history for this message
David Tombs (dgtombs) wrote :

efa: Your last bit isn't quite right. Ubuntu maintains a large patch set independent of upstream and Debian. All bugs present in Ubuntu should be reported to this bug tracker.

Revision history for this message
efa (efa) wrote :

I installed UPower 0.9.8 (released on 07-Jan) from freedesktop.
it include a fix for this problem:
"Support the power_now sysfs attribute to get time remaining on new kernels (Richard Hughes)"
It works.

Revision history for this message
David Tombs (dgtombs) wrote :

That would be very good news. Can anyone else confirm? 0.9.8 is in Natty, you can try that. <http://www.ubuntu.com/testing>

Changed in devicekit-power:
importance: Medium → Unknown
Revision history for this message
tlindvall (tarmo-lindvall) wrote :
Revision history for this message
tlindvall (tarmo-lindvall) wrote :

Thanks David for the link. Building debian package was easier than I thought.
0.9.8 didn't work for me (hp2133). My earlier idea helped a little, but didn't fully solve the issue. But I did some more research and I suppose I found the core problem. This is basically a timing issue. If you take a look at 9.04, you can see a delay in gnome-power-manager. And in 9.04 it works.
I could solve this issue by tweaking the timing, but I prefer a sanity check solution because there should not be any change in behavior of those machines not currently affected by this issue and the response is instant.
Downsize of this patch is that in machines without capability of instant acpi updates you cannot see the estimate of remaining battery time instantly, but only after about 30 seconds. I have built and tested this patch in lucid version 0.9.1 and natty version 0.9.8 and I am using this daily in lucid and happy with ubuntu again. I would like to share this if someone is interested, if someone could advise me how to do it:
- debuild created some sort of patch file like upower_0.9.1-1.1.diff.gz or. Is this the one to download here or should I create diff using only the modified c file?
- debuild also created a lot of .debs that might be useful if someone else is interested in testing this patch? Is there some place I could upload these? Which of those .debs are needed for installation (I just used sudo debi to install)?
- is natty version of upower build in lucid usable in natty?

Revision history for this message
tlindvall (tarmo-lindvall) wrote :
Revision history for this message
tlindvall (tarmo-lindvall) wrote :

Enhanced version of patch for lucid. In most cases should show the remaining time also. Downside is small delay in responding unplug event. Should not have any effect on systems not affected by this bug i.e. should be suitable as a common correction for lucid.

Revision history for this message
tlindvall (tarmo-lindvall) wrote :

Here is patched .deb package for lucid version of upower (0.9.1-1). It adds a sanity check of data and small delay for machines with bios not updating uevent data instantly. I can't take any responsibility of the quality or correctness, but if someone having this bug is willing to give it a try that would be helpful. Also if someone not having this bug could give it a try would be helpful (should not have any effect if correct). I have tested this only on hp2133 running 10.04.

thanks,

Revision history for this message
Jonas Diaz (jonasdiaz) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged
Download full text (3.2 KiB)

I've just done something really bad. I tried to uninstall upower and install
this patched and my system broke. I can't get the Xs up. :S I'm gonna have
to reinstall Ubuntu. Is there any instructions of how to install this
patched version?...

2011/2/3 tlindvall <email address hidden>

>
> Here is patched .deb package for lucid version of upower (0.9.1-1). It
> adds a sanity check of data and small delay for machines with bios not
> updating uevent data instantly. I can't take any responsibility of the
> quality or correctness, but if someone having this bug is willing to give it
> a try that would be helpful. Also if someone not having this bug could give
> it a try would be helpful (should not have any effect if correct). I have
> tested this only on hp2133 running 10.04.
>
> thanks,
>
> ** Attachment added: ".deb of patched upower 0.9.1-1"
>
> https://bugs.launchpad.net/ubuntu/+source/upower/+bug/531190/+attachment/1827099/+files/upower_0.9.1-1.2_i386.deb
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (666329).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
...

Read more...

Revision history for this message
Rafael Reggiani Manzo (rr-manzo) wrote :

This worked fine for me (--force-overwrite because on my 10.10 upower_0.9.5-4_i386.deb is installed):

sudo dpkg --force-overwrite -i upower_0.9.1-1.2_i386.deb

Also, instead of reinstall your ubuntu, you tried the following?

sudo apt-get install upower

As a first feedback, during all day on my UNR 10.10 (Acer NAV50) it's working very well!
The only issue I noticed is that when I turn on the computer it doesn't identify that I'm using the battery. I need to start it using AC and after unplug it, so it identify that i'm using my battery.

Revision history for this message
Jonas Diaz (jonasdiaz) wrote :

Yeah I tried that in console mode (I also had the upower_0.9.5-4_i386.deb) but
my NIC did not seem to be up, so It could not connect to the repository.
Thanks for your suggestion I did not know that --force option.

2011/2/3 Rafael Reggiani Manzo <email address hidden>

> This worked fine for me (--force-overwrite because on my 10.10
> upower_0.9.5-4_i386.deb is installed):
>
> sudo dpkg --force-overwrite -i upower_0.9.1-1.2_i386.deb
>
> Also, instead of reinstall your ubuntu, you tried the following?
>
> sudo apt-get install upower
>
>
> As a first feedback, during all day on my UNR 10.10 (Acer NAV50) it's
> working very well!
> The only issue I noticed is that when I turn on the computer it doesn't
> identify that I'm using the battery. I need to start it using AC and after
> unplug it, so it identify that i'm using my battery.
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (666330).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscribe
>

tags: added: patch
Changed in devicekit-power:
importance: Unknown → Critical
Revision history for this message
efa (efa) wrote :

@tlindvall propose your patch directly to the upstream freedesktop upower team, so they can test it on many brand/architectures, and both new and old kernels, as this problem is related to a new meaning/parameter the recent kernel report about the batteries.

Revision history for this message
Jonas Diaz (jonasdiaz) wrote :

Hello, I know this may not be the case but I accidentally tried to uninstall
the upower package that I had running in my machine using the software
center (it told me that some packages were going to be uninstalled too) and
I hit yes, but after I did that my ubuntu can no longer boot (it stays stuck
in checking battery state), in fact my machine tried to reboot while the
packages ere uninstallig. Please do you know which packages where those so I
can installed them again and not reinstall ubuntu?...I will really
appreciate your help...Thanks

2011/2/3 efa <email address hidden>

> @tlindvall propose your patch directly to the upstream freedesktop
> upower team, so they can test it on many brand/architectures, and both
> new and old kernels, as this problem is related to a new
> meaning/parameter the recent kernel report about the batteries.
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (666329).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscribe
>

Revision history for this message
efa (efa) wrote :

gdm, gdm-guest-session, gnome-power-manager, gnome-session, indicator-session, ubuntu-desktop,
depends on upower, so removing upower, gnome will be removed.

To replace and try a so critical package, recompile it, sudo make install, then reboot!
To replace the old one, ask to reinstall the official package from synaptic, then reboot.

Revision history for this message
chiel-s (chiel-graphx) wrote :

I have a msi x340 and I have got the same problem. I have changed the settings in the gconfig-editor but it's not working.

Could anyone help me out?

Cheers!

Revision history for this message
efa (efa) wrote :

UPower 0.9.8 let my netpc stay on unplugging the power cable.
But the icon on the task bar show AC power as always connected, so it is not perfect.

Revision history for this message
xavier (s.xavier) wrote :

I am using natty beta 1, I encouter this bug on a packard bell kav60. I tried the workaround with the gconf-editor without any success. What could I do to fix it?

Revision history for this message
Jure Sah (dustwolfy) wrote :

This used to be fixed for me for a while with some sort of delay but now it's broken again.

Revision history for this message
Jure Sah (dustwolfy) wrote :

For everyone suffering from an immediate ticket to oblivion when disconnecting the charger on laptops with buggy suspend:

Alt-F2 and launch gconf-editor
Navigate to apps>gnome-power-manager>actions
Change the value of critical_battery to "nothing"

Credit: http://ubuntuforums.org/archive/index.php/t-1555188.html slush1000

Revision history for this message
In , Andreas K. Hüttel (dilfridge) wrote :

https://bugs.gentoo.org/show_bug.cgi?id=360607

Another related bug report. Here, the numbers seem to be wrong always after resume from suspend.

Revision history for this message
Greg White (gwhite-kupulau) wrote :

I think you have multiple problems here. One of them is that either energy-full or energy-full-design is wildly incorrect, resulting in very low % full readings. There's an example above - here's mine. Note that upower (and battery meter), are both reporting 11% left; there's really a lot more than that.

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  vendor: DPONz4516KWDGKMA3123456789ABCDE
  model: bq20z4516KWDGKMA3123456789ABCDE
  power supply: yes
  updated: Tue Apr 19 21:07:33 2011 (12 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 75.59 Wh
    energy-empty: 0 Wh
    energy-full: 636.83 Wh
    energy-full-design: 84.5 Wh
    energy-rate: 17.343 W
    voltage: 11.92 V
    time to empty: 4.4 hours
    percentage: 11.8697%
    capacity: 100%
  History (charge):
    1303261653 11.870 discharging
    1303261623 11.893 discharging
    1303261593 11.915 discharging
    1303261563 11.936 discharging
  History (rate):
    1303261653 17.343 discharging
    1303261623 20.442 discharging
    1303261593 15.973 discharging
    1303261563 15.189 discharging

Revision history for this message
Matt Jaffe (jaffe-matthew) wrote :

@dustwolf- This is a fantastic fix. Thanks so much.

For the other noobs out there like me, you may have to launch your terminal
then launch gconf-editor from there. My netbook didn't launch crap with
Alt-F2.

On Sat, Apr 2, 2011 at 1:44 PM, DustWolf <email address hidden> wrote:

> For everyone suffering from an immediate ticket to oblivion when
> disconnecting the charger on laptops with buggy suspend:
>
> Alt-F2 and launch gconf-editor
> Navigate to apps>gnome-power-manager>actions
> Change the value of critical_battery to "nothing"
>
> Credit: http://ubuntuforums.org/archive/index.php/t-1555188.html
> slush1000
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscribe
>

Revision history for this message
In , Andreas K. Hüttel (dilfridge) wrote :

From the Gentoo bug report:

--- Comment #8 from Lu Ran <email address hidden> 2011-04-23 19:42:50 UTC ---
I have a W510 with amd64 Gentoo, exactly the same anonying bug, I did some
research and I think it is a bug in the kernel, though upower handle data
differently from hal thus exposed the bug. Here is the problem I find:

When I boot up normally, "cat /sys/.../BAT0/charge_now" gives me something like
this:

7517000

"cat /sys/../BAT0/charge_full" shows

9396000

Use the battery for a while, (I am not sure exactly how to trigger this
reliably though), the number beomes

69350000

and

93960000

Notice the extra "0"! However upower only check charge_full once when it
starts, now it find "energy" calculated from "charge_now" is larger than
"energy_full" calculated from "charge_full", it assume "energe_full" is wrong
and replace the value using "energy" calculated from "charge_now".The battery
capacity become 100% for a while.

Now suspend/resume, the number from "charge_now" and "charge_full" becomes
normal again, but now upower have a cached "energy_full" calculated when
"charge_now" is 10 times larger. The capacity upower calculated will hardly be
larger than 10%.

Revision history for this message
Miroslav (dzundam-deactivatedaccount) wrote :

I'm contributing with "me too".

Running Ubuntu 10.10

Take a look at attached screenshot,
I get those spikes in the power history
whenever I plug or unplug the power cord
from the laptop.
Obviously the spikes are wrong readings,
should be filtered out by the upower
because they screw gnome-power-manager.

I suggest - whenever there is power related
event, upower should take 3 readings of power
consumption in the row (with slight delay) and
should reject unusually high/low value and
report the average of remaining 2 values.

Revision history for this message
sid (itissid) wrote :
Download full text (3.2 KiB)

yes! what ever happened to good old sampling and running averages!?

On Fri, Apr 29, 2011 at 1:26 AM, Miroslav <email address hidden> wrote:

> I'm contributing with "me too".
>
> Running Ubuntu 10.10
>
> Take a look at attached screenshot,
> I get those spikes in the power history
> whenever I plug or unplug the power cord
> from the laptop.
> Obviously the spikes are wrong readings,
> should be filtered out by the upower
> because they screw gnome-power-manager.
>
> I suggest - whenever there is power related
> event, upower should take 3 readings of power
> consumption in the row (with slight delay) and
> should reject unusually high/low value and
> report the average of remaining 2 values.
>
>
> ** Attachment added: "lovely spikes in power history"
>
> https://bugs.launchpad.net/ubuntu/+source/upower/+bug/531190/+attachment/2095068/+files/Screenshot-Power%20Statistics%20-%20Device%20History.png
>
> --
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (516023).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Confirmed
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To unsubscribe from this bug, go to:
> https://bugs.launc...

Read more...

Revision history for this message
In , Richard Hughes (richard-hughes) wrote :

I'm pretty sure we work around the kernel bug in new releases -- the problem was tat the kernel sometimes changed the reporting data units between suspend and resume. If this doesn't work with a new kernel and upower, than please reopen. Thanks.

Revision history for this message
In , Michael Biebl (mbiebl) wrote :

Hi Richard!

(In reply to comment #9)
> I'm pretty sure we work around the kernel bug in new releases -- the problem
> was tat the kernel sometimes changed the reporting data units between suspend
> and resume. If this doesn't work with a new kernel and upower, than please
> reopen. Thanks.

Which version of the Linux kernel and gnome-power-manager are supposed to have those workarounds?

Changed in devicekit-power:
status: Confirmed → Fix Released
Revision history for this message
efa (efa) wrote :

11.04 the Natty Narwhal updated with last patches today, continue to suspend my netpc when remove power plug.
The supplied (default) upower with 11.04 is:
$ upower --version
UPower client version 0.9.9
UPower daemon version 0.9.9

As workaround, I keep a kernel root console open (CTRL-ALT-F1), this prevent shutting down the netpc, but the Critical battery message appear, and auth pass is requested. I simply press cancel.

Revision history for this message
In , efa (efa) wrote :

ubuntu 11.04 with K2.6.38-8-generic
$ upower --version
UPower client version 0.9.9
UPower daemon version 0.9.9

I got my netpc goes to suspension disconnecting power plug with batteries completely charged.

Revision history for this message
Joonas Saarinen (jza) wrote :

Also affects LG X110 netbook.

Revision history for this message
alex p. (lionalx) wrote :

i have msi wind u100.

read some of the discussion here, and im pretty advanced linux user, but do not understand what to do now - how do i apply the patch? is upgrading upower really helps? if i want it, do i need to compile it by myself?

Revision history for this message
jonesints (jone-u2) wrote :

Can confirm like @efa says, Natty still keeps suspending/hibernating after unplugging- on a friend's advent 4211 netbook.

Revision history for this message
David Tombs (dgtombs) wrote :

@alex p: If you look at the Gnome bugzilla report you'll see that the upower developer said that the latest kernel and upower has the fix. You can find current mainline kernel builds at [1] and you'd probably have to build upower from source.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/

Revision history for this message
HousieMousie2 (housiemousie2) wrote :

Still present on 11.04.
Toshiba NB505
(Dell)Alienware M17x

Revision history for this message
psysonic (psysonic-c) wrote :

Still affects system on 11.10 beta
msi x-slim x340

Revision history for this message
efa (efa) wrote :

can you post the output of:
$ upower --version
with 11.10 ?

Revision history for this message
Ronald Kinard (furyhunter) wrote :

furyhunter@tenacity:~$ upower --version
UPower client version 0.9.13
UPower daemon version 0.9.13

This is happening on a Lenovo 3000 N100. I'm reporting bug #839017 as a duplicate of this bug. Hopefully those later versions of upower and the kernel will make it to the next beta at the very least.

Revision history for this message
D J Eddyshaw (david-eddyshaw) wrote :

Affects me on 11.10 too, running on a Dell Mini 9.

It was fine in 11.04, incidentally.

I have the same result from upower --version as furyhunter.

Revision history for this message
D J Eddyshaw (david-eddyshaw) wrote :

Also, with Oneiric on my Dell Mini 9 ...

Problem is *not* solved by removing gnome-power-manager altogether.
But ... problem does not occur at all if you use Xfce instead of Unity.

What's different about Xfce's power management versus Unity? Doesn't it rely on upower too?

Revision history for this message
D J Eddyshaw (david-eddyshaw) wrote :

Furthermore, none of the workarounds work in Oneiric. The relevant keys for gnome-power-manager no longer exist in gconf, and creating them has no effect.

Revision history for this message
Chris Boyle (chris-boyle-1978) wrote :

In order to work around this issue in Oneiric, you can issue the following command:

gsettings set org.gnome.settings-daemon.plugins.power 'use-time-for-policy' 'false'

You can alternatively do the following:

1. sudo apt-get install dconf-tools
2. dconf-editor
3. Navigate to the 'org.gnome.settings-daemon.plugins.power' section
4. Uncheck 'use-time-for-policy'

I still get a popup when unplugging the power but I just hit Cancel and everything works fine. Before I did this, it would hibernate/turn off/whatever no matter what I did.

Revision history for this message
D J Eddyshaw (david-eddyshaw) wrote :

Thanks - that seems to work nicely as a workaround on Oneiric for me too. Very helpful.

Revision history for this message
zac.roesch (zac-roesch) wrote :

11.10 (and 11.04 before upgrade), upower 0.9.13, Eee 1005 HA

I've been having this problem for the last three or so months. It is totally identical to everyone else's issues, except that neither of the workarounds fixed it.

I got a new battery, thinking the old one was probably about dead anyway, and with the new battery at 100% on ac power it works fine. When I unplug it from AC power, I get anywhere from 30 seconds to 30 minutes on battery power before the computer shuts itself completely down. On a restart after this, the computer will run for about 1 minute before it dies. It's incredibly frustrating.

This problem is not resolved for me. I'm wondering if a fresh install or an older version of upower would fix this.

Anyone have any other ideas or have any confirmed fixes?

Revision history for this message
Iztok Jeras (iztok.jeras) wrote :

I have the same problem on MSI X340, none of the workarounds helps. I will wait for a fix, test it and report.

Revision history for this message
Rodolfo Saccani (rsaccani) wrote :

Same issue on a Medion Akoya (rebranded MSI Wind) with Ubuntu 11.10.
The work-around in comment #94 worked in my situation.

Revision history for this message
zac.roesch (zac-roesch) wrote :

Yeah, I tried dconf-editor, and now I get a question about what to do with I unplug ac power, but even after I hit cancel, the thing still shuts of.

Revision history for this message
Agata Jankowska (agata-a-jankowska) wrote :

Same issue with my MSI Wind with Ubuntu 11.10.
The work-around in comment #94 worked in my situation.
This bug is troubling me for a year now if memory serves me well...

Revision history for this message
genewitch (genewitch) wrote :

it is a timer issue on plugging in the A/C power and sleep. I use my netbook many times a day like this, and occasionally forget to plug it in until after the screen has shut off. If i plug in the netbook after the screen shuts off, and then unplug it before i wake up the machine, it reads 0:02 battery remaining and this bug occurs.

reproduction is simple, wait until sleep. plug in AC. Wait an hour or more, unplug, wake up.

it took me a while to track down the issue because it seemed random.

Revision history for this message
genewitch (genewitch) wrote :

Update: it did it again, woke up machine, typed password, unplugged, warning came up, it powered itself off.

This isn't triaged for everyone.

Revision history for this message
franco_bez (franco-bez) wrote :

Today I also got affected.

I removed the laptop from the docking-station, the message popped up and laptop was shutdown.

Revision history for this message
Alberto (albertorcf) wrote :

I have the same problem.
Ubuntu 11.10 32 bit
netbook msi wind

Also, after suspend, if I unplug from AC power, when resume the system crashes and I have to turn off and turn on. If I don't unplug from AC power, it resumes ok.

Revision history for this message
David Tombs (dgtombs) wrote :

zac.roesch: Your problem might be related to upower, but are you sure the new battery you got isn't toast?

Revision history for this message
David Tombs (dgtombs) wrote :

This is very likely a dupe of bug 120258. Let's see if this is resolved when that one is.

Revision history for this message
Alberto (albertorcf) wrote :

It has started when I installed 11.10.
With 10.04 I had no problem with the battery use.
Em 15/11/2011 22:40, "David Tombs" <email address hidden> escreveu:

> zac.roesch: Your problem might be related to upower, but are you sure
> the new battery you got isn't toast?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Fix Released
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscriptions
>

Revision history for this message
David Tombs (dgtombs) wrote :

Alberto, then you have a different bug since this one has been around a while. Please report a new one with "ubuntu-bug upower".

Revision history for this message
Andrew Somerville (andy16666) wrote :

I would say just by looking at this bug that a number of its duplicates (including the one I reported) aren't actually duplicates. The issue I reported was specific to 11.10 and was not present in the LTS.

Is it possible that someone has over-generalized this issue to include new issues as well?

Revision history for this message
Ronald Kinard (furyhunter) wrote :

I do feel as though that is the case. The bug came into play during the
testing phases of 11.10, and is still prevalent in the current version.

Revision history for this message
David Tombs (dgtombs) wrote :

Well, as I said to Alberto above, please create a new bug report if you started experiencing the problem in 11.10. As you can see from the dates in this bug, it has been around for a while. Please link to the new bug from here if/when you do.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Dates have nothing to do with bug deficiencies. This fits the problem bug perfectly and thus all activity should be centralized towards the pertinent bug: This one

Revision history for this message
David Tombs (dgtombs) wrote :

Hi Chauncellor, I'm sorry but that's not true. Bug reports are associated with a root cause, and more than one root cause can cause the same symptom (e.g. bug 197762). So, it is correct to have multiple bug reports demonstrating the same symptom, especially if a distinction between the reports can be made like when the bug initially reared its head.

Revision history for this message
Matt Jaffe (jaffe-matthew) wrote :

New bug, same bug- what's the difference? It's been a problem for well over
a year and nothing is being done about it.

On Thu, Nov 17, 2011 at 8:58 PM, David Tombs <email address hidden> wrote:

> Hi Chauncellor, I'm sorry but that's not true. Bug reports are
> associated with a root cause, and more than one root cause can cause the
> same symptom (e.g. bug 197762). So, it is correct to have multiple bug
> reports demonstrating the same symptom, especially if a distinction
> between the reports can be made like when the bug initially reared its
> head.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> Status in DeviceKit based power management D-Bus backend:
> Fix Released
> Status in “upower” package in Ubuntu:
> Triaged
> Status in “upower” package in Debian:
> Confirmed
>
> Bug description:
> Binary package hint: upower
>
> upower reports enormous energy-rate for first time after cord is
> unplugged.
> GPM reacts on this first event not checking subsequent events.
>
> This bug is started because I found no ways to collect data for bug
> #473552.
> I have no devkit-power package.
>
> === EFFECTS ===
>
> This is the underlying cause to gnome-power-manager immediately
> reporting critical battery after unplug even while charge is good. It
> is not a gnome-power-manager problem, the root is here in upower.
> Please do not report bugs against gnome-power-manager for this!
>
> To workaround the effects execute:
>
> gconftool-2 --type bool --set /apps/gnome-power-
> manager/general/use_time_for_policy false
>
> (from <https://bugs.launchpad.net/ubuntu/+source/gnome-power-
> manager/+bug/572541/comments/1>)
>
> === apport information ===
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Mar 3 11:15:13 2010
> DistroRelease: Ubuntu 10.04
> ExecutablePath: /usr/lib/upower/upowerd
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> ProcEnviron:
>
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> SourcePackage: upower
> Uname: Linux 2.6.32-15-generic i686
> ---
> Architecture: i386
> DistroRelease: Ubuntu 10.04
> InstallationMedia: Lubuntu 10.04 "Lucid Lynx" - Alpha 3 i386 (20100225)
> Package: upower 0.9.0+git20100216.b9bb78-0ubuntu1
> PackageArchitecture: i386
> ProcEnviron:
> LANGUAGE=en_US.UTF-8
> LANG=en_US.UTF-8
> LC_MESSAGES=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
> Tags: lucid
> Uname: Linux 2.6.32-15-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscriptions
>

Revision history for this message
komputes (komputes) wrote :

I can confirm this on a Dell Mini 9 (Inspiron 910) and a Dell Latitude E6510 (Certified up until 11.04).

This issue only started with 11.10 (Oneiric). I find this happens when I boot with power plugged in and I disconnect the power once in a session.

Revision history for this message
In , Ben Gamari (bgamari) wrote :

Given my own experience, as well as that of others (https://bugs.launchpad.net/ubuntu/+source/upower/+bug/531190), it seems that this is still occurring. Is it possible that this still isn't fixed in upower 0.9.13 running on a 3.0.0 kernel?

Revision history for this message
calbaker (calbaker) wrote :

A workaround that has been working for me is to go to settings for Power, and for the setting "When power is critically low" tell it to shutdown rather than hibernate. It's not shutting down when I come back from suspend so it seems to be fine.

Revision history for this message
Kris Marien (kris-marien) wrote :

even a better workaround is setting "when lid closed" tell it to "do nothing" or "blank screen"

This worked for me when unplugging the cable it only blanked the screen or did nothing instead of hibernating.

Maybe there is a solution to be found in this context?

I am using the latest LTS version of ubuntu, up to date till today.

Revision history for this message
Brian (x-brian) wrote :

I have problems with my Dell E6410 running 11.04 Natty Narwhal. I noticed some strange values for BAT0 (I have BAT1 but not installed). The following were from when my computer's battery was fully charged and on AC power:

$ cat /sys/class/power_supply/BAT0/charge_full
8061000
$ cat /sys/class/power_supply/BAT0/charge_now
8400000
$ cat /sys/class/power_supply/BAT0/charge_full_design
8400000

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  vendor: SMP
  model: DELL HJ59002
  serial: 6061
  power supply: yes
  updated: Tue Nov 29 14:48:33 2011 (631 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: fully-charged
    energy: 93.24 Wh
    energy-empty: 0 Wh
    energy-full: 93.24 Wh
    energy-full-design: 93.24 Wh
    energy-rate: 2.997 W
    voltage: 13.038 V
    percentage: 100%
    capacity: 95.9643%
    technology: lithium-ion

$ upower -v
UPower client version 0.9.9
UPower daemon version 0.9.9

So may battery says it has 100% charge, but that it is no longer capable of 100% charge (capacity = 95.9643%). The battery charge indicator in Gnome (classic) displays what looks like a critical battery icon (red battery outline), but the drop-down menu lists "Laptop battery is charged." Sometimes I will get an indicator that the battery is critical as soon as I unplug AC power, at which time it will hibernate.

It seems like there is some error when it receives values with charge_now > charge_full. Does anyone else with this problem see similar values?

Revision history for this message
David Tombs (dgtombs) wrote :

Kris: I think you're probably experiencing bug 481312, which has been fixed in recent versions of Ubuntu. It has not been fixed, however, in 11.04 which is probably what you are running.

Brian: you should submit a new bug report for your issue (or look for one that already exists), as it is different from this one.

Revision history for this message
nikitakit (nikitakit) wrote :

I'm still experiencing power problems in 11.10. Specifically, if I unplug my laptop's power cord immediately before opening the lid and leaving suspend mode, the computer pops up a "battery criticall low, will suspend" message. At the same time the indicator in the top right showns 100% battery power.

(I have a hunch, unconfirmed, that this issue is more likely to occur when the battery is 100% charged as opposed to when it's only partially charged)

Revision history for this message
Michael (michaeljt) wrote :

I just added a link in the other direction, but see bug 882160. Do other subscribers to this bug see this phantom battery too? And if so, does the critical battery warning appear at the same time?

Revision history for this message
Michael (michaeljt) wrote :

Brian: I checked but the values of /sys/class/power_supply/BAT0/charge_* on my Dell Latitude E6410 were all equal to 5600000 (so no strange charge_now greater than charge_full) on at least one occasion when I had the warning.

Revision history for this message
Michael (michaeljt) wrote :

On the offchance that my idea is right I am about to test the following patch to gnome-setting-deamon. If anyone has a clue about that code please take a look and tell me if it is correct or hopeless.

$ diff -ud ./plugins/power/gsd-power-manager.c.old ./plugins/power/gsd-power-manager.c
--- ./plugins/power/gsd-power-manager.c.old 2011-12-09 23:26:57.786558053 +0100
+++ ./plugins/power/gsd-power-manager.c 2011-12-09 23:30:02.812727359 +0100
@@ -375,9 +375,16 @@
 engine_get_warning_percentage (GsdPowerManager *manager, UpDevice *device)
 {
         gdouble percentage;
+ gboolean is_present;

         /* get device properties */
- g_object_get (device, "percentage", &percentage, NULL);
+ g_object_get (device,
+ "percentage", &percentage,
+ "is-present", &is_present,
+ NULL);
+
+ if (!is_present)
+ return WARNING_NONE;

         if (percentage <= manager->priv->action_percentage)
                 return WARNING_ACTION;
@@ -393,13 +400,18 @@
 {
         UpDeviceKind kind;
         gint64 time_to_empty;
+ gboolean is_present;

         /* get device properties */
         g_object_get (device,
                       "kind", &kind,
                       "time-to-empty", &time_to_empty,
+ "is-present", &is_present,
                       NULL);

+ if (!is_present)
+ return WARNING_NONE;
+
         /* this is probably an error condition */
         if (time_to_empty == 0) {
                 g_debug ("time zero, falling back to percentage for %s",

Revision history for this message
Michael (michaeljt) wrote :

With that patch applied I can no longer immediately reproduce the problem, though it may just be chance as it is somewhat unpredictable. I will wait a couple of weeks before coming to a verdict. Of course, even if that does solve it for me it may be that other people may be seeing the same symptoms of a different problem and won't be helped by that patch. And the real fix would probably to check whether a battery is present before taking it into the battery list at all.

Revision history for this message
Chris Morgan (chris.morgan) wrote :

Michael:

- I've been seeing the phantom battery since, I believe, at least Ubuntu 10.10 (InstallationMedia 9.10).
- I've been experiencing this problem in Ubuntu 11.10; I think I did in 11.04 but can't remember. Earlier information is useless as I replaced the battery some time during having 11.04, the earlier battery I had was faulty and reported itself as critically low whenever unplugged (in spite of really having half an hour's life in it).
- The use_time_for_policy workaround seemed to improve the situation for me at first, but it still does it generally in the unplug-then-wake-up situation. I'm actually not sure now whether it improved anything, whether my usage pattern just changed.
- I'm not going to test your patch (well, if you put it in a PPA I'd test it, but I'm too slack to try it out myself).

If there's any more information you'd like from me, I'm happy to try to provide it.

Revision history for this message
Michael (michaeljt) wrote :

I could upload the amd64 package I built somewhere (no clue about PPAs, but if there is a way to do it which doesn't take too much time I could do) if people would like, though I must admit I am not too keen, as I don't like to encourage people to use random binaries from people they don't know.

Revision history for this message
Jorge Antonio Dias Romero (jorgepoa10-deactivatedaccount) wrote :

I have the same problem with 11.10. The message of battery critically low appears after unplug AC cable, but the battery monitor itself shows the battery is fully charged.

Changed in upower (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
zac.roesch (zac-roesch) wrote :

David Tombs: This battery is brand new, though it started with an older battery that could have been bad. At this point, I won't know, though it would be nice to have two batteries.

Part of the irregularity I experience with the bug is that sometimes the machine will work fine until, as others have mentioned, the lid is closed of it goes to sleep. Once it's woken up, crit bat.

Thinking about reinstalling, because wth. I'd like to know if that would be a reasonable solution before I create a lot of extra work for myself (and may still end up with the same problem).

Has there been any solid progress with this yet?

And happy new year.

Revision history for this message
lasher (lasher) wrote :

I also have this problem. Have stayed with Natty (well, Linux Mint 11) to avoid it, however a recent update has caused it to sleep every time and an added displeasure of wifi failing after waking (anther bug?). Before wifi would fail only sometimes and require reboot now it is all the time. Quick fix was to disable use_time_for_policy in gconf-editor thanks to this bug report.

Revision history for this message
Gustavo Veloso (gjmveloso) wrote :

It's unbelievable how a HUGE bug can't be handled by Ubuntu developers properly. Sad, very sad.

Revision history for this message
Michael (michaeljt) wrote :

Actually this is fixed for me - see bug 852406. It was an upstream kernel workaround for bad ACPI events sent by the hardware. I really wouldn't blame the Ubuntu developers for that, as fixing any bug of this sort (of which there are far too many) takes an enormous effort - see all the comments on these bug tickets, many of which are actually users actively working to track down the problem, and it involves hardware they may not own and a component (the kernel) which they package but certainly didn't develop themselves.

Revision history for this message
statquant (statquant) wrote :

Damn, I truied the quick fix proposed and that did not work.
I am surprised to see that this bug is considered as fixed... IT IS NOT
There are still tens of us who cannot use their laptop because of this... I now use Windows XP because of this...

I have upower 9.13, ubuntu 11.10.

Is there anywhere an actual FIX to that problem?
Thanks if somebody can help

Revision history for this message
In , Jorge-ad-romero (jorge-ad-romero) wrote :
Revision history for this message
Greg Conquest (gregconquest) wrote :

Statquant, "tens of us who cannot use our laptops"? I've been trying to deal with this problem since 11.04 (or before) on my DELL mini 9 also, but I haven't posted anything about it. I just have been shutting down everytime I have to move from an outlet, and I imagine a LOT of other people are continuing to do likewise.

For us potentially thousands of users who are reading this but don't have anything to add and don't know what to do and don't don't which bug is afflicting us, can someone update this and say if anything is working, please? Has the bug(s) actually been clearly diagnosed? This is a big inconvenience for a lot of people.

Thank you in advance for the guidance.

Revision history for this message
Michael (michaeljt) wrote :

Greg, I suspect that this bug is actually several related ones, as for my system it does seem to have been fixed upstream. I would also not be surprised if it is due to (various cases of) quirky hardware which was deemed to work because it tested successfully under Windows. It might be worth your while though going upstream (e.g. to the kernel bugzilla) with this, as you are more likely to get the people who really understand this stuff (no offence to Canonical and their kernel engineers - no one can understand more than a small cross section of the kernel code).

Revision history for this message
Hein van Dam (h-t-vandam) wrote : bug 531190

Workaround no longer works with oneiric on msi wind

Revision history for this message
efa (efa) wrote :

As asked at:
http://upower.freedesktop.org/
I tried to post something on the upstream mail list for upower (on freedesktop):
<email address hidden>
my posts was ignored. So I think Canonical is not responsible as they inherit the code.
Try yourself to writo to them.

tags: added: maverick natty oneiric
Revision history for this message
Jorge Antonio Dias Romero (jorgepoa10-deactivatedaccount) wrote :

Good news, folks. I just installed Precise Beta 1 and the bug seems to be fixed. As commented before, probably was a kernel-related issue. So, since - apparently - is not necessary install Precise, would be nice if we get more people testing this to see if this bug is still occurs in the new kernel.
PS: I think that's not necessary install Precise in HDD to test this, because - at least in my case - the bug didn't appear in the boot from USB too.

Revision history for this message
cherep (acherep) wrote :

it seems to be working on my msi x340 with Precise Beta 1. After unpluging the cable, there are no more wrong reports about critical battery.

Revision history for this message
HousieMousie2 (housiemousie2) wrote :

Still present on 11.10, fully updated.
Toshiba NB505
(Dell)Alienware M17x

Revision history for this message
Vladimir Hidalgo (vlad88sv) wrote :

VAIO Series E (VPCEB15EL), 11.10 fully updated and still not working.

Had to use this workaround:
gconftool-2 --type bool --set /apps/gnome-power-manager/general/use_time_for_policy false

Revision history for this message
Kris Marien (kris-marien) wrote :

Additional information about this bug:

the incorrect readings of gpm only occure 2 me when I unplug the cable that is connected to my laptop and they don't occur when I unplug the power cable from the wall contact.

Maybe this helps solving the problem and maybe some people can try it and use it as a workaround.

Revision history for this message
Kris Marien (kris-marien) wrote :

Can anyone confirm previous post #153 that it happens on other laptops too?

Revision history for this message
efa (efa) wrote :

seems incredible, but charged capacitors in the external power supply can make the difference, let voltage dropping at very slow rate. I will test this on my netPC

Revision history for this message
David Tombs (dgtombs) wrote :

So, same behavior in 12.04 Precise?

Revision history for this message
Jonathan Reeve (jon-reeve) wrote : Re: [Bug 531190] Re: upower (devkit-power) reporting bad data when AC cable is unplugged

Actually, I haven't seen this bug since upgrading to Precise.

On Mon, Jul 16, 2012 at 7:51 PM, David Tombs <email address hidden> wrote:

> So, same behavior in 12.04 Precise?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (558627).
> https://bugs.launchpad.net/bugs/531190
>
> Title:
> upower (devkit-power) reporting bad data when AC cable is unplugged
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devicekit-power/+bug/531190/+subscriptions
>

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Nor have I. Could the original reporter come in and see if 12.04 has fixed it?

Revision history for this message
Konstantin Lavrov (lacosta) wrote :

Well. I'm not experiencing this bag on that my laptop anymore.
But I need to say that now I have lubuntu installed on it.
So here now xfce4-power-manager is used instead of gnome-power-manager.
This was upower bug but it was G-P-M who turned off power on unplug events.

Revision history for this message
David Tombs (dgtombs) wrote :

OK, based on the upstead "Fix Released" status, I'll assume this is fixed in 12.04. Thanks everyone for your patience!

Changed in upower (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
David Tombs (dgtombs) wrote :

upstream*

Revision history for this message
In , David Tombs (dgtombs) wrote :

Appears to be fixed in Ubuntu (see linked Ubuntu report).

Revision history for this message
efa (efa) wrote :

with 11.10 still happen also after full packages upgrade.
Disconnecting main power supply from wall socket or DC plug from the NetPC (MSI Wind 90), same effect, always switch off after 10 seconds for "low battery"

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

For those on pre-12.04 releases, this bug will likely remain as the codebase is frozen for that release. The fix will need to manually be backported either by upstream or by someone willing to submit a patch to Ubuntu 11.10.

Revision history for this message
efa (efa) wrote :

this bug was opened against Ubuntu 10.04, at first should be fixed for this

Revision history for this message
Fito Hoyos (fitohoyos) wrote :

i still have the problem in a Dell mini 1010. I fresh-installed 12.04 several times with no success.

Revision history for this message
David Tombs (dgtombs) wrote :

If anyone is still encountering this problem on 12.04 or later, please use 'ubuntu-bug upower' to report a new bug. This one has been fixed.

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

(In reply to comment #14)
> Appears to be fixed in Ubuntu (see linked Ubuntu report).

Closing as a dupe of 24667, which is the same bug from the same reporter.

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

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

*** Bug 27399 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

Closing as fixed as per bug 27399. Reopen if you still see the problem with UPower 0.9.23.

Changed in devicekit-power:
status: Fix Released → Invalid
Revision history for this message
David Tombs (dgtombs) wrote :

Linked correct upstream bug report.

Changed in devicekit-power:
importance: Critical → Unknown
status: Invalid → Unknown
Changed in devicekit-power:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in upower (Fedora):
importance: Unknown → Critical
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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