[TRACKING] PPD v TLP for AMD Ryzen 7040

My thinking is as we as a community collect more data to create a sticky or how to detailing options, including:

  • easiest path to good enough results
  • optimal perf on ac / longevity on batt

This could be something like PPD + powertop --auto-tune or TLP with the settings detailed like they are currently for the intel version.

1 Like

The beauty of modern linux distros is you can hit the terminal as little or as much as you desire. (macOS is similar)

The commands I shared are to check what’s happening behind the scenes but they are unnecessary, even to run your own tests!

This is where it is helpful to read the manual (page), such as:
man uname

I encourage trying live versions of the distros you’re interested in and especially trying different window managers (Gnome, Cinnamon, KDE, XFCE, etc).

You can also install to a performant usb drive to see what it’s like to live with for awhile.

I’ve found this series of drives to be great for such a purpose or for rapid backups.

1 Like

Yeah, I have some similar 128GB ones, I think one is empty at the moment, so will give it a go.

@linuxlion, thanks for the summary above, it was very helpful for me. Especially the systemd patch.

I have one remaining power-hog though. Has anyone else noticed the camera, despite being unused draws 1W+? Any thoughts on a fix?

From powertop:

Blockquote
1.11 W 100.0% Device USB device: Laptop Camera

Sometimes I can reboot and get this to go away, I suspect some app might be triggering it, though closing apps doesn’t fix it once it starts.

UPDATE:
Just after I posted this, I found a work around; If you physically toggle the camera switch to off, power usage goes to zero. I think this is a fine work around, but I’m still curious why it’s not suspending like other devices, when not in use.

I logged in to make that suggestion :wink:

You can look for the camera device via: lsusb

For instance, on mine it shows as:

ID 0bda:5634 Realtek Semiconductor Corp. Laptop Camera

or in the /sys/bus/usb/devices folder and make sure it is flagged to autosuspend.

Knowing the Product ID from above, I found the camera via:
grep 5634 /sys/bus/usb/devices/?-?/id*
or without knowing the id, this also works:
grep -i camera /sys/bus/usb/devices/?-?/product

This indicated mine is in:
/sys/bus/usb/devices/3-1/

So then check auto suspend status (should return ‘auto’):
cat /sys/bus/usb/devices/3-1/power/control

I still take powertop usage details with a grain of salt as they are more of an approximation in my exp.

Enjoy!

1 Like

Additional Observations
I’ve been running both via TLP and PPD this week and have noted the following.

  • TLP doesn’t always apply settings from its config. For instance, usb autosuspend seems to be hit or miss. After checking systemctl status tlp and dmesg for clues, the cause is still inconclusive. There is an updated kernel (6.5.0-1008-oem), so I’ll test that.
  • PPD was the power management approach du jour. The first 10% use took 69 mins at 4.78W avg draw. 20% use took 126 mins for avg draw 5.24W. Started playing music at 68% which brought the avg draw up to 5.78W over 17% usage. Settings were PPD: power-saver + amdstate: active, EPP: power + usb autosuspend
  • based on a few times listening to music, I’ll be replacing pulseaudio with pipewire to eval efficiency (already in use on Fedora 39 & Ubuntu 22.10)
  • I started this testing with a simple question in mind: Can my FW13 last a day without mains? Yes it can.
1 Like

Thank you for keeping an eye on this. Is FW willing to share its behind the scenes BIOS settings for power management?

This may help inform how to tweak and test things, such as via AMD’s guided pstate.

My primary goal: create a straightforward how-to.

My ultimate goal: longer battery run times on Linux than Win11.

Much appreciated!

3 Likes

Hello everyone,
I’m not sure if this is the right place to share this, but I ran into the following issue this morning after unlocking my computer:

[173930.599003] amd_iommu_report_page_fault: 99238 callbacks suppressed
[173930.599009] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9240000 flags=0x0000]
[173930.599023] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9241000 flags=0x0000]
[173930.599033] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9242000 flags=0x0000]
[173930.599042] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9243000 flags=0x0000]
[173930.599051] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9244000 flags=0x0000]
[173930.599059] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9245000 flags=0x0000]
[173930.599068] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9246000 flags=0x0000]
[173930.599077] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9247000 flags=0x0000]
[173930.599086] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9248000 flags=0x0000]
[173930.599094] amdgpu 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0005 address=0xfffe9254000 flags=0x0000]

I’m not 100% sure this is related to TLP but I think so.

I’m currently using TLP with the following configuration : https://github.com/negrel/dotfiles/blob/master/hosts/frameworkstation/cfg/laptop.nix#L15

NOTE: I’m not seeking for support, just sharing my experience with TLP

1 Like

@negrel Known issue; turn Uma game optimised on in your bios.

This seems to have resolved for me entirely with newer kernels. But depending on how old

your distro/kernel is you may also need to add

STILL Broken in Current 6.7rc series - so you’ll definitely need this too

amdgpu.sg_display=0

To your kernel command line

To disable scatter gather support

1 Like

@jwp I’m trying with uma game optimised. thanks!

1 Like

Hey guys, I’ve been running TLP 1.6.1 on F39 KDE for the past day and saw my idle power drop to 3W (from 7W), with 5W with 5 firefox tabs (9W with stock PPD) and 9W while watching 1080p 60 video on youtube (14-16W PPD). N=1 and 24 hours only so YMMV.

1 Like

Sub 4W idle is achievable without TLP with recent kernels and udev rules alone.

3 Likes

Do you think that’s the superior option? I haven’t done any tuning with TLP so it could get better again

1 Like

Yes - due to integrations with DE and Distro tooling.

1 Like

Is there a list somewhere?

I’m running kernel 6.6.3 with PPD on Tumbleweed, battery’s still crap :pensive:

1 Like

Hi everyone! I’m experiencing really poor power consumption on my Framework 13 with a 7840U. I normally idle about 10W. If I get everything optimal (idle, lowest brightness possible, no wifi/bt, no expansion cards), it goes down to about 6.5W which is worse than most people here report (<4W). I am running Debian Testing (Kernel 6.5, amd_pstate=active, powersave governor) with TLP on KDE. Do you have any suggestions?

One hint is that amdgpu_pm_info reports 5-6W GPU consumption all the time… Is that GPU power or total SoC package power? It seems like a lot.

1 Like

It’s supposed to be package power.

But yeah 5-6w package power doing nothing seems like quite a lot.

Do you have any video decoding going on?

Currently there seems to be an issue with the hw decoder using way too much power to do its job.

1 Like

I also have this if I’m reading amdgpu_top right, as it shows GPU Power at 5-6W at idle (my total idle from battop is 7-8W). I’m running Endeavouros (arch) with no real modifications.

1 Like

I was getting around 6w “idle” until I switched to a hardware-accelerated terminal program. So my idle state wasn’t very idle; I had been using BlackBox and it was hitting my CPU pretty hard just to draw numbers on the screen. Kitty is way better in my experience.

If you watch “cpupower monitor” for a bit, what freq/c-states are you seeing?

Are you using generic kernel or OEM? I have better results with OEM.

Hi @harryjph, this does seem high. I’ve found NoteBookCheck’s results repeatable for other laptops and would expect for you to see a similar 4-6.8W idle.

Are you disabling wifi or simply not connected? Is autosuspend enabled for usb devices?

Have you looked at powertop or a similar tool to evaluate what may be consuming power?

What does top show in terms of processes keeping your cpu active?

Which kernel are you running?

While observing idle power consumption is helpful to ensure parasitic drain has been resolved, it doesn’t provide much insight into usable run times.

If that is of interest to you, I encourage applying the testing methodology I defined above. Sharing your results here may also help others in the community test & tune their systems.

My observation is this often reads within 0.5W as powerstat or powertop during light use and about 3-5W lower at max use, so I’m thinking it approximates total pkg power. This is based on running a benchmark showing 30-42W. GPU load was 0-1%.

Hope this helps!

1 Like