Bug 234749 - battery monitor shows the AC adapter is plugged in at startup , but it's not
Summary: battery monitor shows the AC adapter is plugged in at startup , but it's not
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-18 21:06 UTC by rm
Modified: 2010-11-09 21:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rm 2010-04-18 21:06:03 UTC
Version:           unknown (using 4.4.2 (KDE 4.4.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.32-19-generic

I use KDE on a Lenovo Thinkpad SL510.
When the os boots , the battery monitor shows that the AC adapter is plugged in and (discharging)! but the adapter is not plugged in. 
I typed "cat /proc/acpi/ac_adapter/ACAD/state" in the terminal . it showed:
state:                   off-line
If I plug in the AC adapter nothing changes but if then I unplug it,  after that the battery monitor works correctly!
If I suspend to RAM , after that it works correctly , too.
additionally , the battery monitor don't show the estimated remaining time at all.
I experience this problem on Kubuntu , OpenSuse and Fedora.
Comment 1 Aaron J. Seigo 2010-05-08 01:46:11 UTC
if you add a new battery monitor when the first one is showing the wrong status, does the new battery monitor show the correct status or is it also incorrect?

if you add a new battery monitor when the first one is showing the correct status, does the new battery monitor show the correct status as well?
Comment 2 rm 2010-05-08 07:14:30 UTC
At start up , when it showed incorrect information , I added a new battery monitor widget to desktop. But it showed the same incorrect information , too.
Then I removed that widget and after that I plugged in the AC adapter and then unplugged it. As I said above , this cause the battery monitor behaves normally.so the battery monitor showed the correct information. 
Then I added a new battery monitor widget and it showed the same correct information.
Thanks a lot for your attention!
Comment 3 Aaron J. Seigo 2010-05-09 00:00:34 UTC
ok, so it isn't the plasmoid itself: it is showing the data it is being sent correctly.

and given that the data, sent by the powermanagement DataEngine, is simply forwarding on information from Solid, and there is no polling involved, then the problem is either in Solid or in HAL underneath it.

(FYI: coming out of suspend is broken in many mysteriously and wonderous ways on Linux... still.)

i'm reassigning this to Solid for now, adding Kevin to CC, and awating his response as to the HAL-ness of this problem ;)
Comment 4 rm 2010-05-09 11:18:08 UTC
Thank you very much!
I'm ready to do any test on my notebook to find out how can we solve this problem ;)
Comment 5 Kevin Ottens 2010-05-10 08:24:57 UTC
Sounds a whole lot like the state change didn't get signaled on resume... *sigh*
I see nothing we could do about apart from putting a workaround in powerdevil maybe? Let's reassign to Dario and see if he has an opinion about it.
Comment 6 Dario Freddi 2010-11-09 21:09:17 UTC
Fixed in 4.6