Bug 2318788

Summary: tuned-ppd breaks sysprof (net.hadess.PowerProfiles.switch-profile` not implemented)
Product: [Fedora] Fedora Reporter: Mateus Rodrigues Costa <mateusrodcosta>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: jskarvad, pzacik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tuned-2.24.1-3.fc41 tuned-2.24.1-3.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-17 01:26:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Sysprof error screenshot none

Description Mateus Rodrigues Costa 2024-10-15 14:57:05 UTC
Sysprof has a functionality to changed the power profile using power-profiles-daemon.

That uses `hadess.PowerProfiles.switch-profile`, however sysprof fails saying it's not implemented.

Reproducible: Always

Steps to Reproduce:
1. Run sysprof
2. Use the "record with energy profile" setting
3. Sysprof should crash
Actual Results:  
Sysprof crashes

Expected Results:  
Sysprof should managed to change profiles and keep working

Comment 1 Mateus Rodrigues Costa 2024-10-15 14:57:45 UTC
Created attachment 2052179 [details]
Sysprof error screenshot

Comment 2 Pavol Zacik 2024-10-15 17:03:51 UTC
Can you please provide your TuneD version and a version of power-profiles-daemon for which the functionality works?

I just swapped tuned-2.24.0-1.fc40 for power-profiles-daemon-0.21-3.fc40, and I'm getting the same same error message with both installed.

In general, users of power-profiles-daemon or tuned-ppd should switch the profile either via the DBus property ActiveProfile or via the pair of functions HoldProfile and ReleaseProfile.

Comment 3 Mateus Rodrigues Costa 2024-10-15 17:24:52 UTC
My bad, forgot the version data.

tuned-2.24.0-3.fc41.noarch
tuned-ppd-2.24.0-3.fc41.noarch
sysprof-47.0-1.fc41.x86_64

> version of power-profiles-daemon for which the functionality works

I assumed the functionality worked on ppd and it got broken with tuned-ppd though?

I guess then that sysprof has been broken for a while?

> In general, users of power-profiles-daemon or tuned-ppd should switch the profile either via the DBus property ActiveProfile or via the pair of functions HoldProfile and ReleaseProfile.

Well that would mean that `switch-profile` used to exist in ppd but it doesn't anymore and it's broken on both ppd and tune-ppd.

If that's so, I guess I should fil a bug in sysprof instead.

Comment 4 Pavol Zacik 2024-10-17 06:46:02 UTC
I took a deeper look, and I would classify this as a bug in both tuned-ppd and power-profiles-daemon, not in sysprof.

Tuned-ppd now has an upstream fix [1] pending, which resolves this by unifying the polkit policy action names with power-profiles-daemon.

Power-profiles-daemon should likely have a bug reported that commit e33f63c [2] breaks sysprof by changing the name of the polkit policy file from net.hadess.PowerProfiles.policy
to power-profiles-daemon.policy (which is IMHO rather unconventional).

[1] https://github.com/redhat-performance/tuned/pull/698
[2] https://src.fedoraproject.org/rpms/power-profiles-daemon/c/e33f63c

Comment 5 Fedora Update System 2025-01-15 08:37:07 UTC
FEDORA-2025-1c520a4d59 (tuned-2.24.1-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-1c520a4d59

Comment 6 Fedora Update System 2025-01-15 10:20:39 UTC
FEDORA-2025-97c3eb9857 (tuned-2.24.1-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-97c3eb9857

Comment 7 Fedora Update System 2025-01-16 02:35:08 UTC
FEDORA-2025-97c3eb9857 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-97c3eb9857`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-97c3eb9857

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2025-01-17 01:26:16 UTC
FEDORA-2025-97c3eb9857 (tuned-2.24.1-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2025-01-17 10:22:45 UTC
FEDORA-2025-7cd844862c (tuned-2.24.1-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-7cd844862c

Comment 10 Fedora Update System 2025-01-18 18:01:58 UTC
FEDORA-2025-7cd844862c (tuned-2.24.1-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.