It looks like edits are only allowed for a few days, so pardon the new post.
Config & methodology as outlined above.
Test 4. synopsis above.
- 10% use took 0:57 for avg draw of 5.79W
Settings were:
TLP
amdpstate status = passive
energy_perf_pref = no longer available
scaling_govenor = conservative
scaling_max_freq = 2.2 Ghz
boost = off
tlp.conf min adjustments per above and with the following changes:
CPU_SCALING_GOVERNOR_ON_BAT=conservative
CPU_BOOST_ON_BAT=0
-
10% use took 0:51 for avg draw of 6.47W
TLP same conf with amdpstate status = guided
-
after setting smt to off, no appreciable gains were observed. In fact, this could be deleterious as cpu load is spread over a smaller pool.
-
Reran some tests without powertop
and didn’t observe differences in run times.
Conclusions
- Running a newer kernel (such as 6.5.0-1007-oem from Ubuntu’s repos) includes AMD pstate. It is quite remarkable to see how each option manages power/performance. I found ‘active’ to provide the best of both. This can likely be activated on older kernels by updating their grub defaults.
- It’s worth enabling autosuspend for expansion cards. This seems to be functional via TLP, updated systemd rules or can be switched via /sys/bus/usb
- I’ll be running my FW13 via option 4 (TLP, amdpstate = active, energy perf pref = power or balance_power, scaling gov = powersave) to collect more data and fine tune further
To Do
- Please test via the same methods and share your findings
- Continue to share my own findings
- Post
tlp.conf
diff with any add’l efficiencies
- Switch back to PPD from time to time to re-evaluate
- Test
tuned
as it develops
- Look at how to undervolt the Ryzen 7040 series and evaluate viability & efficiency gains
In case the commands used during testing may be helpful to some folks:
a) current cpu power management config
cpupower frequency-info
: as well as other options, see manpage. When amd pstate is active, this will include output of:
driver: amd-pstate-epp
b) check current amd_pstate status (if not found, amd pstate may not be active):
cat /sys/devices/system/cpu/amd_pstate/status
c) see which scaling governor is in use:
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
Note: changing policy0
to policy*
will show all cpus/threads. For instance, to specify an alternate governor:
echo 'ondemand' | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
d) see current energy performance preference setting:
cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference
e) see available energy performance options:
cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences
f) review min/max cpu settings:
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_m*
g) review cpu frequency for all cores/threads:
watch -n 2 'cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq'
h) a couple options to see power draw on battery (as you’ll likely see, they don’t always agree):
sudo powertop -t 10
The first run takes awhile to build up enough data points to show results. Gives an idea of what hardware & processes are using energy. Can also tab through to other views/options. Flag is to update every 10 secs (instead of the default of 20)
or
sudo powerstat -R -c -z 10 1800
Gives W metrics while charging, flags are to start right away and give results every 10 seconds and take 1800 samples (ie: 5 hrs)
or
watch -n 10 'upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -e ener -e updat -e perc'
On battery shows the discharge rate updated about every 2 mins, while charging “energy rate” may be the recharge rate?
or via the amdgpu driver stats:
sudo watch -n 10 'head -12 /sys/kernel/debug/dri/0/amdgpu_pm_info'