diff --git a/etc/UPower.conf b/etc/UPower.conf index bae5d2e..b9968a9 100644 --- a/etc/UPower.conf +++ b/etc/UPower.conf @@ -88,7 +88,9 @@ TimeAction=120 # PowerOff # Hibernate # HybridSleep +# Suspend # +# If Suspend isn't available, HybridSleep will be used # If HybridSleep isn't available, Hibernate will be used # If Hibernate isn't available, PowerOff will be used CriticalPowerAction=HybridSleep diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c index 2aac74d..1b55a65 100644 --- a/src/linux/up-backend.c +++ b/src/linux/up-backend.c @@ -553,11 +553,12 @@ up_backend_get_critical_action (UpBackend *backend) const gchar *method; const gchar *can_method; } actions[] = { + { "Suspend", "CanSuspend" }, { "HybridSleep", "CanHybridSleep" }, { "Hibernate", "CanHibernate" }, { "PowerOff", NULL }, }; - guint i = 0; + guint i = 1; char *action; g_return_val_if_fail (backend->priv->logind_proxy != NULL, NULL); @@ -569,7 +570,7 @@ up_backend_get_critical_action (UpBackend *backend) if (g_str_equal (actions[i].method, action)) break; if (i >= G_N_ELEMENTS (actions)) - i = 0; + i = 1; g_free (action); }