Ubuntu系统下省电降温技巧

最近在折腾Ubuntu桌面系统,下面的依然是折腾系列的一部分>_<


0x00

最近转到Ubuntu下后发现个严重问题 笔记本电脑的续航相比Windows下有明显减少,下面是几个可以优化电池消耗的点,记录下载做个总结,供大家参考。

0x01

    安装并设置laptop mode

0x02

    使用alp?

0x03 关闭睿频

    参考http://ju.outofmemory.cn/entry/79230

    1.首先,安装apufrequtils   sudo apt-get install cpufrequtils

    2.使用cpufreq-info查看当前频率以及cpu设备支持的频率范围

 ~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 1.20 GHz - 3.40 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.20 GHz and 2.40 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.56 GHz.



可以看出,设备支持的频率范围是1.2G~3.4G(此处已经包含了睿频的频率),我们可以通过这个范围去除睿频的频率,比如,我这款cpu,频率不睿频的话最大频率为2.4GB,那么我们可以配置最大频率为2.4G已达到关闭睿频。


3.修改最大频率方法

 如上面引用的网页所说,可以使用cpufreq-set进行临时性的cpu频率设置,但是,这种是临时性的设置,我们需要的是长期的设置

通过 dpkg -L cpufrequtils命令,我们看到cpufreq工具在/etc/init.d/cpufrequtils有一个配置文件,里面可以设置频率范围,默认的cpu调度模式等,如下

~$ more /etc/init.d/cpufrequtils
#!/bin/sh
### BEGIN INIT INFO
# Provides:       cpufrequtils
# Required-Start: $remote_fs loadcpufreq
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:
# Short-Description: set CPUFreq kernel parameters
# Description: utilities to deal with CPUFreq Linux
#    kernel support
### END INIT INFO
#

DESC="CPUFreq Utilities"

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CPUFREQ_SET=/usr/bin/cpufreq-set
CPUFREQ_INFO=/usr/bin/cpufreq-info
CPUFREQ_OPTIONS=""

# use lsb-base
. /lib/lsb/init-functions

# Which governor to use. Must be one of the governors listed in:
#   cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
#
# and which limits to set. Both MIN_SPEED and MAX_SPEED must be values
# listed in:
#   cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# a value of 0 for any of the two variables will disabling the use of
# that limit variable.
#
# WARNING: the correct kernel module must already be loaded or compiled in.
#
# Set ENABLE to "true" to let the script run at boot time.
#
# eg:    ENABLE="true"
#    GOVERNOR="powersave"
#    MAX_SPEED=1000
#    MIN_SPEED=500

ENABLE="true"
GOVERNOR="powersave"
MAX_SPEED="2.4G"
MIN_SPEED="1.2G"

可以看到,此配置文件可以设置频率范围,比如这里我们设置频率最大值为2.4G,这样就达到了关闭睿频的目的

0x04

    关闭独显

先占坑,今天太晚了,晚点补上

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。