在升级到Ubuntu21.04之后,TLP配置不会在系统启动时应用。重新安装软件包没有帮助。
检查TLP系统单元tlp.service
确认了问题。
$ systemctl status tlp.service
● tlp.service - TLP system startup/shutdown
Loaded: loaded (/lib/systemd/system/tlp.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://linrunner.de/tlp
发布于 2021-07-06 16:24:56
新的电源配置文件-守护进程包是问题所在(请参阅TLP/564)。这个包默认情况下安装在Ubuntu、21.04+和其他几个发行版中。
新的电源配置文件-守护程序包附带了一个系统单元power-profiles-daemon.service
。此单元声明与tlp.service
冲突,导致tlp.service
被有效禁用。
/lib/systemd/system/power-profiles-daemon.service (注意Conflicts=
指令)
[Unit]
Description=Power Profiles daemon
Conflicts=tuned.service tlp.service auto-cpufreq.service
Before=multi-user.target display-manager.target
...
如果一个单元对另一个单元有Conflicts=
指令,启动前者将停止后者,反之亦然。而且因为tlp.service
没有在power-profiles-daemon.service
上声明Conflicts=
指令。不管单元的激活顺序如何,它总是被禁用的。
sudo systemctl disable power-profiles-daemon.service
禁用电源配置文件-daemon.service单元;或sudo apt purge power-profiles-daemon
从系统中删除电源配置文件-守护进程包。tlp.service
重写sudo systemctl edit tlp.service
配置,并手动设置Conflicts=
和Before=
指令。[Unit]
Conflicts=power-profiles-daemon.service
Before=power-profiles-daemon.service
https://askubuntu.com/questions/1350386
复制相似问题