缘由
有的笔记本电脑 OEM
会强行设置功率墙(CPU 或 GPU TDP),导致处理器不能满功率运行,从而不能达到原有设计的巅峰性能。本教程旨在使装有 AMD 的笔记本解锁其功率墙,以提高其峰值性能。
免责说明
错误的操作可能损坏你的硬件( TDP、电压、时钟等设置错误),请核对电源功率是否匹配,任何直接或间接导致的问题,本人对此不负任何责任。
步骤
本教程环境为 Archlinux
,在其他环境中的操作近似。
安装 RyzenAdj
RyzenAdj 工具可以修改 Ryzen 移动系列 CPU 的电源状态,使用以下命令安装。
yay -S ryzenadj-git.git
Code language: CSS (css)
查看当前 CPU/APU 的最高 TDP
你可以在 AMD 官网中查到,或使用第三方网站查询。
以 Ryzen 5 4500U
为例,查询结果为 25 瓦特
。refer
构造命令行参数
由于 RyzenAdj 是一个命令行工具,我们需要手动指定参数。
以当前 CPU 的 TDP 为 25 瓦特为例,设定为其最大TDP的参数如下。
--stapm-limit 25000 --fast-limit 25000 --slow-limit 25000
注意,这些参数的单位为 mW
。
应用参数设置
在终端中运行 RyzenAdj
,应用上述参数。
sudo ryzenadj --stapm-limit 25000 --fast-limit 25000 --slow-limit 25000
若一切正常,你将得到以下输出。
Sucessfully set stapm_limit to 25000
Sucessfully set fast_limit to 25000
Sucessfully set slow_limit to 25000
Code language: JavaScript (javascript)
验证是否生效
sudo ryzenadj -i
输出结果
CPU Family: Renoir
SMU BIOS Interface Version: 18
Version: v0.15.0
PM Table Version: 370005
| Name | Value | Parameter |
|---------------------|-----------|--------------------|
| STAPM LIMIT | 25.000 | stapm-limit |
| STAPM VALUE | 7.782 | |
| PPT LIMIT FAST | 25.000 | fast-limit |
| PPT VALUE FAST | 11.946 | |
| PPT LIMIT SLOW | 25.000 | slow-limit |
| PPT VALUE SLOW | 7.978 | |
| StapmTimeConst | 1.000 | stapm-time |
| SlowPPTTimeConst | 128.000 | slow-time |
| PPT LIMIT APU | 37.500 | apu-slow-limit |
| PPT VALUE APU | 0.000 | |
| TDC LIMIT VDD | 180.000 | vrm-current |
| TDC VALUE VDD | 4.096 | |
| TDC LIMIT SOC | 180.000 | vrmsoc-current |
| TDC VALUE SOC | 1.020 | |
| EDC LIMIT VDD | 180.000 | vrmmax-current |
| EDC VALUE VDD | 43.775 | |
| EDC LIMIT SOC | 180.000 | vrmsocmax-current |
| EDC VALUE SOC | 0.000 | |
| THM LIMIT CORE | 95.000 | tctl-temp |
| THM VALUE CORE | 47.787 | |
| STT LIMIT APU | 95.000 | apu-skin-temp |
| STT VALUE APU | 37.333 | |
| STT LIMIT dGPU | 0.000 | dgpu-skin-temp |
| STT VALUE dGPU | 0.000 | |
| CCLK Boost SETPOINT | 50.000 | power-saving / |
| CCLK BUSY VALUE | 100.000 | max-performance |
可选:修改 CPU Governor
安装 cpupower
sudo pacman -S cpupower
修改 CPU Governor 为 performance
➜ ~ sudo cpupower frequency-set -g performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Following CPUs are offline:
6-15
cpupower set operation was not performed on them
Code language: JavaScript (javascript)
查看当前 CPU Governor
➜ ~ cpupower frequency-info
analyzing CPU 4:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 4
CPUs which need to have their frequency coordinated by software: 4
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1.40 GHz - 2.38 GHz
available frequency steps: 2.38 GHz, 1.70 GHz, 1.40 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 1.40 GHz and 1.40 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.77 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: no
Code language: CSS (css)
大功告成
当你的设置与验证匹配时,代表 TDP 设定已经成功了。
有的硬件可能会对 TDP 设置进行保护,其特征为在一定时间后将 TDP 重置为 OEM 定义值,你可以循环应用 TDP 来避免这个问题。
RyzenAdj 还有其他可配置参数,敬请自行探索。
了解 Starx's Home 的更多信息
订阅后即可通过电子邮件收到最新文章。