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 594739 - shutdown after plugging in AC with "critical battery"
shutdown after plugging in AC with "critical battery"
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.27.x
Other All
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-09-10 12:30 UTC by Scott Howard
Modified: 2012-03-23 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbus-devkit-power.log (2.90 KB, text/plain)
2009-09-10 12:31 UTC, Scott Howard
Details
gnome-power-bugreport.txt (4.02 KB, text/plain)
2009-09-10 12:31 UTC, Scott Howard
Details
GConfNonDefault.txt (931 bytes, text/plain)
2009-09-10 12:32 UTC, Scott Howard
Details
gnome-power-manager --verbose output (55.28 KB, text/plain)
2009-09-10 12:34 UTC, Scott Howard
Details
gnome-power-manager --verbose (80.90 KB, text/plain)
2009-11-15 05:59 UTC, Matthew Chapman
Details

Description Scott Howard 2009-09-10 12:30:28 UTC
Steps used to reproduce:
1. Unplug AC power and let battery discharge
2. Wait for power to reach critical level. The system should notify you that the battery is at a critical level and the computer is about to be shut down.
3. Immediately reconnect the power supply. The power tray icon should show that the system is charging.
4. After a few seconds a message in any open console will inform you that the system is going down for halt NOW!.
(5. Optional: Curse if you had anything unsaved open)

Note: This isn't over a suspend, but certainly easier to reproduce than trying to catch it right at the critical moment.



This is similar to bug 581598, but occurs in version 2.27.92. See attached gnome-power-bugreport and dbus logs that illustrate it.


Originally reported at:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/70293
Comment 1 Scott Howard 2009-09-10 12:31:16 UTC
Created attachment 142906 [details]
dbus-devkit-power.log
Comment 2 Scott Howard 2009-09-10 12:31:48 UTC
Created attachment 142907 [details]
gnome-power-bugreport.txt
Comment 3 Scott Howard 2009-09-10 12:32:12 UTC
Created attachment 142908 [details]
GConfNonDefault.txt
Comment 4 Scott Howard 2009-09-10 12:34:15 UTC
Created attachment 142909 [details]
gnome-power-manager --verbose output
Comment 5 Greg Lavino 2009-11-12 02:52:00 UTC
Happens on my laptop also with version 2.28.1 (Ubunutu 9.10)
at 16% I plugged in my charger, and the charge immediately jumped to 7% based on the power statistics graph.

I will try again while tracking /proc/acpi/battery/BAT1/status.
Comment 6 Matthew Chapman 2009-11-15 05:58:25 UTC
Same problem here, version 2.28.1 (Ubuntu 9.10), Dell E6400.  Once the critical level is reached and the system warns of hibernation in 4-5 mins, plugging in the AC adapter causes the system to hibernate rather than cancelling hibernation (or whatever the configured action is).

Attaching gnome-power-manager --verbose output.  Warning displayed at 16:46:30, power adapter was plugged in at 16:46:49, system proceeded to hibernate.  This might be relevant:

TI:16:46:49     TH:0x13a4890    FI:gpm-engine.c FN:gpm_engine_get_warning_time,158
 - time zero, falling back to percentage for battery
Comment 7 Matthew Chapman 2009-11-15 05:59:29 UTC
Created attachment 147756 [details]
gnome-power-manager --verbose
Comment 8 David Sommerseth 2011-05-30 09:55:36 UTC
I've been bitten by the issue mentioned on comment #0 several times, so I wrote a little patch which does the trick for me.  I've posted it to the mailing list as well.

http://mail.gnome.org/archives/gnome-power-manager-list/2011-May/msg00003.html

I'm not convinced it's 100% bug free, I'm wondering if gpm_manager_play_loop_stop (manager) should be called before aborting the critical action when power is restored.
Comment 9 David Sommerseth 2011-06-22 12:45:29 UTC
I believe this one is finally fixed, in a slightly modified patch which got accepted upstream.

commit d99e086a0db624a7e9c7c06643902cb3cfabfb01
Author: David Sommerseth <davids@redhat.com>
Date:   Fri Jun 17 16:31:14 2011 +0100

    Don't complete critical action if power is resumed
    
    When the critical warning is displayed, the critical action
    will be perfomed even if power is restored.
    
    This patch adds an extra check to see if power has been restored
    during those 20 seconds the warning is displayed.  If the power
    is restored in time, abort the critical action.
    
    Signed-off-by: Richard Hughes <richard@hughsie.com>