Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 496418 - AC detection broken?
Summary: AC detection broken?
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 495483 (view as bug list)
Depends On:
Blocks: F11Target
TreeView+ depends on / blocked
 
Reported: 2009-04-18 22:19 UTC by Dave Jones
Modified: 2015-01-04 22:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-07 09:52:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Jones 2009-04-18 22:19:12 UTC
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 Lind 2009-04-24 16:44:57 UTC
*** Bug 495483 has been marked as a duplicate of this bug. ***

Comment 2 Michel Lind 2009-04-24 16:52:37 UTC
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 09:33:35 UTC
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 09:40:56 UTC
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 08:35:12 UTC
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 08:14:11 UTC
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 14:05:36 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 How 2009-06-11 04:32:03 UTC
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 05:24:28 UTC
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 10:50:28 UTC
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 22:37:04 UTC
yes this exactly what I got as well. Popup wrong messages.

Comment 12 How 2009-06-17 23:56:34 UTC
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 04:21:23 UTC
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
^C

Is this expected?

Comment 14 Rajeesh 2009-06-21 11:42:40 UTC
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
^C

Comment 15 Rajeesh 2009-06-21 11:50:52 UTC
I missed the version details in comment#14.

DeviceKit-power-008-1.fc11.i586
gnome-power-manager-2.26.2-1.fc11.i586

I think bug#501367 is related to/duplicate of this.

Comment 16 How 2009-06-22 22:56:23 UTC
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 19:50:02 UTC
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 12:59:16 UTC
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:
https://admin.fedoraproject.org/updates/gnome-power-manager-2.26.3-1.fc11
https://admin.fedoraproject.org/updates/DeviceKit-power-009-1.fc11

Comment 19 Pedro Matiello 2009-07-06 20:41:48 UTC
I installed both packages and rebooted the system. It seems to be working fine here now. Thanks!

Comment 20 Richard Hughes 2009-07-07 09:52:57 UTC
Cool. Please add positive karma to the updates when you get a few minutes. Thanks.

Comment 21 Pedro Matiello 2009-07-07 12:53:34 UTC
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 19:03:08 UTC
It did not work for me.
Fujitsu-Siemens Esprimo Mobile 9200

Comment 23 How 2009-07-19 00:30:11 UTC
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.