all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jelle Licht <jlicht@fsfe.org>
To: 54360@debbugs.gnu.org
Subject: [bug#54360] [PATCH] services: thermald: Add 'adaptive?' field.
Date: Sat, 12 Mar 2022 23:12:39 +0100	[thread overview]
Message-ID: <711c688c39edd755893999a13fa336d58ad15391.1647123159.git.jlicht@fsfe.org> (raw)

* 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 4b71fb7010..82dce87eed 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -30687,6 +30687,10 @@ Power Management Services
 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 @@ (define (generate-tlp-documentation)
 (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 @@ (define (thermald-shepherd-service config)
     (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")
                        '()))))

base-commit: 504d15a593faf06ed502057406a20b3601e12759
-- 
2.34.0





             reply	other threads:[~2022-03-12 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 22:12 Jelle Licht [this message]
2022-03-18  9:43 ` [bug#54360] [PATCH] services: thermald: Add 'adaptive?' field Mathieu Othacehe
2022-03-20 15:45   ` bug#54360: " Jelle Licht
2022-03-20 15:52   ` [bug#54360] " Jelle Licht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=711c688c39edd755893999a13fa336d58ad15391.1647123159.git.jlicht@fsfe.org \
    --to=jlicht@fsfe.org \
    --cc=54360@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.