joo
2020-09-14 02:12 deepin
本帖最后由 joo_tsao 于 2020-9-15 15:15 编辑
1、安装cpupowerCopy the Code
2、查看cpu有效的调速器
Copy the Code以我的电脑为例,你们参考自己的查看的信息。
Copy the Code3、设置CPU调速器为powersave
Copy the Code4、当然需要每次重启电脑都设置为自己指定的调速器
建立配置文件
Copy the Code请用自己喜欢的编辑器添加下面内容
Copy the Code建立systemd服务文件,每次重启设置CPU的调速器
Copy the Code请用自己喜欢的编辑器添加下面内容
Copy the Code5、重启服务
Copy the Code6、开机自动启动
Copy the Code
1、安装cpupower
- sudo apt-get install linux-cpupower
2、查看cpu有效的调速器
- sudo cpupower -c all frequency-info
- 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: Cannot determine or is not supported.
- hardware limits: 400 MHz - 2.80 GHz
- available cpufreq governors: performance powersave
- current policy: frequency should be within 400 MHz and 2.80 GHz.
- The governor "powersave" may decide which speed to use
- within this range.
- current CPU frequency: Unable to call hardware
- current CPU frequency: 1.88 GHz (asserted by call to kernel)
- boost state support:
- Supported: yes
- Active: yes
- analyzing CPU 1:
- driver: intel_pstate
- CPUs which run at the same hardware frequency: 1
- CPUs which need to have their frequency coordinated by software: 1
- maximum transition latency: Cannot determine or is not supported.
- hardware limits: 400 MHz - 2.80 GHz
- available cpufreq governors: performance powersave
- current policy: frequency should be within 400 MHz and 2.80 GHz.
- The governor "powersave" may decide which speed to use
- within this range.
- current CPU frequency: Unable to call hardware
- current CPU frequency: 1.88 GHz (asserted by call to kernel)
- boost state support:
- Supported: yes
- Active: yes
- analyzing CPU 2:
- driver: intel_pstate
- CPUs which run at the same hardware frequency: 2
- CPUs which need to have their frequency coordinated by software: 2
- maximum transition latency: Cannot determine or is not supported.
- hardware limits: 400 MHz - 2.80 GHz
- available cpufreq governors: performance powersave
- current policy: frequency should be within 400 MHz and 2.80 GHz.
- The governor "powersave" may decide which speed to use
- within this range.
- current CPU frequency: Unable to call hardware
- current CPU frequency: 1.87 GHz (asserted by call to kernel)
- boost state support:
- Supported: yes
- Active: yes
- analyzing CPU 3:
- driver: intel_pstate
- CPUs which run at the same hardware frequency: 3
- CPUs which need to have their frequency coordinated by software: 3
- maximum transition latency: Cannot determine or is not supported.
- hardware limits: 400 MHz - 2.80 GHz
- available cpufreq governors: performance powersave
- current policy: frequency should be within 400 MHz and 2.80 GHz.
- The governor "powersave" may decide which speed to use
- within this range.
- current CPU frequency: Unable to call hardware
- current CPU frequency: 1.88 GHz (asserted by call to kernel)
- boost state support:
- Supported: yes
- Active: yes
- sudo cpupower -c all frequency-set -g powersave
建立配置文件
- sudo touch /etc/default/cpupower
- # 自己设置调度
- CPUPOWER_START_OPTS="-c all frequency-set -g powersave"
- sudo touch /etc/systemd/system/cpupower.service
- [Unit]
- Description=Configure CPU power related settings
- After=syslog.target
- [Service]
- Type=oneshot
- RemainAfterExit=yes
- EnvironmentFile=/etc/default/cpupower
- ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS
- [Install]
- WantedBy=multi-user.target
- sudo systemctl daemon-reload
- sudo systemctl enable cpupower.service
Reply Like 0 View the author
系统默认安装的情况下CPU调频是高性能模式,这会造成发热巨大,论坛有各种各样的解决方法。
1、关闭intel_pstate,这种方法缺点很明显:固定在GRUB,无法随时更改配置;最重要的是intel的CPU通过intel_pstate进行调频是最优的。
2、安装tlp替换laptop mode tool,如果安装tlp需要卸载laptop mode tool,就会破坏深度的节能配置,这可能不是想要的结果。
3、cpupowergui这是很酷的工具,也十分管用,我也十分喜欢,但时间一长,审美疲劳,我更希望有系统级的标准解决方案。
下面我参考了其他发行版的做法,这才是标准的解决方案。