Bug 500024 - disconnecting/reconnecting power causes opposite state
disconnecting/reconnecting power causes opposite state
Product: Fedora
Classification: Fedora
Component: DeviceKit-power (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-05-10 04:55 EDT by Jason Haar
Modified: 2009-07-31 20:25 EDT (History)
7 users (show)

See Also:
Fixed In Version: 2.26.3-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-16 03:15:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
devkit-power dump on AC power (1.83 KB, text/plain)
2009-05-10 16:06 EDT, Jason Haar
no flags Details
devkit-power dump on battery (1.65 KB, application/octet-stream)
2009-05-10 16:06 EDT, Jason Haar
no flags Details
devkit-power -d output on AC (Clevo M720R) (1.55 KB, text/plain)
2009-06-02 05:27 EDT, James
no flags Details
devkit-power -d output on battery (Clevo M720R) (1.55 KB, text/plain)
2009-06-02 05:28 EDT, James
no flags Details

  None (edit)
Description Jason Haar 2009-05-10 04:55:13 EDT
Description of problem:

When I unplug my Dell D430 FC11-preview laptop from power, gnome-power-manager does a popup telling me it's now on AC, and my screen brightens. Plugging the power back in makes it tell me its now on battery, and the screen dims - the exact opposite to what it should be doing. This has happened several times after reboots now - so it's not a one-off for me. Also, I used to run FC10 and this didn't happen - gnome-power-manager worked fine.

Weird thing is: if I'm on battery (and the applet symbol erroneously shows I'm on AC) and I'm running low - the final warning still pops up to tell me I've got 4 minutes left! 

I've found that if I do it several times over a period of a minute or so, it eventually corrects itself.

Version-Release number of selected component (if applicable):

How reproducible:

every time

Steps to Reproduce:
1.pull out power cable - I'm told I'm now on AC
2. plug AC back in - I'm told I'm on battery
Actual results:

Expected results:

Additional info:
Comment 1 Richard Hughes 2009-05-10 09:26:12 EDT
Is the line-power status from DeviceKit-power --dump correct with both states?
Comment 2 Jason Haar 2009-05-10 16:05:19 EDT
Attached are the dumps. When I am on battery, gnome-power-manager shows the AC power icon and placing the mouse over it states "Laptop battery fully charged". When I plug it back into AC, the icon changes to a battery and initially says "Laptop discharging", but after 30+ sec changes to battery-with-AC icon and says "Laptop battery XXXX until recharged"

/proc/acpi/ac_adapter/AC/state shows the correct state of the AC, but devkit-power-battery.log says "power supply: yes" which can't be right
Comment 3 Jason Haar 2009-05-10 16:06:05 EDT
Created attachment 343295 [details]
devkit-power dump on AC power
Comment 4 Jason Haar 2009-05-10 16:06:43 EDT
Created attachment 343296 [details]
devkit-power dump on battery
Comment 5 Richard Hughes 2009-05-11 03:23:05 EDT
Wow, there's some pretty crazy stuff going on there. Could you please get me the daemon verbose log of DeviceKit-power please? You can do this by (as root):

(attach AC, wait 1 minute)
killall devkit-power-daemon
/usr/libexec/devkit-power-daemon -v

and then wait for 1 minute, remove AC, wait 1 minute, insert AC, wait 1 minute.

Then please attach the logs to this bug please. Thanks.
Comment 6 Richard Hughes 2009-06-02 04:19:06 EDT
Also, can you please test the gnome-power-manager and DeviceKit-power in updates-testing. Thanks!
Comment 7 Jason Haar 2009-06-02 04:40:27 EDT
Sorry, I forgot I had this ticket in. The problem is sporadic. It actually happened yesterday (ie it went battery-mode on AC, and visa-versa), and in the end I rebooted to fix it!

Now when I try to make it happen, it refuses to screw up. Typical.

I'll hold off updating until I can get you a report

Comment 8 James 2009-06-02 05:27:01 EDT


my notebook (Clevo M720R) reports (sporadically) that the battery is fully charged when I unplug the mains supply, and that it's operating on battery power when plugged back in. gKrellm's monitor always reflects the correct state.

devkit-power -d output attached later.
Comment 9 James 2009-06-02 05:27:30 EDT
Created attachment 346217 [details]
devkit-power -d output on AC (Clevo M720R)
Comment 10 James 2009-06-02 05:28:04 EDT
Created attachment 346218 [details]
devkit-power -d output on battery (Clevo M720R)
Comment 11 Richard Hughes 2009-06-03 05:52:54 EDT
Can you try installing https://admin.fedoraproject.org/updates/F11/FEDORA-2009-5728 and then reboot please. If it fixes things, please report that as positive karma for the update. Thanks.
Comment 12 Bug Zapper 2009-06-09 11:35:27 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 13 How 2009-06-17 20:09:33 EDT
do you realize this one is a duplicate bug of 496418 to do with ac detection and therefore wrong popup messages.

already tried update FEDORA-2009-5728 dont work

This is also weird.
while AC on and devkit-power --monitor running, I start the login screen and it says:
"Device Changed: /org/freedsktop/DeviceKit/Power/devices/battery_BAT0" 
repeatedly. The cpu fan is at full speed non stop.
Comment 14 Jason Haar 2009-06-20 05:31:36 EDT

I am on a fully updated FC11 and am currently typing in this comment from my Dell DC430 laptop - on battery - and after 30 minutes the icon says I'm on AC and the battery is still 100% full!

/proc/acpi/battery/BAT0/state shows the correct information.

This is with DeviceKit-power-008-1.fc11.i586
Comment 15 How 2009-06-20 23:02:10 EDT
yes of course, same here. Battery icon dont give correct reading and 99% of the time doesnt update, had to re-plug several times for it to react. ACPI on the other hand always shows updates promptly and shows correct information and never faulty. For certain is bug with Devicekit and gpm. 

I have conky always showing correct BAT info and react as fast windows power manager. GPM dont react at all. Unacceptable !
Comment 16 How 2009-06-22 18:55:02 EDT
you should try gnome-power-manager 2.27 in rawhide. works so far for me now. solves lot of issues.
Comment 17 James 2009-06-23 14:54:14 EDT
(In reply to comment #16)
> you should try gnome-power-manager 2.27 in rawhide. works so far for me now.
> solves lot of issues.  

Not for me.
Comment 18 Jason Haar 2009-06-26 17:13:43 EDT
Same here. I've upgraded to the rawhide release and yet after several reboots, it still says I'm on AC when I'm on battery. 

Also, I've just noticed it's completely wrong about the battery life too! Yesterday it told me the battery was about to run out of juice and so I shut down. However, when I next rebooted I happened to go into the BIOS where there's a Battery screen (Dell D430) and it said I still had 44% battery charge left!

Comment 19 Armijn Hemel 2009-07-02 05:24:10 EDT
Is this perhaps the same bug as 495002?
Comment 20 Fedora Update System 2009-07-06 07:28:36 EDT
gnome-power-manager-2.26.3-1.fc11 has been submitted as an update for Fedora 11.
Comment 21 James 2009-07-11 05:03:43 EDT
Still seems broken in gnome-power-manager-2.26.3-1.fc11.x86_64, DeviceKit-power-008-1.fc11.x86_64.
Comment 22 Fedora Update System 2009-07-11 12:57:16 EDT
gnome-power-manager-2.26.3-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gnome-power-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7424
Comment 23 Fedora Update System 2009-07-16 03:15:33 EDT
gnome-power-manager-2.26.3-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Pedro Matiello 2009-07-17 00:10:52 EDT
I'm still experiencing the issue here.
Comment 25 How 2009-07-17 05:47:39 EDT
version 2.26.3-1.fc11 seemed improved over previous one but still the reaction to ac detection is still slow, it would take more than 10 seconds.
Comment 26 James 2009-07-28 06:03:06 EDT
Still present in gnome-power-manager-2.27.3-0.4.20090727git.fc12.x86_64.
Comment 27 How 2009-07-31 20:25:30 EDT
still shuts down when AC is connected

Note You need to log in before you can comment on or make changes to this bug.