Zor*_*b29 6 battery thinkpad power-management
我在 Ubuntu 18.04 上有一个 thinkpad T490。我想保护我的电池(最大充电 80 和开始充电 75 的 tlp 东西)。
但是,看起来我有一些问题:
~$ sudo tlp setcharge START_CHARGE 70
Error: ThinkPad battery features not available.
Run Code Online (Sandbox Code Playgroud)
我认为这是由于 tp-sampi 和/或 tpacpi-bat 的问题:
~$ sudo tlp stat
...
+++ ThinkPad Battery Features
tp-smapi = inactive (kernel module 'tp_smapi' load error)
tpacpi-bat = inactive (kernel module 'acpi_call' load error)
Run Code Online (Sandbox Code Playgroud)
谷歌搜索后,它似乎tp-smapi不适用于 *30 及以上版本的 thinkpad,tpacpi-bat应该是替代的解决方案。我无法找到有关是否/如何设置的更多帮助tpacpi-bat。任何提示/说明?:)
在与包作者和维护者讨论后(非常感谢他对我的 n00bness 的耐心),解决方案是更新到 PPA 版本 1.2.2(我想更新的也可以):
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tp-smapi-dkms acpi-call-dkms tlp
Run Code Online (Sandbox Code Playgroud)
之后,事情开始工作:
~$ sudo tlp-stat
--- TLP 1.2.2 --------------------------------------------
...
+++ Battery Features: Charge Thresholds and Recalibrate
natacpi = active (data, thresholds)
tpacpi-bat = inactive (kernel module 'acpi_call' load error)
tp-smapi = inactive (ThinkPad not supported)
...
Run Code Online (Sandbox Code Playgroud)
并且可以更新电池电量:
~$ sudo tlp setcharge 70 80
Setting temporary charge thresholds for BAT0:
start = 70 (no change)
stop = 80 (no change)
Run Code Online (Sandbox Code Playgroud)
导致:
~$ sudo tlp-stat
...
/sys/class/power_supply/BAT0/charge_start_threshold = 70 [%]
/sys/class/power_supply/BAT0/charge_stop_threshold = 80 [%]
...
Run Code Online (Sandbox Code Playgroud)
请注意,如果您希望更新在重启后继续存在,您需要/etc/default/tlp通过取消注释/修改第 355-356 行来更新配置文件(您需要以 root 身份打开并覆盖只读保护,例如在您需要的 vim 中:w!):
350 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
351 # required). Charging starts when the remaining capacity falls below the
352 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
353 # Main / Internal battery (values in %)
354 # Default: <none>
355 START_CHARGE_THRESH_BAT0=70
356 STOP_CHARGE_THRESH_BAT0=80
357 # Ultrabay / Slice / Replaceable battery (values in %)
358 # Default: <none>
359 #START_CHARGE_THRESH_BAT1=75
360 #STOP_CHARGE_THRESH_BAT1=80
Run Code Online (Sandbox Code Playgroud)
更多细节:
https://linrunner.de/en/tlp/docs/tlp-configuration.html#chargethresholds
| 归档时间: |
|
| 查看次数: |
3899 次 |
| 最近记录: |