From 99740ead2d5ec4927901e07ecf4190dc100a3768 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 2 Apr 2021 12:07:50 +0200 Subject: [PATCH] main: Obsolete "Inhibited" property and add Degraded The PerformanceInhibited property was there to convey that the performance profile was unavailable, and that the daemon should switch to a lower profile to avoid using the performance profile. But it was difficult to communicate whether the daemon should switch back to the performance profile when the inhibition disappeared, or whether it should keep the same profile (the latter was what was implemented). There was also the problem that depending on the backend, the performance profile might be able to provide a behaviour that wouldn't match either of the unhampered performance profile, or the balanced profile, but somewhere in between. The PerformanceInhibited property is kept for compatibility reasons with the existing consumer, GNOME 40. It will be removed in the future and should not be relied on. Closes: #24 --- src/net.hadess.PowerProfiles.xml | 23 ++++++++------ src/power-profiles-daemon.c | 45 ++++++++++++-------------- src/powerprofilesctl.in | 6 ++-- src/ppd-driver-fake.c | 16 +++++----- src/ppd-driver-intel-pstate.c | 2 +- src/ppd-driver-platform-profile.c | 11 ++----- src/ppd-driver.c | 41 ++++++++++++------------ src/ppd-driver.h | 4 +-- tests/integration-test | 53 +++++++++++++++---------------- 9 files changed, 96 insertions(+), 105 deletions(-) diff --git a/src/net.hadess.PowerProfiles.xml b/src/net.hadess.PowerProfiles.xml index fce04a8..9419f7c 100644 --- a/src/net.hadess.PowerProfiles.xml +++ b/src/net.hadess.PowerProfiles.xml @@ -13,7 +13,7 @@ OS components would typically use the "Profiles" property to construct their UI (2 or 3 profiles available), and monitor the "ActiveProfile" - and the "PerformanceInhibited" properties to update that UI. The UI + and the "PerformanceDegraded" properties to update that UI. The UI would try to set the "ActiveProfile" property if the user selected a different one. @@ -27,24 +27,29 @@ + + + - +