guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: services: thermald: Add 'adaptive?' field.


From: guix-commits
Subject: branch master updated: services: thermald: Add 'adaptive?' field.
Date: Sun, 20 Mar 2022 11:44:54 -0400

This is an automated email from the git hooks/post-receive script.

jlicht pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 10d865aa92 services: thermald: Add 'adaptive?' field.
10d865aa92 is described below

commit 10d865aa921f559562fb543d7796c7a08e17f016
Author: Jelle Licht <jlicht@fsfe.org>
AuthorDate: Sat Mar 12 21:34:09 2022 +0100

    services: thermald: Add 'adaptive?' field.
    
    * gnu/services/pm.scm (<thermald-configuration>): Add 'adaptive?' field.
    (thermald-shepherd-service): Use it to pass --adaptive to thermald.
    * doc/guix.texi (Power Management Services): Document the 'adaptive?' field 
of
    'thermald-configuration'.
---
 doc/guix.texi       | 4 ++++
 gnu/services/pm.scm | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 15ab97699c..44b0f9f1ea 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -30687,6 +30687,10 @@ of processors and preventing overheating.
 Data type representing the configuration of @code{thermald-service-type}.
 
 @table @asis
+@item @code{adaptive?} (default: @code{#f})
+Use @acronym{DPTF, Dynamic Power and Thermal Framework} adaptive tables
+when present.
+
 @item @code{ignore-cpuid-check?} (default: @code{#f})
 Ignore cpuid check for supported CPU models.
 
diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 3da3c0b961..e48236dbca 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -435,6 +435,8 @@ shutdown on system startup."))
 (define-record-type* <thermald-configuration>
   thermald-configuration make-thermald-configuration
   thermald-configuration?
+  (adaptive?           thermald-adaptive?              ;boolean
+                       (default #f))
   (ignore-cpuid-check? thermald-ignore-cpuid-check?    ;boolean
                        (default #f))
   (thermald            thermald-thermald               ;file-like
@@ -448,6 +450,9 @@ shutdown on system startup."))
     (start #~(make-forkexec-constructor
               '(#$(file-append (thermald-thermald config) "/sbin/thermald")
                 "--no-daemon"
+                #$@(if (thermald-adaptive? config)
+                       '("--adaptive")
+                       '())
                 #$@(if (thermald-ignore-cpuid-check? config)
                        '("--ignore-cpuid-check")
                        '()))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]