转载于:https://www.linuxidc.com/Linux/2017-12/149232.htmTLP是一个具有自动后台任务的命令行工具。它带有一个配置(/etc/default/tlp
),默认已经针对电池寿命进行了优化,所以您可以安装并后就不用什么要做的了。尽管如此,TLP是高度可定制的,以满足您的具体要求。如何在Ubuntu下安装TLP 1.0:
1. 打开终端通过Ctrl + Alt + T或通过搜索“终端”形式的应用程序启动器。 当它打开时,运行命令: linuxidc@linuxidc:~$
sudo add-apt-repository ppa:linrunner/tlp
2. 直接运行以下命令来安装(或升级)TLP: linuxidc@linuxidc:~$
sudo apt update linuxidc@linuxidc:~$ sudo apt install tlp
安装过程中还会提示如下内容


安装后,TLP作为后台任务静静地运行。您可以通过编辑 /etc/default/tlp
来更改默认设置,或使用命令行工具来指定您的需求。阅读完整的文档。3. 安装成功后,就可以启动TLP或者reboot(重启) linuxidc@linuxidc:~$ sudo tlp start 检查TLP是否正常运行
linuxidc@linuxidc:~$ sudo tlp stat
然后如果找到 +++ System Status
TLP power save = enabled
power source = ac
TLP power save = enabled #说明已经成功开启 linuxidc@linuxidc:~$ sudo tlp start #显示所有信息和设置
linuxidc@linuxidc:~$ sudo tlp start -b #只显示电池信息
linuxidc@linuxidc:~$ usudo tlp-stat --battery
sudo tlp stat -c #只显示配置信息 相当于 sudo tlp-stat --config

sudo tlp stat -r #显示无线设备的状态信息 相当于 sudo tlp-stat -rfkill

sudo tlp stat -t #只显示温度和风扇转速 相当于 sudo tlp-stat --temp

sudo tlp stat -T #显示debug信息 (/var/log/debug)如果想要关闭TLP, vi /etc/default/tlp 将其中的 "TLP_ENABLE=1" 改为 "TLP_ENABLE=0"即可.如果想要定制更多的东西,也可以去配置这个文件.
卸载:
要删除tlp,请打开终端并运行命令:
sudo apt-get remove --autoremove tlp要删除PPA,请启动Software&Updates并导航到“其他软件”选项卡。