[PSA] powertop + tuned = better power profiles

This is a small PSA to give some love to the powertop2tuned tool, that took me a couple of hours to learn existed while I was troubleshooting. Simply put, this will allow you to have the powertop auto-tune ‘Good’ settings without having to keep powertop on your system.

First of all: why?

This is guided for those that want to apply powertop’s powersavings while seeking extremely minimal systems or that, like me, use Fedora Atomic and wants to layer as few packages as possible.

I was personally seeking a way to do so but every single result pointed me to using scripts that felt too hacky or learn how to create udev rules, which is kind of tedious and complicated. This is a lot simpler, and a lot faster than both, I believe.

In my personal case, the powertop recommendations usually help me recover about 15-20 extra minutes of battery life on my laptop, and since I just got a new battery for it after the old one died, I went looking for a way to make this happen, and since I found it, I believe sharing is caring for the community.

Ok, show me how.

First of all, you need to actually have powertop and the tools neeeded in the first place. Don’t worry, you’ll be able to uninstall them after we’re done. First of all, depending on whether you’re running our regular editions or Fedora Atomic, respectively, run:

sudo dnf install powertop tuned-utils

or

rpm-ostree install powertop tuned-utils (--apply-now in case you don't want to restart before doing this)

By default it creates the profile in the /etc/tuned directory and it bases it on the currently selected tuned profile. So, my personal recommendation is to run the following command three times, once for the balanced profile (while plugged to the AC), once for the powersaver profile and once again for the balanced profile (while on battery, for the laptop users):

powertop2tuned profile_name --enable

Personally, the profiles I created (and will use the names as reference) are balanced_powertop, balanced-battery_powertop and powersave_powertop.

After that, just change the name of the profiles to the ones you created in /etc/tuned/ppd.conf and save!

How the file should look before the changes
[main]
# The default PPD profile
default=balanced
battery_detection=true
sysfs_acpi_monitor=true

[profiles]
# PPD = TuneD
power-saver=powersave
balanced=balanced
performance=throughput-performance

[battery]
# PPD = TuneD
balanced=balanced-battery
How the file should look after the changes
[main]
# The default PPD profile
default=balanced
battery_detection=true
sysfs_acpi_monitor=true

[profiles]
# PPD = TuneD
power-saver=powersave_powertop
balanced=balanced_powertop
performance=throughput-performance

[battery]
# PPD = TuneD
balanced=balanced-battery_powertop

As soon as you change profiles, it will be applied and you can simply uninstall the packages you installed earlier!

That’s great, but will this enable USB autosuspend like powertop --auto-tune does?

It shouldn’t, but if you want to be sure (or just tinker with and fine tune the things that were enabled, you can edit /etc/tuned/profiles/[name of the profile you created]/tuned.conf.

2 Likes

This is great, you should make it into a Fedora Doc

1 Like

Cool! :slight_smile: I wonder if I can disable thermald on a AMD Ryzen 9 360 as well?

Okay, yes.. thermald.service can be safely deactivated on an AMD machine.

I wonder if we also shouldn’t make additional profile? E.g.

performance_powertop
balanced_powertop
powersave_powertop

powersave_battery__powertop
balanced_battery__powertop
performance_battery_powertop

And then accordingly change /etc/tuned/ppd.conf:

[main]
# The default PPD profile
default=balanced
battery_detection=true
sysfs_acpi_monitor=true

[profiles]
# PPD = TuneD
power-saver=powersave_powertop
balanced=balanced_powertop
performance=performance_powertop

[battery]
# PPD = TuneD
balanced=balanced_battery_powertop
power-saver=powersave_battery_powertop
performance=performance_battery_powertop

After creating the profiles we can uninstall powertop & tuned-utils again?

Additionally this creates SELinux alerts

SELinux is preventing tuned-ppd from write access on the file /etc/tuned/ppd_base_profile.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/etc/tuned/ppd_base_profile default label should be tuned_rw_etc_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /etc/tuned/ppd_base_profile

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that tuned-ppd should be allowed write access on the ppd_base_profile file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'tuned-ppd' --raw | audit2allow -M my-tunedppd
# semodule -X 300 -i my-tunedppd.pp

Additional Information:
Source Context                system_u:system_r:tuned_ppd_t:s0
Target Context                system_u:object_r:tuned_etc_t:s0
Target Objects                /etc/tuned/ppd_base_profile [ file ]
Source                        tuned-ppd
Source Path                   tuned-ppd
Port                          <Unknown>
Host                          x
Source RPM Packages           
Target RPM Packages           tuned-2.25.1-2.fc42.noarch
SELinux Policy RPM            selinux-policy-targeted-42.12-1.fc42.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     x
Platform                      Linux x 6.16.10-200.fc42.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Oct  2 19:23:55 UTC 2025
                              x86_64
Alert Count                   135
First Seen                    2025-07-30 21:55:51 CEST
Last Seen                     2025-10-10 09:29:24 CEST
Local ID                      x

Raw Audit Messages
type=AVC msg=audit(1760081364.858:226): avc:  denied  { write } for  pid=1661 comm="tuned-ppd" name="ppd_base_profile" dev="dm-0" ino=1938075 scontext=system_u:system_r:tuned_ppd_t:s0 tcontext=system_u:object_r:tuned_etc_t:s0 tclass=file permissive=1


Hash: tuned-ppd,tuned_ppd_t,tuned_etc_t,file,write

Apply this to fix the issue:

sudo /sbin/restorecon -v /etc/tuned/ppd_base_profile