[TRACKING] PPD v TLP for AMD Ryzen 7040

Great work on this!

For those not interested in reviewing the code, the updates (and available pkgs) tie power-profiles and amdpstate back together.

For instance, calling:
powerprofilesctl set power-saver
also sets the amdpstate performance preference to: power

Likewise with setting performance or balanced.

I wrote a bash script to do this for me but am grateful it’s fixed.

Thanks @Mario_Limonciello!

2 Likes

I have upgraded to Ubuntu 22.04d OEM 6.5 kernel. Also installed @Mario_Limonciello PPD PPA.

The upgrade broke the OEM c kernel notification & grub edit script which insisted on sticking with OEM 6.1 rather than 6.5 kernels, but I got through that.

With just these two changes, plus powertop --autotune my power consumption has dropped quite a bit, now baseline in the 4-5 W range. Web surfing has not exceeded 7W so far.

After several hours of use, powertop reports 94% in C3 overall.

Nice work.

6 Likes

I also tried this approach, and it works fine. I had to stop Dropbox and Mattermost to get down to 5W, but 5W with gnome-power-statistics as only running app with WiFi ON and Bluetooth off on brightness level 2 (if 1 is the lowest) works.

Governor “Balanced” works best, full performance if needed and low power consumption otherwise. No need to switch the governor that you use when on power or on battery. :grinning:

I was running sudo powertop --calibrate once (takes a few minutes, don’t touch your laptop while it is running). And I added this service:

sudo nano /etc/systemd/system/powertop.service

with the content:

[Unit]
Description=Powertop tunings

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/powertop --auto-tune

[Install]
WantedBy=multi-user.target

and then enabled and started the service with

sudo systemctl enable powertop.service
sudo systemctl start powertop.service

as explained here: Powertop - ArchWiki

Watch out, the path to the powertop executable on Ubuntu Linux is different from ArchLinux.

4 Likes

Also positive feedback from here, @Mario_Limonciello. Installing your linked ppd package on Fedora 39 brings down my power consumption from ~9W on idle (medium screen brightness, wifi on, nothing running) to consistently ~4.3W on power-save and around 5.3W on balanced or performance modes.

Let’s hope this gets merged upstream soon! :slight_smile:

3 Likes

Very much hoping this gets merged soon. On Solus and not yet knowledgeable enough to package this up myself.

I stand corrected, even below that - I was just a little impatient :smiley:

2 Likes

Could you share how to install Mario’s version of PDD please ? I’m still not used to Fedora yet…
Thanks

Sure @Aurelien_D it’s quite easy:

1 Like

To make it a bit easier for Fedora I’ve published it to a COPR as well:
https://copr.fedorainfracloud.org/coprs/mariolimonciello/power-profiles-daemon/

To install from here:

sudo dnf copr enable mariolimonciello/power-profiles-daemon
sudo dnf update
12 Likes

What branch or commit did you build from specifically? I want to make a PKGBUILD for this for arch (haven’t ever submitted anything to the AUR before, but I imagine there are enough arch/amd framework 13 users to make this worth it)

4 Likes

It’s 0.13 with merge request 127, 128, and 129 added as patches.

Here’s the git for it.

I hope that someone will review them upstream so you can just do regular git snapshots from upstream.

3 Likes

@herodot @Mario_Limonciello Thank you Guys !

I stumbled across

yesterday and I am using it at the moment to switch epp preferences in sync with platform profiles

Hope you don’t mind, but I was in need of this very package and decided to create it myself: power-profiles-daemon-patched-amd-git.

13 Likes

Thank you so much for this! I’m also an arch user but didn’t know how I would do this myself.

Thanks for this, you and everyone above. I’ve been trying to follow this discussion as best as I can.

While TLP seems to show more promise than initially thought, the current recommendation seems to be to use PPD. Now that recommendation has evolved into using Mario’s AMD patches for PPD as well. Am I following this correctly? Also, is powertop --auto-tune also suggested on top of PPD?

I need to perform more stringent monitoring, but powertop puts my idle baseline power around 6.5W with 50% brightness on the FW13 7640u running Arch 6.6.8.

I made a note of my interpretation for Arch users in the Arch Wiki Framework stub. Please feel free to edit/correct.

1 Like

And, here is a way to bring Mario’s patches to NixOS, adding this to configuration.nix:

  nixpkgs.overlays = [ (final: prev: {
      power-profiles-daemon = prev.power-profiles-daemon.overrideAttrs(
        old: {
          version = "0.13-1";

          patches = (old.patches or []) ++ [
             (prev.fetchpatch {
                url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/127.patch"; 
                sha256= "sha256-jnq5yJvWQHOlZ78SE/4/HqiQfF25YHQH/T4wwDVRHR0=";
             })
             (prev.fetchpatch {
                url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/128.patch"; 
                sha256 = "sha256-YD9wn9IQlCp02r4lmwRnx9Eur2VVP1JfC/Bm8hlzF3Q=";
             })
             (prev.fetchpatch {
                url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/129.patch"; 
                sha256 = "sha256-9T+I3BAUW3u4LldF85ctE0/PLu9u+KBN4maoL653WJU=";
             })
          ];

          # explicitly fetching the source to make sure we're patching over 0.13 (this isn't strictly needed):
          src = prev.fetchFromGitLab {
            domain = "gitlab.freedesktop.org";
            owner = "hadess";
            repo = "power-profiles-daemon";
            rev = "0.13";
            sha256 = "sha256-ErHy+shxZQ/aCryGhovmJ6KmAMt9OZeQGDbHIkC0vUE=";
          };
        });
      }
  )];
2 Likes

Does this work on Debian sid?

I installed power-profiles-daemon_0.13-2+pstate~noble1_amd64.deb, will report back. it installed with dpkg -i with no errors.

You can try to add the Ubuntu PPA and use one of the Ubuntu releases it’s built for. Don’t know if it will work.

1 Like

seems like it installed fine. will report back.