
























Fedora Workstation 默认使用 GNOME 桌面环境,内置电源配置文件守护进程 power-profiles-daemon 可以让用户在桌面右上角电源菜单中,手动切换「性能」、「平衡」和「节电」模式。
这实在是太愚蠢了,我们需要一款更加智能的工具,帮助运行 Linux 的笔记本电脑在 CPU 性能与功耗之间取得绝佳的平衡。
auto-cpufreq 正是这样一款专为 Linux 系统打造的 CPU 频率与功耗优化器。它通过主动监控系统的实际负载状态,判断当前是「电池供电」或「连接电源」,无感接管 CPU 的频率调节和调度策略,从而实现中低负载时极致省电、高负载下即时的自动睿频与高性能释放。
和 Linux 上另一款电源优化工具 TLP 相比,auto-cpufreq 的配置更加简单、实际体验更加出色。
注意:
auto-cpufreq与TLP存在冲突,请勿同时安装使用。
搭载 Intel Core Ultra 7 255H 处理器的设备,离电状态进行日常网页浏览、写作和听音乐等轻度任务时的功耗表现,基本维持在 10W 左右。

本文记录 Fedora 下 Intel 平台的配置过程,其他平台可参考官方文档。
避免 GNOME 自带的 power-profiles-daemon 和 tuned 服务与 auto-cpufreq 争夺 CPU 的控制权,将其先屏蔽:
sudo systemctl stop power-profiles-daemon; \
sudo systemctl mask power-profiles-daemon; \
sudo systemctl stop tuned; \
sudo systemctl mask tuned
官方文档建议我们通过 Git 拉取最新源码进行构建和安装:
# 准备依赖环境
sudo dnf update \
&& sudo dnf install -y git \
python3-pip \
python3-devel
# 拉取源码
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq
# 运行安装脚本
sudo ./auto-cpufreq-installer
在弹出的交互提示中,输入 I 并回车即可开始安装。
以下配置仅供参考,请根据自身硬件情况进行微调,切勿盲目照搬。
Intel 大小核架构依赖 intel_pstate 驱动,配置文件 /etc/auto-cpufreq.conf 示例:
# ==========================================
# 🔌 插入电源时的设置 (Charger)
# ==========================================
[charger]
# 基础调度器
governor = performance
# EPP (Energy Performance Preference): 决定 Intel 硬件调度倾向
# 设为 balance_performance 可以在保证极速响应的同时避免空载功耗过高
energy_performance_preference = balance_performance
# EPB (Energy Performance Bias): 针对 intel_pstate 的偏差微调
energy_perf_bias = balance_performance
# 平台电源配置 (Platform Profiles)
# 通知 BIOS 限制整机功耗释放并降低风扇转速
platform_profile = performance
# 睿频:自动管理
turbo = auto
# ==========================================
# 🔋 使用电池时的设置 (Battery)
# ==========================================
[battery]
# 基础调度器
governor = powersave
# EPP 核心关键:设为 balance_power
# 能够让 P 核在不需要时迅速休眠,将后台任务交给 LP-E 核,大幅提升续航
energy_performance_preference = balance_power
# EPB 偏差微调
energy_perf_bias = balance_power
# 平台电源配置 (Platform Profiles)
platform_profile = low-power
# 睿频:保持自动。
turbo = auto
# ==========================================
# 🔋 电池充电阈值保护 (Battery Thresholds)
# ==========================================
# 电池充到 80% 自动停止,延缓电池鼓包和老化
# 仅支持联想、华硕笔记本电脑
enable_thresholds = true
# 联想电池养护模式
ideapad_laptop_conservation_mode = true
# start_threshold = 75
# stop_threshold = 80
将 auto-cpufreq 注册为系统服务,使其开机自启并接管 CPU 调度:
sudo auto-cpufreq --install
默认策略在开机时关闭蓝牙以节省电量(仍可手动开启),若需开机自动启用蓝牙:
sudo auto-cpufreq --force=bluetooth_boot_on
重启系统以应用所有更改:
重启后,可以通过命令行或 GUI 界面查看 CPU 的实时调度情况:
终端中执行 auto-cpufreq --stats 查看实时数据
或直接打开 auto-cpufreq 的 GTK 图形界面查看

尝试拔插电源,观察输出状态中的 EPP 和 Platform Profile 是否遵循配置文件动态切换。
# 直接指定目录更新
sudo auto-cpufreq --update=/path/to/directory
# 或者手动 Git 拉取源码更新
# 查看当前源码路径
pwd
# 输出
/data/auto-cpufreq
# 进入源码目录
cd /data/auto-cpufreq
git pull
# 执行更新安装
sudo ./auto-cpufreq-installer
若后续不再需要该工具并打算执行完全清理:
sudo auto-cpufreq --remove
cd /data/auto-cpufreq
sudo ./auto-cpufreq-installer
# 在弹出的提示中输入 'R' (Remove)
# 删除配置文件
sudo rm /etc/auto-cpufreq.conf
# 退出当前源码目录并将其删除
sudo rm -rf /data/auto-cpufreq
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。