[PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config

  • Done
  • quality assurance status badge
Details
3 participants
  • Attila Lendvai
  • Mathieu Othacehe
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 13 Sep 2021 13:00
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20210913110030.1817-1-attila@lendvai.name
---
gnu/services/pm.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Toggle diff (29 lines)
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
M
M
Mathieu Othacehe wrote on 21 Sep 2021 16:02
(name . Attila Lendvai)(address . attila@lendvai.name)(address . 50565@debbugs.gnu.org)
87a6k658nd.fsf@gnu.org
Hello,

Toggle quote (16 lines)
> + (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:

Could you send an updated version :)?

Thanks,

Mathieu
A
A
Attila Lendvai wrote on 23 Sep 2021 08:09
[PATCH] services: tlp: Added config variables for battery charging.
(address . 50565@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20210923060910.29123-1-attila@lendvai.name
* 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(+)

Toggle diff (68 lines)
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
R
R
Ricardo Wurmus wrote on 2 Feb 2022 10:43
[PATCH] services: tlp: added start-charge-thresh-bat0 & co. to the config
(address . 50565-done@debbugs.gnu.org)
87ee4l7gaw.fsf@elephly.net
I’ve pushed this after very minor changes (double spacing in the
documentation, and present tense in the commit message).

Thank you!

--
Ricardo
Closed
?