#783027 gnome-control-center: "When battery power is critical" don't offer "hibernate" without package "laptop-mode-tools"

Package:
gnome-control-center
Source:
gnome-control-center
Description:
utilities to configure the GNOME desktop
Submitter:
Frank Dietrich
Date:
2015-04-21 12:00:05 UTC
Severity:
normal
#783027#5
Date:
2015-04-20 20:19:30 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

Even the package "laptop-mode-tools" isn't installed it is possible to select
"hibernate" as action "when battery power is critical". The setting is taken
and as soon the battery is critical the laptop switches off. There is no
warning before and more dangerous there is no warning in the settings that
hibernate will not be possible.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

It took a while to figure out what was the problem. "sudo pm-hibernate" was
working as expected but not the "hibernate" mode "when batters power is
critical".

   * What was the outcome of this action?

After some investigation I found out that the package "laptop-mode-tools" must
be installed to have this feature working.
Installing the package "laptop-mode-tools" and enabling
"ENABLE_AUTO_HIBERNATION=1" in /etc/laptop-mode/conf.d/auto-hibernate.conf
solved the problem. When the battery power becomes critical the laptop goes
into hibernate mode.

   * What outcome did you expect instead?

When the "laptop-mode-tools" package is not installed the mode "hibernate"
should either not be offered in the setting for "When battery power is
critical" or there should be a warning that this mode cannot be selected
without installing the package first.

cheers
Frank

#783027#10
Date:
2015-04-20 22:21:11 UTC
From:
To:
Am 20.04.2015 um 22:19 schrieb Frank Dietrich:


laptop-mode-tools is a package full of hacks. We shouldn't promote its
usage.

Also, hibernate works fine here without laptop-mode-tools or pm-utils
being installed. So I suspect your issue is somewhere else.

#783027#15
Date:
2015-04-21 11:12:21 UTC
From:
To:
Michael Biebl <biebl@debian.org> wrote:

I'm not able to judge about the quality of this package.

Could you please provide me some hints to find out why the automatic
hibernate mode is not working without the laptop-mode-tools?

If you have only some (maybe untested) proposals which to try. Let
me know.

Is there a logfile where I could have a look? Not sure if the entries
from just before the laptop get it's powerloss will/can be kept.

cheers
Frank

#783027#20
Date:
2015-04-21 11:30:24 UTC
From:
To:
Am 21.04.2015 um 13:12 schrieb Frank Dietrich:

If you set the action to "poweroff" when battery is critical in
gnome-control-center, is the laptop powered off?
If not, it looks like this condition is not properly triggered.

Do you use a time or percentage policy, i.e. is the critical battery
state determined by remaining time or remaining percentage?

Run dconf-editor and check org -> gnome -> settings-daemon -> plugins ->
power. See also [1]



[1]
http://askubuntu.com/questions/92794/how-to-change-critically-low-battery-value

#783027#25
Date:
2015-04-21 11:51:36 UTC
From:
To:
Am 21.04.2015 um 13:30 schrieb Michael Biebl:

For that, I'd log into GNOME, open a terminal and then run
gnome-settings-daemon --replace --debug.

When your battery reaches a critical level, check if
gnome-settings-daemon reacts to that.

#783027#30
Date:
2015-04-21 11:57:03 UTC
From:
To:
Am 21.04.2015 um 13:51 schrieb Michael Biebl:

This will output a lot of data. You might consider dumping that into a
file and filtering it via grep.

# Run gnome-settings-daemon in debug mode to get full log
$ gnome-settings-daemon --replace --debug 2>&1 | tee /tmp/log

On another terminal

# Filter log for power messages
$ tail -n 1000 -f  /tmp/log | grep power