[PATCH] services: tlp: Add config for CPU energy performance policy.

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Ryan Barber
Owner
unassigned
Submitted by
Ryan Barber
Severity
normal

Debbugs page

Ryan Barber wrote 12 months ago
(address . guix-patches@gnu.org)(name . Ryan Barber)(address . rfb@skyscraper.nu)
20240315043357.30529-1-rfb@skyscraper.nu
* gnu/services/pm.scm (tlp-configuration): Add cpu-energy-perf-policy-on-ac
and cpu-energy-perf-policy-on-bat.
* doc/guix.texi (Power Management Services): Document
cpu-energy-perf-policy-on-bat and cpu-energy-perf-policy-on-ac.

Change-Id: Ieddf949a325c317abffce00a4f1d047175342d78
---
doc/guix.texi | 12 ++++++++++++
gnu/services/pm.scm | 12 +++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)

Toggle diff (50 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 796ac0028f..7c1949f267 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35332,6 +35332,18 @@ Defaults to @samp{#f}.
@end deftypevr
+@deftypevr {@code{tlp-configuration} parameter} string cpu-energy-perf-policy-on-ac
+Set CPU energy/performance policy when on AC mode. Possible values are
+performance, balance_performance, default, balance_power and power.
+
+@end deftypevr
+
+@deftypevr {@code{tlp-configuration} parameter} string cpu-energy-perf-policy-on-bat
+Set CPU energy/performance policy when on BAT mode. Possible values are
+performance, balance_performance, default, balance_power and power.
+
+@end deftypevr
+
@cindex thermald
@cindex CPU frequency scaling with thermald
@subsubheading Thermald daemon
diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 3daf484cc1..62aee055e3 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -378,7 +378,17 @@ (define-configuration tlp-configuration
(restore-device-state-on-startup?
(boolean #f)
"Restore radio device state (bluetooth, wifi, wwan) from previous
-shutdown on system startup."))
+shutdown on system startup.")
+
+ (cpu-energy-perf-policy-on-ac
+ maybe-string
+ "Set CPU energy/performance policy when on AC mode. Possible values are
+performance, balance_performance, default, balance_power and power.")
+
+ (cpu-energy-perf-policy-on-bat
+ maybe-string
+ "Set CPU energy/performance policy when on BAT mode. Possible values are
+performance, balance_performance, default, balance_power and power."))
(define (tlp-shepherd-service config)

base-commit: efe62c5ed38a09d7467a6c1c3d5f509d284ad290
--
2.41.0
Nicolas Goaziou wrote 1 weeks ago
(address . 69808-done@debbugs.gnu.org)(name . Ryan Barber)(address . rfb@skyscraper.nu)
87y0xl5jwu.fsf@nicolasgoaziou.fr
Hello,

Toggle quote (5 lines)
> * gnu/services/pm.scm (tlp-configuration): Add cpu-energy-perf-policy-on-ac
> and cpu-energy-perf-policy-on-bat.
> * doc/guix.texi (Power Management Services): Document
> cpu-energy-perf-policy-on-bat and cpu-energy-perf-policy-on-ac.

Applied! Thank you! (And sorry for the delay.)

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69808@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69808
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help