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'.
This commit is contained in:
Jelle Licht 2022-03-12 21:34:09 +01:00
parent 01d433250f
commit 10d865aa92
No known key found for this signature in database
GPG key ID: DA4597F947B41025
2 changed files with 9 additions and 0 deletions

View file

@ -30687,6 +30687,10 @@ of processors and preventing overheating.
Data type representing the configuration of @code{thermald-service-type}. Data type representing the configuration of @code{thermald-service-type}.
@table @asis @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}) @item @code{ignore-cpuid-check?} (default: @code{#f})
Ignore cpuid check for supported CPU models. Ignore cpuid check for supported CPU models.

View file

@ -435,6 +435,8 @@ (define (generate-tlp-documentation)
(define-record-type* <thermald-configuration> (define-record-type* <thermald-configuration>
thermald-configuration make-thermald-configuration thermald-configuration make-thermald-configuration
thermald-configuration? thermald-configuration?
(adaptive? thermald-adaptive? ;boolean
(default #f))
(ignore-cpuid-check? thermald-ignore-cpuid-check? ;boolean (ignore-cpuid-check? thermald-ignore-cpuid-check? ;boolean
(default #f)) (default #f))
(thermald thermald-thermald ;file-like (thermald thermald-thermald ;file-like
@ -448,6 +450,9 @@ (define (thermald-shepherd-service config)
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
'(#$(file-append (thermald-thermald config) "/sbin/thermald") '(#$(file-append (thermald-thermald config) "/sbin/thermald")
"--no-daemon" "--no-daemon"
#$@(if (thermald-adaptive? config)
'("--adaptive")
'())
#$@(if (thermald-ignore-cpuid-check? config) #$@(if (thermald-ignore-cpuid-check? config)
'("--ignore-cpuid-check") '("--ignore-cpuid-check")
'())))) '()))))