After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598243 - runs critical charge action again after plugging in AC
runs critical charge action again after plugging in AC
Status: RESOLVED NOTGNOME
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-10-13 08:53 UTC by Martin Pitt
Modified: 2009-10-15 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log which shows erroneous critical battery actions with AC (36.60 KB, application/gzip)
2009-10-13 08:53 UTC, Martin Pitt
Details

Description Martin Pitt 2009-10-13 08:53:23 UTC
Created attachment 145329 [details]
log which shows erroneous critical battery actions with AC

I just tested current gpm wrt. triggering the "critical charge action" (suspend
for me). That worked fine, it suspended when the charge level was about 1.3%
(below 5% my battery/dkp don't seem to be able to calculate remaining time,
which is why it falls back to percentage; all fine here).

It's a little late (gconfified action percentage is 2%), and the second-last
notification about "in 2 minutes" is not really correct, but it worked:

TI:10:24:23     TH:0x1ffe090    FI:gpm-engine.c FN:gpm_engine_get_summary,259
 - tooltip: Laptop battery discharging (1.3%)
[...]
 - notification 0x22e7b00: Laptop battery critically low : Computer will
suspend in 2 minutes.
[...]
TI:10:24:34     TH:0x1ffe090    FI:gpm-engine.c FN:gpm_engine_get_summary,259
 - tooltip: Laptop battery discharging (1.2%)
TI:10:24:37     TH:0x1ffe090    FI:gpm-control.c       
FN:gpm_control_suspend,279
 - emitting sleep

While it was suspended, I plugged in AC and resumed. Now gpm immediately gave
me the "battery is critically low" notice again and suspended again:

TI:10:25:04     TH:0x1ffe090    FI:gpm-control.c       
FN:gpm_control_suspend,284
 - emitting resume
[...]
  power supply:         yes
    state:               discharging
[...]
  History (charge):
    1255422195  1.976   unknown
    1255422235  1.595   discharging
    1255422274  1.214   discharging
    1255422306  1.190   charging

[...]
TI:10:25:06     TH:0x1ffe090    FI:gpm-manager.c       
FN:gpm_manager_perform_policy,509
 - action: /apps/gnome-power-manager/actions/critical_battery set to suspend
(Battery is critically low.)

So for that time it seems that dk-p got a little confused and didn't update the
"discharging" state fast enough (it has "charging" in the history, and "power
supply: yes"). However, now it immediately auto-suspended a third time:

TI:10:25:19     TH:0x1ffe090    FI:gpm-engine.c
FN:gpm_engine_update_composite_device,646
[...]
  power supply:         yes
  updated:              Tue Oct 13 10:25:19 2009 (0 seconds ago)
  battery
    state:               charging
[...]
TI:10:25:19     TH:0x1ffe090    FI:gpm-devicekit.c     
FN:gpm_devicekit_get_object_icon,203
 - got filename: gpm-battery-000-charging
TI:10:25:19     TH:0x1ffe090    FI:gpm-manager.c       
FN:gpm_manager_notify,389
 - notification 0x20a2580: Laptop battery critically low : The battery is below
the critical level and this computer is about to suspend.<br><b>NOTE:</b> A
small amount of power is required to keep your computer in a suspended state.
[...]
TI:10:25:28     TH:0x1ffe090    FI:gpm-engine.c FN:gpm_engine_get_summary,259
 - tooltip: Laptop battery 3 hours 25 minutes until charged (1.3%)
TI:10:25:29     TH:0x1ffe090    FI:gpm-manager.c       
FN:gpm_manager_action_suspend,446
 - suspending, reason: Battery is critically low.

and here dk-p gave the right info.
Comment 1 Richard Hughes 2009-10-14 09:37:59 UTC
Could you try with DKp from git master please, I've just checked in a fix that might help. Thanks.
Comment 2 Martin Pitt 2009-10-15 11:26:47 UTC
Thank you, works perfectly now!