Bug 187600 - Power management doesn't aways update battery status
Summary: Power management doesn't aways update battery status
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 182389 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-19 14:49 UTC by Vitor Boschi da Silva
Modified: 2010-10-02 12:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix ''battery status does not update' (when charge_level.percentage also changes). (869 bytes, patch)
2009-03-23 18:48 UTC, Marcos Dione
Details
Incorrect battery status (16.99 KB, image/png)
2009-08-23 18:43 UTC, Ruchir Brahmbhatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Boschi da Silva 2009-03-19 14:49:41 UTC
Version:            (using KDE 4.2.1)
OS:                Linux
Installed from:    Ubuntu Packages

Sometimes the power management applet doesn't update the battery status. This happened twice to me: the first time it was showing "Fully charged", even if the battery charger wasn't connected, and the battery was lower than 100%, and the second time it's displaying "charging", again, without the charger attached.
I'm not sure, but this may be related to sleeping. I think this happend only after a sleep.
Comment 1 Aaron J. Seigo 2009-03-19 20:37:42 UTC
sounds like a problem not with the widget, but with HAL. perhaps the connection between the dataengine and HAL is getting lost (we use Solid for that) or HAL itself is losing its mind after sleeping. am moving it over to Solid to see what they have to say about that.
Comment 2 Kevin Ottens 2009-03-20 08:23:33 UTC
Actually that might even be a kernel bug, well I'm even almost 100% sure about that. I had the exact same problem and had to downgrade my kernel to get the battery info to reliably work again... No fun.
Comment 3 Marcos Dione 2009-03-23 18:48:52 UTC
Created attachment 32360 [details]
fix ''battery status does not update' (when charge_level.percentage also changes).

I found the bug in solid that does not update some state changes if the there are several changes at the same time. this is because if one type of change is present, the others are not tested.
Comment 4 Ruchir Brahmbhatt 2009-03-24 06:07:11 UTC
*** Bug 182389 has been marked as a duplicate of this bug. ***
Comment 5 Kevin Ottens 2009-03-24 17:42:43 UTC
Ah-ah! Good catch.

Minor format nitpick on the patch, could you add an empty line before the ifs? It clearer this way that it's not the same if-else block this way. Could be mistaken for an else if otherwise.

If you have commit rights, please commit it right away with the proposed minor change, otherwise just tell me and I'll take care of it.
Comment 6 Marcos Dione 2009-04-02 21:48:55 UTC
Kevin, I commited the patch, but it didn't updated this bug report even when the BUG: field was in the commit log. I got a mail saying that I can't close the report, which has some sense. can you close it, please?
Comment 7 Kevin Ottens 2009-04-02 22:00:49 UTC
Fix committed by Marcos in revision 94713.
Comment 8 Ruchir Brahmbhatt 2009-08-23 18:43:00 UTC
Created attachment 36392 [details]
Incorrect battery status

I could reproduce this bug in 4.3.0 final. My battery was totally discharged. I connected adapter to laptop and I see status as shown in screenshot.
Comment 9 Kevin Ottens 2009-08-28 15:51:31 UTC
Likely a different issue (if not a bios related problem as I pointed out in the first comment). Please open another bug report (or reopen 182389), don't hijack this one. In any case, please assign it to the battery applet in case it would be at the UI level.

Also, don't assign bugs to *you*, except if you step up to investigate and fix it yourself (which would be fine with me but I doubt it was your intent). :-)
Comment 10 Ruchir Brahmbhatt 2009-08-28 15:54:17 UTC
I'll check this in detail and do as you suggested. I just reopend it not sure how it was assigned to me. J