首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >膝上型电脑不关闭低功耗

膝上型电脑不关闭低功耗
EN

Ask Ubuntu用户
提问于 2019-06-08 18:30:10
回答 1查看 939关注 0票数 2

我对Ubuntu 19.04有意见。当电池不足时,系统不会以正常的方式关闭。当电池电量降到3%时,笔记本电脑就会关机,就像我拔出电池一样。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2019-06-10 22:45:51

除非最近发生了一些变化,否则您应该有以下文件:/etc/UPower/UPower.conf,包含:

代码语言:javascript
复制
# 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=10
PercentageCritical=3
PercentageAction=2

# 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=HybridSleep

如果百分比为true (默认值),则行:

代码语言:javascript
复制
PercentageLow=10
PercentageCritical=3
PercentageAction=2

这意味着在剩下10%的时候,你会被告知电池电量不足。在剩下的3%,一个关键的警告被发布,说电池即将死亡。剩下的2%,你的机器就会关机。

如果百分比为假,则行:

代码语言:javascript
复制
TimeLow=1200
TimeCritical=300
TimeAction=120

这意味着在剩下的1200秒(20分钟),你会被告知电池电量不足。在剩余的300秒(5分钟),一个关键的警告被发布,电池即将死亡。在120秒(2分钟),你的机器关闭。

配置文件设置应在gsettings中复制,您可以使用以下方法进行确认:

代码语言:javascript
复制
$ gsettings list-recursively | grep plugins.power | grep time
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
org.gnome.settings-daemon.plugins.power time-low 1200
org.gnome.settings-daemon.plugins.power time-action 120
org.gnome.settings-daemon.plugins.power time-critical 300
org.gnome.settings-daemon.plugins.power use-time-for-policy true

并附有:

代码语言:javascript
复制
$ gsettings list-recursively | grep plugins.power | grep percentage
org.gnome.settings-daemon.plugins.power percentage-low 10
org.gnome.settings-daemon.plugins.power percentage-critical 3
org.gnome.settings-daemon.plugins.power percentage-action 2
票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1149643

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档