devicekit-power fails to realize I'm on battery after AC disconnect

Bug #384304 reported by Max Bowsher
88
This bug affects 15 people
Affects Status Importance Assigned to Milestone
DeviceKit-Power
Fix Released
Medium
upower (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: devicekit-power

Since upgrading to gnome-power-manager 2.27.1-0ubuntu2, which IIUC switched backends from hal to devkit-power, g-p-m thinks I'm always on AC, and doesn't even acknowledge the fact I have a battery. Rolling back to g-p-m 2.26.1-0ubuntu4 results in correct behaviour.

I'll post some attachments with various debugging info...

ProblemType: Bug
Architecture: i386
Date: Sat Jun 6 16:50:59 2009
DistroRelease: Ubuntu 9.10
Package: devicekit-power 008-1
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.30-8.9-generic
SourcePackage: devicekit-power
Uname: Linux 2.6.30-8-generic i686

Related branches

Revision history for this message
Max Bowsher (maxb) wrote :
Revision history for this message
Max Bowsher (maxb) wrote :

"devkit-power -d" output - despite what it says, I'm actually on battery at the time.

Revision history for this message
Max Bowsher (maxb) wrote :

Tarball of /var/lib/DeviceKit-power/, just in case it's helpful.

Revision history for this message
Max Bowsher (maxb) wrote :

The bug seems to be only reproduceable when devkit-power-daemon starts up whilst that battery is fully charged. Here is the output of running it in the foreground with -v, with the battery fully charged to start with, then pulling the plug - and it still thinks I'm on AC.

Max Bowsher (maxb)
tags: added: regression-potential
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for your report.

We got a lot of bug fixes to devicekit-power since June. Do you still have this problem in Karmic beta? If so, can you please collect these logs again?

I'm sub'ed to the bug now, so I'll timely forward it to upstream if you still have the problem. Thanks!

Changed in devicekit-power (Ubuntu):
status: New → Incomplete
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

I did a new round of testing with daily desktop 20090929.2. When booting on battery the Acer Extensa 5635z still dangerously thinks it is not running on battery. (This has previously led to a sudden loss of power when the battery ran out instead of an automatic controlled shutdown. After that I subscribed to this bug.)
Attachment justAfterBootOnBattery.png shows the situation and the output of a devkit-power --dump.
Another devkit-power confusion with this particular hardware is that it says it is charging with 680W when plugged in and charging.
Detailed hardware info for for this Extensa 5635z notebook is attached to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/425165.
I am available for close cooperation with a developer especially during weekdays UTC+2.

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

I just confirmed this bug as described in comment #6 with ubuntu daily live 20091005.
Moreover I found that after a suspend resume cycle gnome-power-manager knows about the battery and gives me the config options for what to do when the battery runs out. This seems to be a workaround of sorts for the time being. (But only for people who know they have the bug. And also after resume an 8 MB SD card would not remount after unmount and a 128 MB SD card would never mount.)

Changed in devicekit-power (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Max Bowsher (maxb) wrote :

As of some time shortly after beta, the problem seems less easily reproducible to me. However, I can add that when I am seeing the problem, SIGHUPing devkit-power is an easier workaround than a suspend-resume cycle.

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Thank you Max for your suggestion to try SIGHUP devkit-power-daemon. I just tried kill -SIGHUP with ubuntu daily live 20091006. Then after issuing devkit-power --dump the daemon restarts, but it does not change anything. Moreover todays daily live does not suspend on this notebook :-( .
The bug is 100% reproducible: devkit-power --dump always says: on-battery: no
What has changed since comment #6 is that I now get an "on battery power" tab from system>preferences>power_management. Still no battery tray icon.

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

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

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

in one Terminal, and

   devkit-power --dump > /tmp/dk-dump.txt

in another, then go back to the first with the devkit-power-daemon output, press control-c, and attach /tmp/dkp.log and /tmp/dk-dump.txt . Now let the battery discharge for a while (the situation where dk-p does see it), and to the same set of commands again.

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

Changed in devicekit-power (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
In , Martin Pitt (pitti) wrote :

On the Acer Extensa 5635z we got a report that DK-P fails to set back "on-battery = yes" after pulling out the AC cable. This is with DK-P 011 final.

log and dump after boot on battery:
http://launchpadlibrarian.net/33211520/bat.dkp.log
http://launchpadlibrarian.net/33211550/bat.dk-dump.txt
(All correct)

Now logging a plugging in AC event, with the dump after plug in:
http://launchpadlibrarian.net/33211565/pluggingIn.dkp.log
http://launchpadlibrarian.net/33211600/pluggingIn.dk-dump.afterPlugin.txt
(All correct)

Logging the unplugging event with a bit of time to settle afterwards; Then the dump:
http://launchpadlibrarian.net/33211629/notOnBat.dkp.log
http://launchpadlibrarian.net/33211636/notOnBat.dk-dump.afterPlugin.txt
So now it reports "on battery: no" when in fact it is.

(NB the logs also show the wrong charging rate, 690.638 W; but that's a separate and minor problem)

So "discharging" is true, the AC status is "online: no", but yet "on-battery" is no.

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote : Re: devicekit-power fails to realize I'm on battery
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

This morning brought upgrades considerably changing the behaviour of the Extensa 5635z. It now does correctly say that it is on battery after being booted on battery. Tray icon is o.k. and I do get a tab for selecting the behaviour on battery.

So here the log and dump after such a boot on battery:
http://launchpadlibrarian.net/33211520/bat.dkp.log
http://launchpadlibrarian.net/33211550/bat.dk-dump.txt
Fine now.

Now logging a plugging in AC event, with the dump after plug in:
http://launchpadlibrarian.net/33211565/pluggingIn.dkp.log
http://launchpadlibrarian.net/33211600/pluggingIn.dk-dump.afterPlugin.txt
That does seem o.k. to me. No falsely reporting "fully charged" immediately after plugin either.

Now the buggy part. Logging the unplugging event with a bit of time to settle afterwards; Then the dump:
http://launchpadlibrarian.net/33211629/notOnBat.dkp.log
http://launchpadlibrarian.net/33211636/notOnBat.dk-dump.afterPlugin.txt
So now it reports "on battery: no" when in fact it is.

Changed in devicekit-power (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

I forgot and overlooked that http://launchpadlibrarian.net/33211600/pluggingIn.dk-dump.afterPlugin.txt shows the wrong charging rate (by about a factor of 20):
History (rate):
    1254903657 688.230 charging
    1254903625 682.290 charging

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

The "fully charged" bug is still 100% reproducible, but much less obvious now and of minor importance. The only symptom that is always there is the tray icon going through a few seconds of showing (falsely) the icon for the fully charged battery. When the tooltip is triggered during this short time it says that the battery is fully charged. But if left alone no false notification is shown. The icon changes to the correct one and the correct notification "Battery Discharging" along with the correct percentage is shown.
The false event does not always show up in the devkit-power --dump.

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

Thanks! I'll forward this to upstream.

Changed in devicekit-power (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Also unlike yesterday
sudo killall -SIGHUP devkit-power-daemon
devkit-power --dump
does now get devkit to recognise that the system is now on battery again, after having been plugged in.

Martin Pitt (pitti)
summary: - devicekit-power fails to realize I'm on battery
+ devicekit-power fails to realize I'm on battery after AC disconnect
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery

Wolfgang Kufner [2009-10-07 9:55 -0000]:
> Also unlike yesterday
> sudo killall -SIGHUP devkit-power-daemon
> devkit-power --dump
> does now get devkit to recognise that the system is now on battery again, after having been plugged in.

Just to make sure, did you restart your session after the upgrades?
There was a tricky upgrade yesterday which updated dk-p to 011 final
and a gnome-power-manager rebuild against that. Can you please check
with "dpkg -s packagename | grep Version:" that devicekit-power is version 011-1, and
gnome-power-manager is 2.28.0-0ubuntu3 ? After that you need to
restart your GNOME session.

Thanks! Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Changed in devicekit-power:
status: Unknown → Confirmed
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Hi Martin

I did as you suggested and the packages are at the new versions, but since the system was shut down twice after above testing I think what we really are after is in the logs:

synaptic package history shows that those two packages came in at 7:10
messages log shows 5 shutdown - boot cylces after that and before all of the above testing began

Thanks! Wolfgang

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

Wolfgang Kufner [2009-10-07 11:23 -0000]:
> I did as you suggested and the packages are at the new versions, but
> since the system was shut down twice after above testing I think what we
> really are after is in the logs.

Thanks for confirming!

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Max Bowsher (maxb) wrote :

Contrary to my earlier comment about having problems reproducing it, I've now noticed that I'm sitting here with no power cord in sight, yet g-p-m claims my battery is *charging*!

And.... wtf? 'devkit-power --dump' actually says discharging !?

And.... whilst I've been writing this bug report, g-p-m seems to have finally caught up with the fact that power was unplugged minutes ago.

Do you think this is all part of the same problem, or do I need to file a new bug about devkit-power<->gnome-power-manager communication having an unacceptably high delay, whereas hal<->gnome-power-manager communication never seemed to have this problem?

Steve Langasek (vorlon)
Changed in devicekit-power (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

Max,

so can you cofirm that "devkit-disks --dump" is correct in all situations for you then? Then it's indeed a different bug. Can you open one against gnome-power-manager, and do

  killall gnome-power-manager
  gnome-power-manager --verbose 2>&1 | tee /tmp/gpm.log

then reproduce the bug, press Control-C, and attach /tmp/gpm.log to that bug? Please subscribe me ("pitti") to it.

Thanks!

Revision history for this message
tekstr1der (tekstr1der) wrote :

I've run into this on a fully updated karmic install.

1) Start with a fully charged battery
2) Disconnect AC
3) devkit-power --dump reports state:fully-charged, on-battery=no

Another observation:

Following a suspend/resume cycle, things operate correctly for the most part, but sometimes there is a very long delay (1-8 minutes) between unplugging AC power and GPM picking up on that fact.

Revision history for this message
Max Bowsher (maxb) wrote :

Retagged regression-release as this is reproducing for me again. And I have verbal confirmation from another AAO user that they're seeing the same on a karmic clean install.

I've just noticed pitti's comment of ~ 1 month ago and shall bear it in mind when I'm next in front of the appropriate machine.

tags: added: regression-actual
removed: regression-potential
tags: added: regression-release
removed: regression-actual
Revision history for this message
Javier Martín (jmartinj) wrote :

Attached is a patch to fix this bug. The problem is in function dkp_daemon_get_on_battery_local of dkp-daemon.c. The logic is "we're on battery as soon as _any_ battery goes discharging", but often batteries have troubles reporting their charging/discharging status and just say "unknown" (at least in my two laptops, an IBM T42 and an Asus Eee 901), so relying on the batteries' status to figure out wether we are plugged in or not is not acceptable. Rather, we should ask the AC power device directly and change the above logic to: "we're on battery as soon as _any_ AC supply goes online".

A patch is attached. It applies on 011-1ubuntu1. I would report it upstream if I knew how.

I also uploaded the binaries to a PPA. To test this fix:

sudo add-apt-repository ppa:jmartinj/dkp
sudo apt-get update
sudo apt-get upgrade

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Fixed for me in lucid.

Just tested for this bug with ubuntu lucid-desktop-amd64 20091116 (booting the iso from hd via grub2 loopback):

fixed the major problem:
booting on AC; after unplugging devkit-power --dump changes to "on-battery: yes" (takes about 15 secs iirc)

fixed also:
when plugging in with non-full battery extensa 5635z says (devkit-power --dump) it is charging with about 35W. I used to say something like 700W.

still when plugging in devkit-power --dump states wrongly "fully charged" for about 40 seconds. then it correctly changes to "charging".

new (small) symptoms:
After boot I had two battery icons in the tray. see attached twoBatteryIcons.png. I did testing (successfull) of suspend/resume functionality and noticed after the 3rd resume (did not look before) that there additional icon was gone.

@Javier Martín
thanks for your patch. I looked at it, but decided that it did not apply to my situation. for me devkit-power --dump always showed that both the battery device and the AC device always told the truth (after a bit of "battery full" nonsense). somehow the daemon part never listened to either of them. (see attached notOnBat.dk-dump.afterPlugin.txt)

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :
Revision history for this message
Javier Martín (jmartinj) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

@Wolfang:

Just to clarify, the patch above fixes the scenario in which devkit-power -d
reports "on-battery: no" after unplugging the AC, but apparently only when
the battery is fully charged. Under those circumstances, the battery
(through the /sys/devices filesystem) happens to report an "Unknown" status
(who knows why). That confuses the devkit-power daemon, since the
"on-battery" yes/no decision depends on the battery reporting a "charging"
or "discharging" status, and not on the AC device itself (which seems more
sensible to me).

The end result is that gnome-power-manager will never realize when AC goes
off-line and it will never switch to the "on battery" policy. The biggest
issue I had with this was that my laptop never went to sleep after closing
the lid (since I only instruct g-p-m to suspend when closing the lid on
batteries) and I've already found my laptop cooking in its bag three times.

Revision history for this message
foggydude (rogier-stekje) wrote :

affected: packard bell dot m/ acer one 751

@javier Martin
its always a miracle what will happen when i open/close lid. its some sort of tombola. sometimes as hopes, sometimes coockes. and sometimes nice suspend and black sreen on resume (other bug).

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Just checked again for this bug with ubuntu lucid-desktop-amd64 20091117 (booting the iso from hd via grub2 loopback):
looks even better than yesterday. even the small issue of the superfluous second battery icon (see twoBatteryIcons.png) is gone.

What remains is that the whole thing is not instantaneous, but I can't think of any practical problems that might cause.

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

Created an attachment (id=31309)
proposed patch

In the downstream bug, Javier Martín proposed a patch which fixed the issue for him.

------ quote ------
Attached is a patch to fix this bug. The problem is in function dkp_daemon_get_on_battery_local of dkp-daemon.c. The logic is "we're on battery as soon as _any_ battery goes discharging", but often batteries have troubles reporting their charging/discharging status and just say "unknown" (at least in my two laptops, an IBM T42 and an Asus Eee 901), so relying on the batteries' status to figure out wether we are plugged in or not is not acceptable. Rather, we should ask the AC power device directly and change the above logic to: "we're on battery as soon as _any_ AC supply goes online".

This fixes the scenario in which devkit-power -d reports "on-battery: no" after unplugging the AC, but apparently only when the battery is fully charged. Under those circumstances, the battery (through the /sys/devices filesystem) happens to report an "Unknown" status (who knows why). That confuses the devkit-power daemon, since the "on-battery" yes/no decision depends on the battery reporting a "charging" or "discharging" status, and not on the AC device itself (which seems more sensible to me).

The end result is that gnome-power-manager will never realize when AC goes off-line and it will never switch to the "on battery" policy. The biggest
issue I had with this was that my laptop never went to sleep after closing
the lid (since I only instruct g-p-m to suspend when closing the lid on
batteries) and I've already found my laptop cooking in its bag three times.
----------- end quote -------------

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

I think it's entirely sensible to fall back to the line-power is the battery says "unknown", but not to rely solely on it -- some machines do not have line power devices and some don't have batteries. I'll have a bit of time tomorrow, and I can work on a patch that does the fallback in a better way (if you don't beat me to it!)

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

Thanks Javier! I forwarded your patch upstream for review and commenting.

Revision history for this message
Mark Cariaga (mzc) wrote :

@Javier Martin

The patch does not work on Acer Aspire one D250. I also experience this same bug when unplugging AC. this also probably similar to bug #425411

Revision history for this message
Mark Cariaga (mzc) wrote :

see gpm.og

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

Upstream committed a simpler patch which should also fix this and avoid problems with the originally proposed one. I applied this in a test package for karmic and uploaded it into my PPA:

  https://launchpad.net/~pitti/+archive/ppa/+packages

Any chance that people affected by this problem can try this and report back here? Thank you!

Revision history for this message
Javier Martín (jmartinj) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

Doesn't seem to work for me (see `devkit-power -d` while on batteries
attached). AC device section says "online: no" but the daemon section thinks
"on-battery: no".

2009/11/23 Martin Pitt <email address hidden>

> Upstream committed a simpler patch which should also fix this and avoid
> problems with the originally proposed one. I applied this in a test
> package for karmic and uploaded it into my PPA:
>
> https://launchpad.net/~pitti/+archive/ppa/+packages<https://launchpad.net/%7Epitti/+archive/ppa/+packages>
>
> Any chance that people affected by this problem can try this and report
> back here? Thank you!
>
> --
> devicekit-power fails to realize I'm on battery after AC disconnect
> https://bugs.launchpad.net/bugs/384304
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in DeviceKit based power management D-Bus backend: Confirmed
> Status in “devicekit-power” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: devicekit-power
>
> Since upgrading to gnome-power-manager 2.27.1-0ubuntu2, which IIUC switched
> backends from hal to devkit-power, g-p-m thinks I'm always on AC, and
> doesn't even acknowledge the fact I have a battery. Rolling back to g-p-m
> 2.26.1-0ubuntu4 results in correct behaviour.
>
> I'll post some attachments with various debugging info...
>
> ProblemType: Bug
> Architecture: i386
> Date: Sat Jun 6 16:50:59 2009
> DistroRelease: Ubuntu 9.10
> Package: devicekit-power 008-1
> ProcEnviron:
> LC_COLLATE=C
> PATH=(custom, user)
> LANG=en_GB.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.30-8.9-generic
> SourcePackage: devicekit-power
> Uname: Linux 2.6.30-8-generic i686
>

Revision history for this message
Mark Cariaga (mzc) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

hi Martin,

I was only successful to installing one of the 4 packages. How do I
force-install them, i get an error that a later version was already
installed.

On Mon, 2009-11-23 at 13:20 +0000, Martin Pitt wrote:
> Upstream committed a simpler patch which should also fix this and avoid
> problems with the originally proposed one. I applied this in a test
> package for karmic and uploaded it into my PPA:
>
> https://launchpad.net/~pitti/+archive/ppa/+packages
>
> Any chance that people affected by this problem can try this and report
> back here? Thank you!
>

Revision history for this message
Mark Cariaga (mzc) wrote :

please disregard #40. i managed to force-install the package via synaptic. There's no change happened, problem still exist please see attachments

Revision history for this message
Mark Cariaga (mzc) wrote :

see devkit-power attachments

Revision history for this message
Mark Cariaga (mzc) wrote :
Revision history for this message
In , Martin Pitt (pitti) wrote :

Hm, the author of the patch attached here tried your's from git head, and still gets "online: no" on the AC and "discharging", but "on-battery: no". But this actually looks like a different problem.
http://launchpadlibrarian.net/35974938/devkit-power-output.txt

Someone else tested it as well, and the dk-power output now looks consistent for both AC (http://launchpadlibrarian.net/36003745/devkit-power%20on%20AC) and on battery (http://launchpadlibrarian.net/36003840/devkit-power%20on%20batt), also with a gpm log (http://launchpadlibrarian.net/36003724/gpm.log); he said that the "problem still exists", but I'll follow up with some detail questions.

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

mzc, your devkit-power outputs look just fine. What are you actually seeing now which is wrong?

Revision history for this message
Javier Martín (jmartinj) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

His "lid-is-closed" is reported as "yes", I think he's experiencing a whole
different bug...

Revision history for this message
Mark Cariaga (mzc) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

I'll file it on a separate report. thanks everyone :)

On Tue, 2009-11-24 at 22:24 +0000, Javier Martín wrote:
> His "lid-is-closed" is reported as "yes", I think he's experiencing a whole
> different bug...
>

Revision history for this message
Mark Cariaga (mzc) wrote :

I have filed it as bug# 487958. Thank you very much for the help.

On Tue, 2009-11-24 at 22:24 +0000, Javier Martín wrote:
> His "lid-is-closed" is reported as "yes", I think he's experiencing a whole
> different bug...
>

Revision history for this message
foggydude (rogier-stekje) wrote :

working for me! as soon as i forced the "downgrade" in synaptic, my backlight dimmed and before re-upgrading it it said 'sure, cause you are on battery'.

i switched to the kde guidance manager (hoped that one would work), but now theyre next to each other: gnome works and the guidance is still believing we are on ac.

a lot of owrds to say: it works!!!

@mcz: thanks a lot, you brought me one step further from throwing my laptop uit a window (if the stupid alsa/pulse/oss 'one moment you have sounds but the next you dont and you really cant work wiothout music so you hate your life in the office' problems get soilved). keep the good work!

Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Just tested the packages from pitti ppa in installed karmic on extensa 5635Z. They neither help nor hurt, as was expected.
Status in lucid is unchanged, which means its fine :-)

Revision history for this message
Trev (r-admin-accg-de) wrote :

I have the same problem with my Fujitsu Siemens Esprimo Mobile V5535. Being on battery is not detected, it always thinks that I am on AC.

Trev

Revision history for this message
Ian Hutchinson (hutch) wrote :

This bug is present with Lenovo T400, with fully updated Karmic AMD64 release.
I downloaded the 11/23 builds and installed them with dpkg -i. It did not appear to make any difference.
Unplugging and replugging the power cord a time or two when the battery is nearly fully charged, leads
to a locked up state where devkit-power -d reports on-battery: no, even when the cord is unplugged.
If you kill the devkit-power-daemon and then restart it, you can sometimes get it to start recognizing power
states properly.

In short this is not fixed as of 9 Dec 09. Ian

Revision history for this message
Ronaldo Pagani Yamashita (ronaldoy) wrote :

I am having the same problem with a Sony VAIO SZ-680. The patch makes sense, but when will it be included in the main distribution? The problem is really annoying for notebook users (as the machine will shutdown suddenly when you forget to connect your power cord).

Revision history for this message
Josh Hill (ingenium) wrote :

With the version of libdevkit-power-gobject1 in the karmic repository now, I can get it to recognize it's on battery after unplugging and replugging the AC several times. However, when I use the package in Javier Martín's PPA or the version in karmic-proposed, it completely breaks and no matter what I do I can't get it to recognize that it's on battery.

Revision history for this message
tekstr1der (tekstr1der) wrote :

Should we still be following this old bug for lucid now that upower is being used? Is there a new bug filed against upower for this issue? I can't seem to find one.

Revision history for this message
Mark Cariaga (mzc) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

I think it would be better if we a new bug report since upower is
different from devkit

On Mar 10, 2010, at 8:35 AM, tekstr1der <email address hidden> wrote:

> Should we still be following this old bug for lucid now that upower is
> being used? Is there a new bug filed against upower for this issue? I
> can't seem to find one.
>
> --
> devicekit-power fails to realize I'm on battery after AC disconnect
> https://bugs.launchpad.net/bugs/384304
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in DeviceKit based power management D-Bus backend: Confirmed
> Status in “devicekit-power” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: devicekit-power
>
> Since upgrading to gnome-power-manager 2.27.1-0ubuntu2, which IIUC
> switched backends from hal to devkit-power, g-p-m thinks I'm always
> on AC, and doesn't even acknowledge the fact I have a battery.
> Rolling back to g-p-m 2.26.1-0ubuntu4 results in correct behaviour.
>
> I'll post some attachments with various debugging info...
>
> ProblemType: Bug
> Architecture: i386
> Date: Sat Jun 6 16:50:59 2009
> DistroRelease: Ubuntu 9.10
> Package: devicekit-power 008-1
> ProcEnviron:
> LC_COLLATE=C
> PATH=(custom, user)
> LANG=en_GB.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.30-8.9-generic
> SourcePackage: devicekit-power
> Uname: Linux 2.6.30-8-generic i686
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/devicekit-power/+bug/384304/+subscribe

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

tekstr1der [2010-03-10 16:35 -0000]:
> Should we still be following this old bug for lucid now that upower is
> being used? Is there a new bug filed against upower for this issue? I
> can't seem to find one.

This bug is supposed to be fixed in Karmic and Lucid. So if you still
get the effect, please open a new one, since it has a different root
cause then.

Thanks, Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

David Futcher (bobbo)
tags: added: patch-forwarded-upstream
Changed in devicekit-power:
importance: Unknown → Medium
Changed in devicekit-power:
importance: Medium → Unknown
Revision history for this message
Mark Cariaga (mzc) wrote :

@ Martin afik this bug is closed. I cannot reproduce it anymore
On Mar 10, 2010 10:01 AM, "Martin Pitt" <email address hidden> wrote:

Changed in devicekit-power:
importance: Unknown → Medium
Changed in devicekit-power:
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I just pushed the fix for this to upstream master.

affects: devicekit-power (Ubuntu) → upower (Ubuntu)
Changed in upower (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → Fix Committed
Changed in devicekit-power:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upower - 0.9.10-1

---------------
upower (0.9.10-1) unstable; urgency=low

  * New upstream release:
    - Fix "unknown" battery status guessing to not be recursive. (LP: #384304)
  * debian/control: Drop obsolete devicekit-power-* Conflicts/Replaces.
 -- Ubuntu Archive Auto-Sync <email address hidden> Fri, 06 May 2011 09:25:21 +0000

Changed in upower (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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