Bug 476445

Summary: With new QML KCM, Power profile settings are no longer hidden if there are only placeholder profiles
Product: [Applications] systemsettings Reporter: Fabian Arndt <fabian.arndt>
Component: kcm_powerdevilAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: feus73, jpetso, kde, natalie_clarius, nate
Priority: NOR Keywords: qt6, regression
Version: master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Combobox with single item

Description Fabian Arndt 2023-11-01 23:19:49 UTC
Created attachment 162810 [details]
Combobox with single item

SUMMARY

The UI elements for power profiles should be hidden if there are only placeholder profiles.
The same behaviour is used in the Battery & Brightness applet.

Currently you end up with a combobox containing a single item.


STEPS TO REPRODUCE

Open the KCM, while having only the placeholder profiles.

OBSERVED RESULT

There are UI elements for power profile settings.

EXPECTED RESULT

There should not be UI elements for power profile settings.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Plasma Developer Edition
KDE Plasma Version: 6.0 - master

ADDITIONAL INFORMATION

https://invent.kde.org/plasma/powerdevil/-/merge_requests/259#note_795081
Comment 1 Paolo Zamponi 2023-11-02 08:27:48 UTC
Can confirm, but let me add here on more thought.

I have a dual boot installation (Plasma 5/6), and in the "old" Plasma 5 energy module I have the 3 canonical power profiles (performance, balanced, and power-saver) available, and I can switch between them.

In Plasma 6 in Konsole I get:

powerprofilesctl list
  balanced:
    Driver:     placeholder

  power-saver:
    Driver:     placeholder

as well, but if I hit Meta+B I can switch to another power profile (this is confirmed by powerprofilesctl get).

So I think I should have these profiles somehow here as well. Or am I'm going wrong?

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Kernel Version: 5.15.0-88-generic (64-bit)
Graphics Platform: Wayland
Comment 2 Nate Graham 2023-11-02 15:37:37 UTC
When initially implementing PPD support, we made the design decision to hide everything if your firmware doesn't support the feature, rather than showing only "Balanced" and "Power Save", because these are placeholders generated in software and the "Power Save" mode may not actually save any power.
Comment 3 Jakob Petsovits 2023-12-01 21:18:17 UTC
@akselmo fixed this via https://invent.kde.org/plasma/powerdevil/-/merge_requests/280 - thanks for the report! The power profile combobox will now be hidden if there is only a single item (i.e. "Leave Unchanged") to choose from.