[WIP] Unraid AMD Ryzen Power Saving
I use AMD Ryzen 9 5950X for my home NAS and want to save some power as my demand for CPU is mostly idle with big peaks.
ls -alh /lib/modules/$(uname -r)/kernel/drivers/cpufreq/
root@nas:~# ls -alh /lib/modules/$(uname -r)/kernel/drivers/cpufreq/
total 21K
drwxr-xr-x 2 root root 125 Aug 31 19:57 ./
drwxr-xr-x 1 root root 60 Sep 21 18:10 ../
-rw-r--r-- 1 root root 6.6K Aug 31 19:57 acpi-cpufreq.ko.xz
-rw-r--r-- 1 root root 2.1K Aug 31 19:57 amd_freq_sensitivity.ko.xz
-rw-r--r-- 1 root root 3.7K Aug 31 19:57 pcc-cpufreq.ko.xz
-rw-r--r-- 1 root root 6.7K Aug 31 19:57 powernow-k8.ko.xz
modinfo amd_pstate
root@nas:~# modinfo amd_pstate
name: amd_pstate
filename: (builtin)
license: GPL
file: drivers/cpufreq/amd_pstate
description: AMD Processor P-state Frequency Driver
author: Huang Rui <[email protected]>
watch -n 0.1 cat /sys/devices/system/cpu/cpu{0..$(nproc --ignore=1)}/cpufreq/cpuinfo_cur_freq
Every 0.1s: cat /sys/devices/system/cpu/cpu{0..31}/cpufreq/cpuinfo_cur_freq
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
4000000
https://forums.unraid.net/topic/134103-solved-modprobe-blacklisting-and-amd-p-state/
https://www.digitaltrends.com/computing/what-is-amd-smart-access-memory/
https://old.reddit.com/r/linux_gaming/comments/mp2eqv/if_you_dont_like_schedutil_and_what_its_doing/ https://old.reddit.com/r/Amd/comments/pbbqd0/cppc_enabled_vs_disabled/
URL: /Settings/Settings/Tools/Syslinux
modprobe.blacklist=acpi_cpufreq amd_pstate.shared_mem=1
nano /boot/config/go
Before
#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
mkdir /root/.ssh
chmod 700 /root/.ssh
cp /boot/config/ssh/authorized_keys /root/.ssh/
chmod 600 /root/.ssh/authorized_keys
After
#!/bin/bash
modprobe amd_pstate
# Start the Management Utility
/usr/local/sbin/emhttp &
mkdir /root/.ssh
chmod 700 /root/.ssh
cp /boot/config/ssh/authorized_keys /root/.ssh/
chmod 600 /root/.ssh/authorized_keys
“Unraid OS” - green
kernel /bzimage
append initrd=/bzroot modprobe.blacklist=acpi_cpufreq
It’s also possible from CLI
nano /boot/syslinux/syslinux.cfg
default menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label Unraid OS
menu default
kernel /bzimage
append initrd=/bzroot modprobe.blacklist=acpi_cpufreq
label Unraid OS GUI Mode
kernel /bzimage
append initrd=/bzroot,/bzroot-gui
label Unraid OS Safe Mode (no plugins, no GUI)
kernel /bzimage
append initrd=/bzroot unraidsafemode
label Unraid OS GUI Safe Mode (no plugins)
kernel /bzimage
append initrd=/bzroot,/bzroot-gui unraidsafemode
label Memtest86+
kernel /memtest
nano /boot/config/modprobe.d/acpifreqdisable.conf blacklist acpi_cpufreq
nano /boot/config/modprobe.d/enableamdpstate.conf options amd_pstate shared_mem=1
only this works to not load default modprobe.blacklist=acpi_cpufreq append initrd=/bzroot modprobe.blacklist=acpi_cpufreq