TLDR: Both more performance and longer battery run times are accessible with tuning. I am documenting both below via repeatable methods.
Process:
After boot up, observe power usage and battery %. Once usage stabilizes and batt drops 1%, start a timer. After 10% usage, stop timer, calculate results.
Sysconfig is:
7640u, 2x16GB, Ubuntu 22.04.3 LTS, kernel 6.5.0-1007-oem, X11, XFCE 4.16, Display at first brightness bar with scaling 0.8 (Gnome would call it 120%), connected to 5G wifi, BT off, camera & mic hw switches off, powertop polling set to 10s, keeping battery between 20-90%, UMA gaming mode enabled (4GB gpu RAM)
Completed tests (results below):
- PPD on power-saver, pstate status set to active, energy perf pref at power
- a. same test via gnome/wayland
- PPD on power-saver, pstate status passive, boost off, cpufreq scaling_govenor set to conservative, scaling_min_freq at 400 Mhz, scaling_max_freq at 2.2 Ghz
- same as 2) but with pstate status of guided
Next tests:
4) TLP same as 1)
5) TLP same as 2)
6) TLP same as 3)
7) It may also be interesting to review the above with hyperthreading disabled. Perhaps via: $ echo 'off' | sudo tee /sys/devices/system/cpu/smt/control
8) Make sure observation tools aren’t contributing undue power usage (compare draw from powerstat
to powertop
)
- Settings:
PPD = power-saver
amdpstate status = active
energy_perf_pref = power
Observed CPU freq = 400 Mhz - 1.4 Ghz.
Apps:
2 FF windows w/ 4 tabs (reading and typing this message), hw accel off
4 terminal windows (1 powertop, 1 watch -n 2 scaling_cur_freq for all threads, checking uptime/top for system load to ensure updates, trim or something else isn’t running in the background
First up 80-70% lasted 0:55 mins for an average 6.0W draw.
Calcs are:
10% battery = 5.5 Wh
55/60 = 0.91667
5.5/0.91667 = 6
As another data point for this config, after above testing, watching Big Buck Bunny at 1080p with hw decode in vlc indicates a 7.2-8.2W draw. Starts at lower draw, then ramps up to higher draw after 10-20 sec. Typically stabilizes somewhere in between.
Based on 1a. results below, I reran this test in XFCE and this time observed 1:03 runtime. Avg draw 5.24W.
With this in mind, I added ‘Process:’ above to let the system settle in after boot-up before testing begins.
Big Buck Bunny showed 7.5-8.1W.
- a. As a sanity check, I switched to Gnome/wayland with the above settings and scaling at 125%. Observed the same cpu freq 400 Mhz - 1.4Ghz. 10% drop in 0:41 or about 8.0W avg draw. Noticed usually high FF activity (80-100% in top, load avg ~=1.5). Rerunning test. The
powertop
process regularly shows up in top at 20-65%. Second run 1:02 for 10% use is 5.32W avg draw.
Big Buck Bunny at 1080p, hw decoded in vlc indicates 7.4-8.4W draw.
- Settings:
PPD = power-saver
amdpstate status = passive
energy_perf_pref = no longer available
scaling_govenor = conservative
scaling_max_freq = 2.2 Ghz
boost = off
Apps: same
Observed CPU freq = 400 Mhz - 2.18 Ghz
Second 70-60% lasted 0:58 hrs at an avg draw of 5.69W
As another data point for this config, watching Big Buck Bunny at 1080p with hw decode in vlc indicates a 7.62-8.69W draw.
- Settings:
PPD = power-saver
amdpstate status = guided
energy_perf_pref = no longer available
scaling_govenor = conservative
scaling_max_freq = not followed (listed in/sys/devices/system/cpu/cpufreq/policy*/amd_pstate_*
however read-only; the docs indicate these are managed “autonomously”)
boost = off
Apps: same
Observed CPU freq = 400 Mhz - 4.42 Ghz (interesting since boost is off)
10% usage took 0:50 for 6.6W avg draw.
Big Buck Bunny at 1080p with hw decode in vlc indicates a 8.6-9.6W draw.
I’ll edit this post once I’ve documented options 4-6.
Tangential testing based on powertop
most thirsty list:
o 2 - 4W for Networking. Disabling wifi had 1/2-1W impact. Good for offline use.
o 800mW - 1.3W is typical for Display backlight at first brightness bar (10%?)
o 900mW - 1.1W USB device: HDMI Expansion. Set to ‘Good’ via Tunable entry and dropped off the map. At most had half the impact as reported.
General observations so far:
a) Two biggest power draws in powertop
are Display and Network.
b) Two most active processes in top
are FF and powertop
c) iwconfig
shows power management is enabled for the wifi driver/card
d) hw video decoding as observed above matches the gpu baseline of 1 Ghz (MCLK) & 800 Mhz (SCLK). GPU load shows 10%. 0-1% load otherwise.
e) The fan stays complete off during the above testing. Temps show between 30-40C (20-22C ambient).
g) As powertop
, powerstat
and similar tools require running on battery, it may be helpful to see consumption when plugged in. At present, this appears to be reported along with the gpu clocks via:
sudo head -12 /sys/kernel/debug/dri/0/amdgpu_pm_info
in other words, this seems to give an approximation of the above tools while on battery even when on mains. Full CPU load can draw as much as 34W!
h) The question between higher or lower max cpu clocks comes down to power efficiency, ie: is it better to complete tasks quicker at higher clocks or slower at lower clocks?
g) Tests 1-3 show enough of a span to warrant continued effort. 13 min delta over 10% equates to over two hours differential on a full charge!
I shared some other observations yesterday via another thread:
This thread seems like a better home for hashing out power usage tuning.