[RESPONDED] AMD 7040 Sleep States

Hey guys, I’ve been sticking with tlp and tuning it as I’ve gone, and since the bios update was released, I’ve been able to achieve a stable, low-draw config on battery.

If you want to run with this, be warned that I am running a minimal linux build that is not officially supported by framework. I’m running Xorg and i3wm, so your mileage will likely vary with a full-fat desktop environment, depending on the graphical processing draw. I’m also open to suggestions as to how to achieve more power savings.

I’ve gotten the s2idle sleep config working nicely here (well under 1% of draw per hour), but I have also configured hibernation (not via tlp) as well for longer periods of downtime.

2 Likes

Reminder for all reading this:

With this in mind, if you have hard data showing that TLP is outperforming PPD in Ubuntu LTS or Fedora, please feel free to share here as I’d be happy to share with AMD.

2 Likes

Hi All, as many others, I’ve been ecstatic to receive & setup my Ryzen Framework 13!

Currently running: Ubuntu 22.04.3 LTS

I’ve been interested in understanding the difference between acpi-cpufreq and amd-pstate specifically to optimize performance on AC and longevity on battery.

For the purpose of testing after reading more about the power-profiles-daemon, I disabled it and enabled TLP. Of note, after updating /etc/tlp.conf directly or via tlpui, it must be reloaded: $ sudo systemctl reload tlp

With this in mind, I started by comparing kernels. The current default kernel on the above OS is 6.2.0-36 which along with the suggested 6.1.0-1025-oem operate power management via acpi-cpufreq. This is hamstrung as it only offers 3 cpu freqs: 1.6, 2.2, 3.5 Ghz. One advantage it has is it will follow the min & max freq settings either provided via tlp or directly via /sys/devices/system/cpu/cpufreq/policy*/scaling_min_freq | scaling_max_freq (amd-pstate does not follow these from what I’ve seen).

Meanwhile, kernel 6.5.0-1007-oem enables amd-pstate by default. Details on either can be seen via: $ cpupower frequency-info (this required I install the linux-tools-common and respective kernel linux-tools pkgs, I also installed btop while I was at it).

Of note: amd-pstate opens up the the entire freq range, which shows on my system as 400Mhz - 4.8Ghz.

Another key feature, is this allows real-time switching between pstate methods. By default:
$ cat /sys/devices/system/cpu/amd_pstate/status
$ active

When set to active, there is an option to specify energy pref either via TLP or directly:
$ echo 'power' | sudo tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference

For more control, this can be changed to passive or guided. My testing thus far has been with the latter:
$ echo 'guided' | sudo tee /sys/devices/system/cpu/amd_pstate/status

This in turn, gives access to disabling AMD’s turbo core (this is accessible via TLP after the above status has been set):
$ echo 0 | sudo tee /sys/devices/system/cpu/cpufreq/boost

This reduces the max freq from 4.8Ghz to 3.5Ghz. From what I’ve seen, this means max draw goes from 28W to 18W.

Shout out to @topocount for the sample tlp.conf as I reviewed that as part of this testing.

Some metrics from this post:
a) started at 25% batt with an est 1 hr 40 mins @ 7.71W draw (per powertop, quickly settled down)
b) 1 hr later, at 15% batt with est 1 hr 15 mins @ 5.82W draw

Note: apps open include 2 firefox windows with 10 total tabs, 5 terminals (1 running powertop, another $ watch -n 2 /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

This indicates AMD power optimization still has some fine tuning to do. I’ll report back as I collect more observations.

Reading of interest:
AMD Pstate Kernel Doc
TLP Processor & other settings

10 Likes

I’ve been testing for sometime now and compiled my results here.

This led to publishing a power management guide as well.

Happy computing!

2 Likes