Hibernate/suspend on critical battery level - where should I set it from MATE GUI?

Note: This post is a logical continuation of my question on AskUbuntu. I do not get results there.

I have bought new battery for my laptop. It is running Ubuntu MATE 16.04.5 LTS.

This new battery have normal capacity, charging and provides long life :slight_smile:

But I have small problem: when battery level goes under some level - the laptop shutdowns immediately. I remember, that it normally went to the suspend with old battery.

With new battery I can suspend manually and all suspend-related tests (such as pm-is-supported --suspend, pm-is-supported --hibernate, pm-is-supported --suspend-hybrid) returns 0, so these actions are supported.

For more predictive results I have reseted all settings with

gsettings reset-recursively org.mate.power-manager

So my GSettings reports the following:

$ gsettings list-recursively | egrep "critical|action|low|time" | grep -i power | sort -u
org.mate.power-manager action-critical-battery 'hibernate'
org.mate.power-manager action-critical-ups 'shutdown'
org.mate.power-manager action-low-ups 'hibernate'
org.mate.power-manager action-sleep-type-ac 'suspend'
org.mate.power-manager action-sleep-type-battery 'hibernate'
org.mate.power-manager idle-dim-time 10
org.mate.power-manager info-history-time 21600
org.mate.power-manager notify-low-capacity true
org.mate.power-manager notify-low-power true
org.mate.power-manager percentage-action 2
org.mate.power-manager percentage-critical 3
org.mate.power-manager percentage-low 10
org.mate.power-manager show-actions true
org.mate.power-manager time-action 120
org.mate.power-manager time-critical 300
org.mate.power-manager time-low 1200
org.mate.power-manager use-time-for-policy true

In /etc/UPower/UPower.conf I have default values:

$ cat /etc/UPower/UPower.conf | grep -v ^# | egrep "Critical|Low|Action|Time"
PercentageLow=10
PercentageCritical=3
PercentageAction=2
TimeLow=1200
TimeCritical=300
TimeAction=120
CriticalPowerAction=HybridSleep

The MATE Power Management Preferences (mate-power-preferences) does not have GUI element to set critical battery level:

mate-power-preferences

I have tried to change the percentage- and time-based values but system continue to emergently shutdown. So I can lose results of my work.

Where should I set critical battery level for hibernate or suspend from MATE GUI?
Will changing value via GSettings or Dconf change value in UPower.conf?
Where else should I set the action on critical battery level?

Hello Norbert_X

I know little about these things, however, this might help you.

If you are running 18.04, a fresh install does away with the traditional “swap” partition, creating a swap-file instead. This may be relevant because the “hibernate” / “suspend” images are traditionally stored to the swap partition.

If I have understood this incorrectly, I will be happy to be corrected. :slightly_smiling_face: