linux省电三步骤

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

linux省电三步骤

ManWingloeng   2020-02-27 我要评论

前言

我的是deepin系统,因为新买了magicbook pro笔记本(i5版),在windows下续航能够有10小时,但是在linux下耗电迅速只能三四小时,所以我对系统进行了省电优化,能够日常使用可以续航7小时以上。

步骤一

安装tlp

sudo apt-get install tlp tlp-rdw
systemctl enable tlp
systemctl enable tlp-sleep

步骤二

安装powertop

sudo apt-get install powertop
vim /etc/systemd/system/powertop.service

写一个powertop的服务
其实就是写powertop --auto-tune自动优化

[Unit]
Description=PowerTOP auto tune
[Service]
Type=idle
Environment="TERM=dumb"
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target

同样也是enable该服务
systemctl enable powertop

步骤三

powersave写入cpu管理

vim /etc/rc.local

好像默认是balance的,我设置省电模式,但是我没做cpu降频了,因为本身就是轻薄本我还得跑跑代码,降频怕带不动了。

#!/bin/bash
# save power
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu5/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo 'powersave' > /syshttps://img.qb5200.com/download-x/devices/system/cpu/cpu7/cpufreq/scaling_governor
# powertop --auto-tune
exit 0

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们