Bug 2175435

Summary: KDE Plasma: Battery and Settings pop up does not show/save correct power profile selection (consistent across different distros)
Product: [Fedora] Fedora Reporter: Andrei Manzhov <tofo5050>
Component: power-profiles-daemonAssignee: Arthur Bols <arthur>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: bnocera, gcremella, tuppa
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-16 18:00:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrei Manzhov 2023-03-04 21:56:42 UTC
Description of problem:
Battery and Settings popup (that shows upon a click on the battery icon in the system tray) does not save/show the correct power profile. 
This popup window has a power selection bar that offers 3 power profile options: Power save, Balanced and Performance. When a user clicks any of them, the selection apparently applies (CPU frequencies and fan speeds change), but the bar selection flickers several time and does not respect the selection. After some time, if one clicks the battery icon again, the same selection bar might show the correct power profile, but most of the time the bar stays in its original state. I'm not sure it even changes it always.
Interestingly, in the settings app (Settings - Power Management - Energy Saving - (On AC Power/On Battery) - Power Management profile (enabled) - Switch to Power Save/Balanced/Performance - OK) everything works perfectly; the selection in the drop-down list is being applied and saved correctly every time.

Version-Release number of selected component (if applicable): 
reproduced on all KDE-powered Fedora versions that I've tried so far:
- Fedora 37 Workstation;
- Fedora Silverblue 39 Rawhide Gnome Silverblue-ostree-x86_64-Rawhide-20230303; 
- Fedora Silverblue 39 Rawhide Kinoite Fedora-Kinoite-ostree-x86_64-Rawhide-20230303.

How reproducible:
Every time upon a click on the battery icon in the status bar.

Steps to Reproduce:
1. Click the battery icon in the status bar tray.
2. In the Battery and Brightess popup window, click any different option on the Power Profile selection bar.

Actual results:
The status bar should have displayed the new power profile selection, but it just flickers several times and keeps showing the same setting. At the same time, the new power profile selection will likely be applied, as the CPU and Fan speeds may change. 

Expected results:
The status bar changes its display accordingly with the power plan selected by user input.

Additional info:
Platform: Intel Tiger Lake 11th Gen 1165G7 powered Thinkpads 

Please revise the component name, possibly wrong one indicated.

Comment 1 Fedora Admin user for bugzilla script actions 2023-06-30 00:52:08 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Fedora Admin user for bugzilla script actions 2023-07-01 12:47:54 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Fedora Release Engineering 2023-08-16 08:08:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 4 Arthur Bols 2024-01-25 15:04:51 UTC
Could be that it is related to https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/107 or it's a powerdevil bug.

You could try the latest commit of power-profiles-daemon. I requested a scratch-build for you: https://koji.fedoraproject.org/koji/taskinfo?taskID=112343302 . 
If you need more help, let me know!

Comment 5 Gus 2024-06-11 13:26:14 UTC
This problem also affects the "stop charging" option. 
How to reproduce:
Go to: "system preferences" -> "energy saving" -> "advanced settings" (options and menus may have different texts since I'm translating them from spanish version), then set "stop charging" percent value (60% in ex).
On system restart they go back to 100% setting.

Comment 6 Arthur Bols 2024-06-16 18:00:43 UTC
(In reply to Gus from comment #5)
> This problem also affects the "stop charging" option. 
> How to reproduce:
> Go to: "system preferences" -> "energy saving" -> "advanced settings"
> (options and menus may have different texts since I'm translating them from
> spanish version), then set "stop charging" percent value (60% in ex).
> On system restart they go back to 100% setting.

power-profiles-daemon only supports changing CPU/platform profiles, so your issue is related to powerdevil or something else. Please report it over there.

As I haven't been able to reproduce the issue and there hasn't been any response for a while, I will close this bug for now. Feel free to reopen it with more details if needed.