Hi,
I'm running debian 8 jessie with gnome.
I would like to make my system hibernate when battery level is at a certain point, say 30%.
What I tried so far:
Gnome power manager doesn't have an option of changing the critical battery value.
dconf-editor also doesn't give that option.
I also tried to follow another suggestion in archwiki creating a udev rule, but it seems that my battery doesn't sent events to udev (no reports using: "udevadm monitor --property" and "cat sys/class/power_supply/BAT0/alarm" gave 0).
Thanks.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Solved] How can I hibernate at a specific battery level
Re: How to hibernate at specific battery level
I haven't tested it but...
http://unix.stackexchange.com/questions ... -threshold
http://unix.stackexchange.com/questions ... -threshold
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: How to hibernate at specific battery level
Thanks for the reply, the script on that post is for ubuntu and needs tweaking for a debian system(files /sys/devices/platform/smapi/BAT0/remaining_percent and /sys/devices/platform/smapi/BAT0/state don't exist on my system)
There must/should be a simpler solution for this trivial task than creating custom scripts.
There must/should be a simpler solution for this trivial task than creating custom scripts.
Re: How to hibernate at specific battery level
I think... (haven't tried) that you can adjust the values in /etc/UPower/UPower.conf. But in reality this may be more complicated as many Desktop Environments might have their own settings that may or may not override the settings that you manually change.
in my file it says
So at 10% I get a low power notification. Another one saying that system will now shut down at 3% and at 2% it goes into hybrid sleep. You can probablt change these values, for example if you have a battery that cannot provide sufficient voltage any more at, say 7%, then you could put CriticalPowerAction to 8%
in my file it says
Code: Select all
PercentageLow=10
PercentageCritical=3
PercentageAction=2
CriticalPowerAction=HybridSleep
Re: How can I hibernate at a specific battery level
wow. reasons to not use gnome just keep piling up.derul wrote:Gnome power manager doesn't have an option of changing the critical battery value.
dconf-editor also doesn't give that option.
i know that xfce4-power-manager can do what you want, and it doesn't require a fullblown xfce desktop.
but gnome's powermanager than would probably interfere...
i do have a simple script running for that task, on an old laptop, so that would be my simpler solution.
Re: How can I hibernate at a specific battery level
The first lines in this file state:pylkko wrote:I think... (haven't tried) that you can adjust the values in /etc/UPower/UPower.conf. But in reality this may be more complicated as many Desktop Environments might have their own settings that may or may not override the settings that you manually change.
in my file it saysSo at 10% I get a low power notification. Another one saying that system will now shut down at 3% and at 2% it goes into hybrid sleep. You can probablt change these values, for example if you have a battery that cannot provide sufficient voltage any more at, say 7%, then you could put CriticalPowerAction to 8%Code: Select all
PercentageLow=10 PercentageCritical=3 PercentageAction=2 CriticalPowerAction=HybridSleep
# Only the system vendor should modify this file, ordinary users
# should not have to change anything.
Nevertheless, (after saving a copy) I changed:
first the value of UsePercentageForPolicy to true (since default is false and "time remaining" instead of percentage is considered)
then the percentages to my liking
rebooted to make sure
and it worked!
I didn't get a message for low power (I don't recall if I was getting one before), but I got a message for critical power and one right before the hibernation (all at the specified new percentages).
I 'll give it some time to make sure things are smooth and there are no complications.
Thanks pylkko.
Re: How can I hibernate at a specific battery level
Yeah, I too noticed that message, but it doesn't really say why. So I suppose it might be because other settings may override or conflict with it in some distros/DE's