unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config
@ 2021-09-13 11:00 Attila Lendvai
  2021-09-21 14:02 ` Mathieu Othacehe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Attila Lendvai @ 2021-09-13 11:00 UTC (permalink / raw)
  To: 50565; +Cc: Attila Lendvai

---
 gnu/services/pm.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 256c6a7fa7..bf3d8004c7 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -253,6 +253,22 @@ default, performance, powersave.")
    (string "powersave")
    "Same as @code{pcie-aspm-ac} but on BAT mode.")
 
+  (start-charge-thresh-bat0
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 0 should begin charging.")
+
+  (stop-charge-thresh-bat0
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 0 should stop charging.")
+
+  (start-charge-thresh-bat1
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 1 should begin charging.")
+
+  (stop-charge-thresh-bat1
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 1 should stop charging.")
+
   (radeon-power-profile-on-ac
    (string "high")
    "Radeon graphics clock speed level.  Alternatives are
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config
  2021-09-13 11:00 [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Attila Lendvai
@ 2021-09-21 14:02 ` Mathieu Othacehe
  2021-09-23  6:09 ` [bug#50565] [PATCH] services: tlp: Added config variables for battery charging Attila Lendvai
  2022-02-02  9:43 ` bug#50565: [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Ricardo Wurmus
  2 siblings, 0 replies; 4+ messages in thread
From: Mathieu Othacehe @ 2021-09-21 14:02 UTC (permalink / raw)
  To: Attila Lendvai; +Cc: 50565


Hello,

> +  (start-charge-thresh-bat0
> +   (maybe-non-negative-integer 'disabled)
> +   "Percentage when battery 0 should begin charging.")
> +
> +  (stop-charge-thresh-bat0
> +   (maybe-non-negative-integer 'disabled)
> +   "Percentage when battery 0 should stop charging.")
> +
> +  (start-charge-thresh-bat1
> +   (maybe-non-negative-integer 'disabled)
> +   "Percentage when battery 1 should begin charging.")
> +
> +  (stop-charge-thresh-bat1
> +   (maybe-non-negative-integer 'disabled)
> +   "Percentage when battery 1 should stop charging.")

It would be nice if you could document those new fields in the "TLP
daemon" section of the doc/guix.texi file.

Note that the commit message should also respect the conventions
specified here:
https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html.

Could you send an updated version :)?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#50565] [PATCH] services: tlp: Added config variables for battery charging.
  2021-09-13 11:00 [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Attila Lendvai
  2021-09-21 14:02 ` Mathieu Othacehe
@ 2021-09-23  6:09 ` Attila Lendvai
  2022-02-02  9:43 ` bug#50565: [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Ricardo Wurmus
  2 siblings, 0 replies; 4+ messages in thread
From: Attila Lendvai @ 2021-09-23  6:09 UTC (permalink / raw)
  To: 50565; +Cc: Attila Lendvai

* gnu/services/pm.scm (tlp-configuration): Added start-charge-thresh-bat0,
stop-charge-thresh-bat0, start-charge-thresh-bat1, stop-charge-thresh-bat1.
* doc/guix.texi (Power Management Services): Document them.
---
 doc/guix.texi       | 28 ++++++++++++++++++++++++++++
 gnu/services/pm.scm | 16 ++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index b15a45a977..3056157bfe 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -28464,6 +28464,34 @@ Defaults to @samp{"powersave"}.
 
 @end deftypevr
 
+@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer start-charge-thresh-bat0
+Percentage when battery 0 should begin charging. Only supported on some laptops.
+
+Defaults to @samp{disabled}.
+
+@end deftypevr
+
+@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer stop-charge-thresh-bat0
+Percentage when battery 0 should stop charging. Only supported on some laptops.
+
+Defaults to @samp{disabled}.
+
+@end deftypevr
+
+@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer start-charge-thresh-bat1
+Percentage when battery 1 should begin charging. Only supported on some laptops.
+
+Defaults to @samp{disabled}.
+
+@end deftypevr
+
+@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer stop-charge-thresh-bat1
+Percentage when battery 1 should stop charging. Only supported on some laptops.
+
+Defaults to @samp{disabled}.
+
+@end deftypevr
+
 @deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-ac
 Radeon graphics clock speed level.  Alternatives are low, mid, high,
 auto, default.
diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 256c6a7fa7..bf3d8004c7 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -253,6 +253,22 @@ default, performance, powersave.")
    (string "powersave")
    "Same as @code{pcie-aspm-ac} but on BAT mode.")
 
+  (start-charge-thresh-bat0
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 0 should begin charging.")
+
+  (stop-charge-thresh-bat0
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 0 should stop charging.")
+
+  (start-charge-thresh-bat1
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 1 should begin charging.")
+
+  (stop-charge-thresh-bat1
+   (maybe-non-negative-integer 'disabled)
+   "Percentage when battery 1 should stop charging.")
+
   (radeon-power-profile-on-ac
    (string "high")
    "Radeon graphics clock speed level.  Alternatives are
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#50565: [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config
  2021-09-13 11:00 [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Attila Lendvai
  2021-09-21 14:02 ` Mathieu Othacehe
  2021-09-23  6:09 ` [bug#50565] [PATCH] services: tlp: Added config variables for battery charging Attila Lendvai
@ 2022-02-02  9:43 ` Ricardo Wurmus
  2 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2022-02-02  9:43 UTC (permalink / raw)
  To: 50565-done; +Cc: Mathieu Othacehe, attila.lendvai

I’ve pushed this after very minor changes (double spacing in the
documentation, and present tense in the commit message).

Thank you!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-02  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 11:00 [bug#50565] [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Attila Lendvai
2021-09-21 14:02 ` Mathieu Othacehe
2021-09-23  6:09 ` [bug#50565] [PATCH] services: tlp: Added config variables for battery charging Attila Lendvai
2022-02-02  9:43 ` bug#50565: [PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).