Automatic CPU speed & power optimizer for Linux based on active monitoring of laptop's battery state, CPU usage, CPU temperature and system load. Ultimately allowing you to improve battery life without making any compromises.
For tl;dr folks there's a: Youtube: auto-cpufreq - tool demo
One of the problems with Linux today on laptops is that CPU will run in unoptimized manner which will negatively reflect on battery life. For example, CPU will run using "performance" governor with turbo boost enabled regardless if it's plugged in to power or not.
Issue can be mitigated by using tools like indicator-cpufreq or cpufreq, but these still require manual action from your side which can be daunting and cumbersome.
Using tools like TLP will help in this situation with extending battery life (which is something I did for numerous years now), but it also might come with its own set of problems, like losing turbo boost.
With that said, I needed a simple tool which would automatically make "cpufreq" related changes, save battery like TLP, but let Linux kernel do most of the heavy lifting. That's how auto-cpufreq was born.
Please note: auto-cpufreq aims to replace TLP and after you install auto-cpufreq it's recommended to remove TLP. However, if for some reason you still need/want TLP installed and running auto-cpufreq doesn't conflict and works great in tandem with TLP.
Supported devices must have an Intel, AMD or ARM CPU's. This tool was developed to improve performance and battery life on laptops, but running it on desktop/servers (to lower power consumption) should also be possible.
auto-cpufreq is available on snap store, or can be installed using CLI:
sudo snap install auto-cpufreq
Please note:
Make sure snapd is installed and snap version
version is >= 2.44 for auto-cpufreq
to fully work due to recent snapd changes.
Fedora users will encounter following error. Due to cgroups v2
being in development. This problem can be resolved by either running sudo snap run auto-cpufreq
after snap installation. Or using auto-cpufreq-installer which doesn't have this issue.
Get source code, run installer and follow on screen instructions:
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq && sudo ./auto-cpufreq-installer
In case you encounter any problems with auto-cpufreq-installer
, please submit a bug report.
AUR package is available for install. After which auto-cpufreq
will be available as a binary and you can refer to auto-cpufreq modes and options.
Please note: If you want to install auto-cpufreq daemon, do not run auto-cpufreq --install
otherwise you'll run into an issue: #91, #96.
Instead run systemctl start auto-cpufreq
to start the service. Run systemctl status auto-cpufreq
to see the status of service, and systemctl enable auto-cpufreq
for service to persist running accross reboots.
You can configure profiles for battery and power supply. These profiles will let you pick which governor to use and how and when turbo boost is enabled. The possible values for turbo boost behavior are always, auto and never. The default behavior is auto, which only kicks in during high load.
# settings for when connected to a power source
[charger]
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor.
governor = performance
# turbo boost setting. possible values: always, auto, never
turbo = auto
# settings for when using battery power
[battery]
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor
governor = powersave
# turbo boost setting. possible values: always, auto, never
turbo = auto
auto-cpufreq can be run by simply running the auto-cpufreq
and following on screen instructions, i.e:
sudo auto-cpufreq
sudo auto-cpufreq --monitor
No changes are made to the system, and is solely made for demonstration purposes what auto-cpufreq could do differently for your system.
sudo auto-cpufreq --live
Necessary changes are temporarily made to the system which are lost with system reboot. This mode is made to evaluate what the system would behave with auto-cpufreq permanently running on the system.
Necessary changes are made to the system for auto-cpufreq CPU optimizaton to persist across reboots. Daemon is deployed and then started as a systemd service. Changes are made automatically and live stats are generated for monitoring purposes.
sudo auto-cpufreq --install
After daemon is installed, auto-cpufreq
is available as a binary and is running in the background. Its stats can be viewed by running: auto-cpufreq --stats
Since daemon is running as a systemd service, its status can be seen by running:
systemctl status auto-cpufreq
If install has been performed as part of snap package, daemon status can be verified by running:
systemctl status snap.auto-cpufreq.service.service
auto-cpufreq daemon and its systemd service, along with all its persistent changes can be removed by running:
sudo auto-cpufreq --remove
If daemon has been installed, live stats of CPU/system load monitoring and optimization can be seen by running:
auto-cpufreq --stats
Q: If after installing auto-cpufreq you're (still) experiencing:
A: If you're using intel_pstate
CPU management driver consider changing it to: acpi-cpufreq
.
This can be done by editting /etc/default/grub
file and appending intel_pstate=disable
to GRUB_CMDLINE_LINUX_DEFAULT
line, followed by sudo update-grub
Example line change:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable"
Since I'm working on this project in free time, please consider supporting this project by making a donation of any amount!
bc1qlncmgdjyqy8pe4gad4k2s6xtyr8f2r3ehrnl87
一、 /sys/devices/system/cpu/cpu0 目录结构 /sys/devices/system/cpu/cpu0 Z91:/sys/devices/system/cpu/cpu0 # ls -al ls -al total 0 drwxr-xr-x 5 root root 0 2018-01-09 11:17 . drwxr-xr-x 13 root root 0
cpufreq动态频率调节浅析 cpufreq核心部分的代码都在:/drivers/cpufreq/cpufreq.c中,本文章是基于SOFIA3GR 6.0的代码进行解析,linux内核版本3.14.0。具体cpufreq核心(core)架构与API可参考:http://blog.csdn.net/droidphone/article/details/9385745 这里主要针对cpufreq的
cpu绑核 pro3399-cpu: 0-3:little(A53) 4-5:big(A72) adb shell su cat /sys/devices/system/cpu/online echo 0 >/sys/devices/system/cpu/cpu4/online cat /proc/cpuinfo 安卓进程绑定: 安卓进程/线程绑定cpu_android绑定cpu,
目录 摘要: 测试环境: 操作系统: cpu: gcc版本: gcc编译器优化级别设置: 测试代码: 测试思路: 一. 生成测试数据文件的代码: 二. 对数据文件进行字符匹配查找: 2.1 仅仅对比SIMD 2.2 对比AVX makefile: 测试结果: 一. 对比SIMD 二. 对比AVX 摘要: 进行SIMD/AVX的cpu并行化指令集性能测试, 为后续优化提供数据依据 Intel® In
public static int getMaxCpuFreq() { String kCpuInfoMaxFreqFilePath = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"; int result = 1600000; FileReader fr = null; BufferedReader br = null; try
1 背景 最近想将petalinux flash启动的系统直接拷贝修改成sd启动,发现内核启动时候被卡死了,petalinux-config中 flash的 启动的3个选项修改为了SD卡启动,但是还是不好使。 https://blog.csdn.net/xiongjia516/article/details/120295713 2 SD卡启动platform-auto.h和platform-top
顾名思义,自动缩放允许您根据用户设置的指令自动扩展或缩小Amazon EC2实例。 最小和最大实例数等参数由用户设置。 使用此功能,您正在使用的Amazon EC2实例的数量会随着需求的增加而自动增加以保持性能,并随着需求的减少而自动降低以最小化成本。 Auto Scaling对于每小时,每天或每周使用波动的应用程序尤其有效。 Amazon CloudWatch启用Auto Scaling,无需额
这是默认布局,它根据元素的数量决定元素的布局。 语法 (Syntax) 以下是使用自动布局的简单语法。 layout: 'auto' 例子 (Example) 以下是一个显示Auto布局用法的简单示例。 <!DOCTYPE html> <html> <head> <link href = "https://cdnjs.cloudflare.com/ajax/libs/extj
Auto 是 Google 开发的一组 Java 代码生成器。 Java 有许多机械、重复、未经测试的代码,而且有时会出现一些微妙的 Bug 。Auto 项目是自动执行这些类型的任务的代码生成器的集合,他们可以无 Bug 创建你要编写的代码。 目前包括以下子项目 AutoFactory - JSR-330-compatible factories。 AutoService - Provider-c
Auto fill in all directions Auto fill in vertical direction only with creating new rows Auto fill in all directions Notice the little square (fill handle) in the corner of the selected cell. You can d
Make globe rotate automatically, control globe's rotation speed. The auto-rotation feature is disabled as default, and the default rotation speed is 1. // enable auto-rotation, 1 is the default speed.
05 用 auto 替代显式类型声明 auto 声明的变量必须初始化,因此使用 auto 可以避免忘记初始化的问题 int a; // 潜在的未初始化风险 auto b; // 错误:必须初始化 对于名称非常长的类型,如迭代器相关的类型,用 auto 声明可以大大简化工作 template<typename It> void f(It b, It e) { while (b != e)
auto-sklearn是一个自动化的机器学习工具包,是scikit-learn估算器的直接替代品: >>> import autosklearn.classification>>> cls = autosklearn.classification.AutoSklearnClassifier()>>> cls.fit(X_train, y_train)>>> predictions = cls.p
mica-auto spring boot stater 开发利器 mica-auto 是 Spring cloud 微服务框架 Mica 中的一个基础组件,用来生成 Spring boot 的一些基础配置。 功能 生成 spring.factories 生成 spring-devtools.properties 生成 FeignClient 到 spring.factories 中,供 mica