Skip to content

powerprofile: write profile choices even for placeholder driver

When the placeholder driver is set, there may still be power save mode available even if no performance mode, so make use of the available profiles anyway.

See https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/blob/main/README.md?ref_type=heads#user-content-operations-on-intel-based-machines, https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/blob/main/src/ppd-driver-placeholder.c#L29.

To appropriately represent this in the UI, the second commit in this MR adapts the OSD and plasma-workspace!3529 (closed) the slider in the applet accordingly; the KCM doesn't need any adaption (closes https://bugs.kde.org/show_bug.cgi?id=476445).

Testing:

If you currently don't get any power profiles (eg you see no power profile slider in the battery applet), please test whether this MR + plasma-workspace!3529 (closed) makes any difference for you. Make sure you have power profiles daemon intalled.

I can't properly test whether writing the profile choices when there is no performance mode works as intended as my device supports all three modes. The OSD I tested by hardcoding the power profile choices to simulate only power save and balanced mode to be available.

CC @ngraham who brought it up, @davidre and @broulik who originally authored power profile integration.

Edited by Natalie Clarius

Merge request reports