Bug 496418 - AC detection broken?
AC detection broken?
Product: Fedora
Classification: Fedora
Component: gnome-power-manager (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
: 495483 (view as bug list)
Depends On:
Blocks: F11Target
  Show dependency treegraph
Reported: 2009-04-18 18:19 EDT by Dave Jones
Modified: 2015-01-04 17:30 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-07 05:52:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dave Jones 2009-04-18 18:19:12 EDT
My laptop just shut off without warning.  No "you're on battery and its almost empty" popup. No automatic hibernate, just power off.

Odder still, when I connected AC, and powered back up, a few minutes after logging in, I got a popup telling me my battery was critical, even though it was charging.

Then another telling me I have approximately 'Unknown time of battery remaining'.

If I hover over the applet, I get a 'Laptop battery 3 hours 45 minutes until charged (3.5%)' balloon

/proc/acpi/battery/* looks like this right now..
alarm:                   unsupported
present:                 yes
design capacity:         59500 mWh
last full capacity:      59500 mWh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 5950 mWh
design capacity low:     120 mWh
capacity granularity 1:  0 mWh
capacity granularity 2:  1 mWh
model number:            
serial number:           
battery type:            Lion
OEM info:                Sony Corporation
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            15161 mW
remaining capacity:      2160 mWh
present voltage:         10265 mV

lshal | grep battery shows..

udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0'
  battery.charge_level.current = 2160  (0x870)  (int)
  battery.charge_level.design = 59500  (0xe86c)  (int)
  battery.charge_level.last_full = 59500  (0xe86c)  (int)
  battery.charge_level.percentage = 3  (0x3)  (int)
  battery.charge_level.rate = 15161  (0x3b39)  (int)
  battery.is_rechargeable = true  (bool)
  battery.model = ''  (string)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = true  (bool)
  battery.rechargeable.is_discharging = false  (bool)
  battery.remaining_time = 13615  (0x352f)  (int)
  battery.reporting.current = 2160  (0x870)  (int)
  battery.reporting.design = 59500  (0xe86c)  (int)
  battery.reporting.last_full = 59500  (0xe86c)  (int)
  battery.reporting.rate = 15161  (0x3b39)  (int)
  battery.reporting.technology = 'Li-ion'  (string)
  battery.reporting.unit = 'mWh'  (string)
  battery.serial = ''  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.vendor = 'Sony Corporation'  (string)
  battery.voltage.current = 10265  (0x2819)  (int)
  battery.voltage.design = 10800  (0x2a30)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0'  (string)
Comment 1 Michel Alexandre Salim 2009-04-24 12:44:57 EDT
*** Bug 495483 has been marked as a duplicate of this bug. ***
Comment 2 Michel Alexandre Salim 2009-04-24 12:52:37 EDT
This happens to me all throughout the F-11 development cycle too.

On two different laptops, if you drain the battery until g-p-m automatically powers off the machine, attempts to reboot the machine -- while on AC power -- will fail.

Once GDM is started, currently g-p-m will detect the critical battery status and initiate a shut-down, *even on AC*.
Comment 3 Dave Jones 2009-05-06 05:33:35 EDT
just had it happen again in different circumstances.

laptop had been suspended, and had ran out of power overnight.
plugged in power, and turned on. booted up.
a few minutes later, up popped a dialog telling me it was going to shutdown in 'unknown time' because the battery was critically low.

I've seen this happen about a half dozen times in the last week.

All with the latest rawhide bits applied.
Comment 4 Richard Hughes 2009-05-06 05:40:56 EDT
I'm guessing the battery is not identifying itself as charging when it's very low. When you completely discharge the machine, if you plug in the power, then wait 60 seconds, then turn on the machine, does this still happen?

DeviceKit-power looks at the battery state, not the AC state when it's doing policy actions. It's the only sane way (IMO) to do this when you're dealing with multiple batteries in one machine, or with multiple power supplies.

If you boot the machine when completely discharged, what's the output of "devkit-power --dump"? Thanks.
Comment 5 Adrien Bustany 2009-05-17 04:35:12 EDT
I get this behaviour too...
I didn't really get the point with multiple power supplies : as long as we're one power supply we shoudln't hibernate, should we ?
BTW it takes more than 60 sec for me, actually I have to wait 'til the battery level is >2% if I don't want gpm to rehibernate my laptop.
Comment 6 Richard Hughes 2009-06-03 04:14:11 EDT
Can you try installing https://admin.fedoraproject.org/updates/F11/FEDORA-2009-5740 and https://admin.fedoraproject.org/updates/F11/FEDORA-2009-5728 and then reboot please. Thanks.
Comment 7 Bug Zapper 2009-06-09 10:05:36 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 8 How 2009-06-11 00:32:03 EDT
I am using fedora 11 full release here

1. gnome-power-manager does not hibernate when my battery is at 4% with AC unplugged

2.giving wrong battery reading most times 90% when acpi already at 77%

3.info bubble popup giving "on battery" when plugging AC in

4. battery icon often disappears even when I selected "show icon when there is a battery"
Comment 9 How 2009-06-14 01:24:28 EDT
actually it hibernated at 2% because my battery is not as fit.

The battery icon on the gnome panel still does not display with correct information about charge. 

"battery low" popup message still display at wrong times or delayed
Comment 10 Pedro Matiello 2009-06-17 06:50:28 EDT
Running gnome-power-manager-2.26.2-1.fc11.x86_64.

Removing the power chord: "You have approximately 4 minutos of remaining battery life (98.1%)"

Reconnecting the power chord: "The AC power has been unplugged. The system is now using battery power"
Comment 11 How 2009-06-17 18:37:04 EDT
yes this exactly what I got as well. Popup wrong messages.
Comment 12 How 2009-06-17 19:56:34 EDT
additional problem to devkit-power/gpm is the cpu fan full speed every time you are at login screen and doesnt stop for a long time. I am not sure if it is to do above problem. 

I started the devkit-power --monitor with AC plugged in then logout and while at the login screen the log says:
"Device Changed: /org/freedsktop/DeviceKit/Power/devices/battery_BAT0" repeatedly while the cpu fan is running high.
Comment 13 Pedro Matiello 2009-06-21 00:21:23 EDT
I'm not sure if it's useful, but this is what I get from devkit-power monitor:

[pedro@pmatiello-notebook ~]$ devkit-power -m
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
# Removing power cable.
device changed:     /org/freedesktop/DeviceKit/Power/devices/line_power_ACAD
device changed:     /org/freedesktop/DeviceKit/Power/devices/battery_BAT1
daemon changed:
# Connecting power cable.
device changed:     /org/freedesktop/DeviceKit/Power/devices/line_power_ACAD
daemon changed:
device changed:     /org/freedesktop/DeviceKit/Power/devices/battery_BAT1

Is this expected?
Comment 14 Rajeesh 2009-06-21 07:42:40 EDT
I have observed the same behaviour and same messages as in comment#10, after moving to Fedora 11 from Fedora 10.

Output or devkit-power --monitor:
[rajeesh@anish-laptop tinyAccounting]$ devkit-power --monitor
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
#Unplgging power cable here
device changed:     /org/freedesktop/DeviceKit/Power/devices/line_power_ACAD
device changed:     /org/freedesktop/DeviceKit/Power/devices/battery_BAT1
daemon changed:
#Plugging power cable back in
device changed:     /org/freedesktop/DeviceKit/Power/devices/line_power_ACAD
daemon changed:
device changed:     /org/freedesktop/DeviceKit/Power/devices/battery_BAT1
Comment 15 Rajeesh 2009-06-21 07:50:52 EDT
I missed the version details in comment#14.


I think bug#501367 is related to/duplicate of this.
Comment 16 How 2009-06-22 18:56:23 EDT
you can try gnome-power-manager 2.27 in rawhide. works great so far for me now. solves the above issues.
Comment 17 Pedro Matiello 2009-07-05 15:50:02 EDT
I'm not sure if it's ok to mix packages from gnome 2.26 and gnome 2.27. I'm still waiting for a fix for f11. I'll be happy to test any updates suggested by the maintainers.
Comment 18 Richard Hughes 2009-07-06 08:59:16 EDT
I've already built DeviceKit-power 009 and gnome-power-manager 2.26.3 which when used together should approximately match the logic what is in rawhide.

Grab them here:
Comment 19 Pedro Matiello 2009-07-06 16:41:48 EDT
I installed both packages and rebooted the system. It seems to be working fine here now. Thanks!
Comment 20 Richard Hughes 2009-07-07 05:52:57 EDT
Cool. Please add positive karma to the updates when you get a few minutes. Thanks.
Comment 21 Pedro Matiello 2009-07-07 08:53:34 EDT
I've added comments in both pages with the "works for me" option, but the karma hasn't increased. Do I need an account or this behaviour is expected?
Comment 22 mircho 2009-07-07 15:03:08 EDT
It did not work for me.
Fujitsu-Siemens Esprimo Mobile 9200
Comment 23 How 2009-07-18 20:30:11 EDT
I found that with this new update it hibernates by itself on resume when the battery is full. Had to resume twice to bring up the system.

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