4

I'm using Ubuntu 16.04 with GNOME Shell 3.18.5. My laptop is Asus GL752VW.

In the settings of Gnome there's no critical power setting where I can control what and when the laptop will shutdown or hibernate. I've found the settings in org.gnome.settings-daemon.plugins.power where I changed use-time-for-policy to false and used percentage instead of time, but that didn't work either. Changing the settings with dconf editor has no effects on the desktop environment, even after logging out or restarting. Altering the font setting for the window title from Gnome Tweaks also has no effect.

What happens is that when the laptop has a critical battery level, it turns off. I don't get any notifications that the battery has a critical power and when I don't pay attention to the battery level my laptop immediately turns off without any previous warning or notification. This will eventually corrupt the file system.

Here are my /etc/Upower/Upower.conf configurations:

# Only the system vendor should modify this file, ordinary users
# should not have to change anything.

[UPower]

# Enable the Watts Up Pro device.
#
# The Watts Up Pro contains a generic FTDI USB device without a specific
# vendor and product ID. When we probe for WUP devices, we can cause
# the user to get a perplexing "Device or resource busy" error when
# attempting to use their non-WUP device.
#
# The generic FTDI device is known to also be used on:
#
# - Sparkfun FT232 breakout board
# - Parallax Propeller
#
# default=false
EnableWattsUpPro=false

# Don't poll the kernel for battery level changes.
#
# Some hardware will send us battery level changes through
# events, rather than us having to poll for it. This option
# allows disabling polling for hardware that sends out events.
#
# default=false
NoPollBatteries=false

# Do we ignore the lid state
#
# Some laptops are broken. The lid state is either inverted, or stuck
# on or off. We can't do much to fix these problems, but this is a way
# for users to make the laptop panel vanish, a state that might be used
# by a couple of user-space daemons. On Linux systems, see also
# logind.conf(5).
#
# default=false
IgnoreLid=false

# Policy for warnings and action based on battery levels
#
# Whether battery percentage based policy should be used. The default
# is to use the time left, change to true to use the percentage, which
# should work around broken firmwares. It is also more reliable than
# the time left (frantically saving all your files is going to use more
# battery than letting it rest for example).
# default=true
UsePercentageForPolicy=true

# When UsePercentageForPolicy is true, the levels at which UPower will
# consider the battery low, critical, or take action for the critical
# battery level.
#
# This will also be used for batteries which don't have time information
# such as that of peripherals.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# PercentageLow=10
# PercentageCritical=3
# PercentageAction=2
PercentageLow=15
PercentageCritical=12
PercentageAction=10

# When UsePercentageForPolicy is false, the time remaining at which UPower
# will consider the battery low, critical, or take action for the critical
# battery level.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# TimeLow=1200
# TimeCritical=300
# TimeAction=120
TimeLow=1200
TimeCritical=300
TimeAction=120

# The action to take when "TimeAction" or "PercentageAction" above has been
# reached for the batteries (UPS or laptop batteries) supplying the computer
#
# Possible values are:
# PowerOff
# Hibernate
# HybridSleep
#
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
CriticalPowerAction=PowerOff

The CriticalPowerAction option doesn't power off the laptop. The laptop just runs out of battery and turns off immediately.

1
  • Works in Ubuntu 18.04 LTS with /etc/UPower/UPower.conf (note that case is significant). Follow with sudo systemctl restart upower The gsettings are ignored.
    – kubanczyk
    May 3, 2019 at 20:10

0

You must log in to answer this question.