F40 Change Proposal: Tuned Replaces Power-profiles-daemon (Self-Contained)

Tuned Replaces Power-profiles-daemon

Wiki
Announced

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

:link: Summary

Tuned and power-profiles-daemon provide a similar function to set and tune the power status of a system. However, the power-profiles-daemon provides limited profiles to configure the power status of a system. In the meantime, tuned provides many power profiles for different kinds of use cases and technologies. Both of them have similar features, if they can be integrated into one, it allows the fedora user to have more options for power settings of their system and benefits the users.

In this proposal, we would like to replace power-profiles-daemon with tuned. As far as we know, tuned already provides power profiles for different use cases and power-profiles-daemon provides the basic power profile configuration, such platform_profiles, Intel p-state and AMD p-state. We expected that the user can set those profile, tuned provided through gnome-control-panel. To minimize the information to the user, the power panel would provide a simple and advanced mode to show the power profiles. If the users want to finetune the system, they can switch to the advanced mode themselves. The impact scope will be on the tuned and the power panel since tuned should provide the basic power setting and API as power-profiles-daemon and the power panel should be able to show the power profiles that tuned provides.

:link: Owner

:link: Current status

  • Targeted release: Fedora Linux 40
  • Last updated: 2023-11-02
  • [ devel thread]
  • FESCo issue:
  • Tracker bug:
  • Release notes tracker:

:link: Detailed Description

This work would like to replace power-profiles-daemon with tuned. Since tuned already provides a wide range of power profiles for different purposes, this allows the user to have more options for configuring the system power profile.

As far as we know, tuned provide many kinds of advanced and basic profile for different purposes. Power-profiles-daemon provides the basic power profiles and the profiles can be set to the system through platform_profiles, Intel p-state and AMD p-state. That is simple and clever. However, if the users want to ask for an advanced profile, they need to install another power utility, such as tuned to finetune their system. If the power-profiles-daemon can be replaced with tuned. The users would have a wide range of profiles to finetune the system.

If the tuned would be the major power profile management tool, the major impact scope will be on gnome-control-center power panel and tuned itself. Tuned should also provide the new Dbus API to provide the access point to applications. The other is the gnome-control-center power panel. An “Advanced profile” dialog should be made to show advanced profiles to the user. Moreover, the server users need to get used to another command to switch the profiles.

The work expects the tuned replaces the power-profiles-daemons to offer a wide range of power profiles to the fedora users. To integrate them, gnome-control-center power panel needs to add an Advanced profile dialog to use those advanced features. Tuned also needs to integrate the original API to ensure compatibility with legacy applications and provide the basic configuration if the user would stay in basic profiles.

:link: Feedback

From fedora-devel

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/B3UJKFOCRAY3BEEPTHVPW4RY5GFBZWHU/#B3UJKFOCRAY3BEEPTHVPW4RY5GFBZWHU

  1. The dependency concern. Since tuned is written by Python, that causes a dependency impact on Fedora installation.

  2. The power-profiles-daemon API should be ported to tuned to provide the function to the application that uses power-profiles-daemon API, such as gnome-shell and gnome-control-center.

From the hardware vendor

Moreover, we discuss it with vendors through the mail.

  1. Since tuned covers several kinds of system tuning schemes that allow the vendor to implement their power profile for different devices or workloads. For power-profile-daemon, it only has three profiles to set and every detail setting should be done through the firmware level. If tuned can replace power-profiles-daemon, they can imagine they can develop the profile in a much more flexible manner.

:link: Benefit to Fedora

  1. Benefits the user. The user would have more options to tune their system.

  2. Benefits the maintainer. Integrate similar software into one software to reduce the maintenance effort.

:link: Scope

  • Proposal owners:

  • Other developers:

  • Release engineering: #Releng issue number

  • Policies and guidelines: N/A (not needed for this Change)

  • Trademark approval: N/A (not needed for this Change)

  • Alignment with Community Initiatives:

:link: Upgrade/compatibility impact

Both the tuned and the power panel need to be modified to integrate both.

:link: How To Test

:link: User Experience

  1. The workstation user can set the power profile through gnome-control-center. Moreover, an advanced power profile dialog will be shown if the users would like to finetune the system.

  2. The server users switch the profile through the commandline or GNOME desktop if it is installed.

:link: Dependencies

  1. tuned is written by Python so it depends on python packages and its 40 packages.

:link: Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No

:link: Documentation

N/A (not a System Wide Change)

:link: Release Notes

4 Likes

I remember seeing a post somewhere about power-profiles-daemon repo being archived and pausing development for the time being. This might be good change.

Does tuned has gui that integrates with power management system tray or system settings?
On KDE plasma, power-profiles-daemon has a slider that I can use to change power profiles, and I have settings that change based on if laptop is plugged into an outlet or on battery.

typo in the subject: “propsal” not “proposal”.

Do you intend to add the required new things in upstream tuned and GNOME Settings, or as Fedora patches? If upstream, what will you do if the changes are not accepted or get stuck in review?

1 Like

I love this, because I’ve had “check with tuned folks to see if they can replace power-profiles-daemon” on my todo list for a long time but it never gets into the “urgent” side of priorities.

Thanks for the detailed proposal!

@smallorange — about hardware vendors: have you talked with @mpearson from Lenovo or @vaja-slimbook from Slimbook about how this might affect required power certifications?

2 Likes

I’m wary of “simple” and “advanced” configuration modes — advanced can mean anything from “you really must turn this on to get important options” to “changing these can cause your computer to literally catch fire”.

Are there more descriptive terms we can use here? Maybe “recommended” and “fine-tuning”? (Perhaps Fedora Design team @designteam can help!)

4 Likes

If this is going to be in gnome control-center (and plasma’s similar
version), it probibly needs to go though their design process.
So, perhaps a first cut would be to just implement the performance,
balanced, powersave interface and work with upstreams for any additional
interface?

1 Like

Thank you for the comment.

  1. You are right and I try to resolve this. It was actually archived by the author. I have a copy of it and any new features are welcome.
    Kate Hsuan / power-profiles-daemon · GitLab

  2. There is no GUI tool for tuned to set up the profile.
    Phase 1 of this plan focuses on integration. We would not like to impact the applications that use ppd APIs. We plan to propose a transparent daemon to provide ppd API with tuned and try to minimize the impact. So, the applications, such as gnome-control-center can access the power profile without modifying the codes.

1 Like

Hi Otto,

Thank you for your comments

We will work on tuned first and try to replace power-profiles-daemon with tuned.
If they don’t accept our work, I would try to persuade them first and find an alternative solution, for example, a proxy application.

Hi Matthew,

Thank you for your comments :slight_smile:

I’m so glad that you love this plan.
Yes, I had already talked with Mark @mpearson. He was happy with the proposal too. They would like to implement the profile through the application space.

I don’t think this is much of a problem. In practice, “full” installations that have a graphical interface almost always will have python installed.


Switching to tuned seems reasonable. The hard part is going to be in the integration with gnome, but the best way to figure out the details is to try.


@hadess, @principis comments?

Yep - Kate reached out and let me know what was planned. Thanks Kate.

My notes were (approximately):

  • there are a lot of different knobs and dials that people can tune related to many different things in this area (and Linux users will do so) - often to the detriment of their system. Our firmware for Linux is (usually) blissfully unaware of what is going on in user space, so I asked for a way to reset everything quickly and easily to default.
    Idea being that if you go and tweak a bunch of things, and then find that your system is regularly overheating and shutting down you can hit a button to get back to what was tested by us and the default.

  • Related to that - I want an easy way to be able to capture what has been tweaked. Performance and battery life are both hot (ha!) topics and getting support cases where people are complaining about overheating/excessive fans/poor performance/bad battery and being able to check they’ve not turned on something non-default that would cause this would be really appreciated. I have lost many hours debugging issues like this before because of changes people made and didn’t mention…

  • I’d love it to be more flexible and extensible in the longer term. We currently on Linux limit things to three modes and Windows gets more. There are things I’d like to contribute - on some platforms there are potentially four modes; and I’d like to have it so that there could be different modes for plugged in vs battery. Just as suggestions off the top of my head.

Definitely should also talk to the Intel and AMD folk too (if you need introductions let me know). They will potentially have opinions and guidance on this too and they’re way smarter than me.

Mark

4 Likes

Hi Matthew,

Thank you for pointing this out.

We certainly need Fedora design team to help with this.
I expected that the simple (Basic) mode would show only performance, balanced, and powersaver profiles. The advanced (fine-tuning) mode shows the advanced profile that tuned provides.

If the Fedora design team can help with this. That would be great.

Hi

@kevin
Yes, the first step would focus on integration and I expect the GNOME application wouldn’t need to be modified or redesigned. Only the performance, balanced, and powersaver are provided.

But few engineer efforts for tuned are needed, including a transparent daemon to provide ppd APIs and ACPI platform_profile, and amd-pstate.

@zbyszek
I also discussed it with tuned folks. They mentioned that a translation daemon (for tuned and ppd API) can be a short-term solution to bridge GNOME applications and tuned. For the long-term plan, the applications should switch to new API. Moreover, we have to implement the features, such as APCI platform profile and amd-pstate that tuned doesn’t provide.

Sounds great! :slight_smile:
I’m (as usual) very busy, so unfortunately I can’t help much. But if a package review or something smaller is needed, feel free to ping me.

Regarding the GUI, TuneD has very simple GTK GUI which is provided in the package tuned-gtk. The design is bit obsolete, but the basic functionality is already there. The GUI wasn’t never priority of the project, but PRs for improvement or even rewrite is welcome. AFAIK there is also GNOME shell extension [1] and cockpit integration [2]. TuneD has D-Bus and socket interface thus more integration shouldn’t be hard.

[1] TuneD Profile Switcher - GNOME Shell Extensions
[2] Tuned Profiles

3 Likes

It’s nice to see ppd is forked for projects that still relay on it and may want to contribute :slight_smile:

that’s fine, still early days, I’m always happy to use new things. I have seen discussions to make tuned integrate in plasma 6 release, hopefully that goes through as well.

The current simple GUI doesn’t only allow TuneD control and activation of profiles, it also supports creation of new profiles and customization of existing profiles. It shows available plugins and available options to choose from. It’s a bit strange, you need to get used on it, but it works :slight_smile:. Of course, I prefer Emacs editor :wink:.

@zestygrass
Thank you :slight_smile:
I have to correct that I found tuned GUI tool called tuned-gui and it is useful for this propasal.

@jskarvad
Thank you for joining the discussion.
I found it a few days ago and was updating the proposal about this GUI tool.

This change proposal has now been submitted to FESCo with ticket #3103 for voting.

To find out more, please visit our Changes Policy documentation.

1 Like