1
0
power-profiles-daemon/c9b646025d9f155509a6cda1c292bfd120daeb9e.patch
Atri Bhattacharya 3a5bc57fa7 Accepting request 921427 from GNOME:Next
- Pass explicit systemdsystemunitdir=%{_unitdir} to meson, ensure
  we have the correct systemd unitdir.
- Drop systemd and systemd-rpm-macros BuildRequires, not needed.
- Add check section and run meson_test macro, replace umockdev with
  pkgconfig(umockdev-1.0) BuildRequires.
- Add generic c_compiler BuildRequires as meson checks for it.
- Add upstream patches:
  + c9b646025d9f155509a6cda1c292bfd120daeb9e.patch:
    platform-profile: Add support for 'quiet' profile.
  + 20a2d7f7b80a1847f36236d40388f14ae99fa94b.patch: tests: Add
    tests for quiet profile support.

OBS-URL: https://build.opensuse.org/request/show/921427
OBS-URL: https://build.opensuse.org/package/show/Base:System/power-profiles-daemon?expand=0&rev=2
2021-09-26 14:40:36 +00:00

38 lines
1.4 KiB
Diff

From c9b646025d9f155509a6cda1c292bfd120daeb9e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sat, 24 Jul 2021 22:59:12 +0200
Subject: [PATCH] platform-profile: Add support for 'quiet' profile
---
src/ppd-driver-platform-profile.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/ppd-driver-platform-profile.c b/src/ppd-driver-platform-profile.c
index 1da5a75..8111251 100644
--- a/src/ppd-driver-platform-profile.c
+++ b/src/ppd-driver-platform-profile.c
@@ -59,7 +59,9 @@ profile_to_acpi_platform_profile_value (PpdDriverPlatformProfile *self,
case PPD_PROFILE_POWER_SAVER:
if (g_strv_contains ((const char * const*) self->profile_choices, "low-power"))
return "low-power";
- return "cool";
+ if (g_strv_contains ((const char * const*) self->profile_choices, "cool"))
+ return "cool";
+ return "quiet";
case PPD_PROFILE_BALANCED:
return "balanced";
case PPD_PROFILE_PERFORMANCE:
@@ -141,7 +143,8 @@ verify_acpi_platform_profile_choices (PpdDriverPlatformProfile *self)
const char * const *choices = (const char * const*) self->profile_choices;
if ((g_strv_contains (choices, "low-power") ||
- g_strv_contains (choices, "cool")) &&
+ g_strv_contains (choices, "cool") ||
+ g_strv_contains (choices, "quiet")) &&
g_strv_contains (choices, "balanced") &&
g_strv_contains (choices, "performance"))
return PPD_PROBE_RESULT_SUCCESS;
--
GitLab