! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
No hibernate on low battery power
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description xfce 2014-10-15 20:54:38 CEST
My laptop does not hibernate if the battery power is low, nor do I get a warning.

This despite the facts that:

- hibernation on low power is enabled
- hibernation works in general
- the battery level is recognized correctly

I'm running archlinux with kernel version 3.17.
Comment 1 Simon P 2014-10-19 14:08:14 CEST
Me too (debian/testing, xfpm built from git master)

Below fixes for a couple of 'typos' and now action at critical power works:

--- a/src/xfpm-battery.c
+++ b/src/xfpm-battery.c
@@ -395,7 +395,7 @@
 	    g_value_set_boolean (value, battery->priv->ac_online);
 	    break;
 	case PROP_DEVICE_TYPE:
-	    g_value_set_enum (value, battery->priv->type);
+	    g_value_set_uint (value, battery->priv->type);
 	    break;
 	case PROP_CHARGE_STATUS:
 	    g_value_set_enum (value, battery->priv->charge);


--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -482,7 +482,7 @@
 	g_object_get (G_OBJECT (g_list_nth_data (list, i)),
                   "charge-status", &battery_charge,
                   "device-type", &type,
-                  "power-supply", &power_supply,
+                  "ac-online", &power_supply,
                   NULL);
 	if ( type != UP_DEVICE_KIND_BATTERY &&
 	     type != UP_DEVICE_KIND_UPS &&
Comment 2 Eric Koegel editbugs 2014-10-27 11:58:17 CET
Thanks once again Simon P! Pushed your patch to master.

commit b0d8826e561ef7063ff43b72d066833a9d80f1dc
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Mon Oct 27 13:47:27 2014 +0300

    Fix for critical battery action (Bug #11237)
    
    There were a couple of 'typos' to correct and now there's action
    at critical power.
    Patch submitted by Simon P.

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=b0d8826e561ef7063ff43b72d066833a9d80f1dc

Bug #11237

Reported by:
xfce
Reported on: 2014-10-15
Last modified on: 2014-10-27

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Attachments

Additional information