From patchwork Thu Sep 23 06:09:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 33254 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 710FC27BBE3; Thu, 23 Sep 2021 07:10:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3655A27BBE1 for ; Thu, 23 Sep 2021 07:10:11 +0100 (BST) Received: from localhost ([::1]:35586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTHvu-0001jn-9M for patchwork@mira.cbaines.net; Thu, 23 Sep 2021 02:10:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTHvm-0001ja-Ez for guix-patches@gnu.org; Thu, 23 Sep 2021 02:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTHvm-0000Hw-5U for guix-patches@gnu.org; Thu, 23 Sep 2021 02:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTHvl-0006ws-W2 for guix-patches@gnu.org; Thu, 23 Sep 2021 02:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50565] [PATCH] services: tlp: Added config variables for battery charging. References: <20210913110030.1817-1-attila@lendvai.name> In-Reply-To: <20210913110030.1817-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Sep 2021 06:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50565 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50565@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 50565-submit@debbugs.gnu.org id=B50565.163237737226656 (code B ref 50565); Thu, 23 Sep 2021 06:10:01 +0000 Received: (at 50565) by debbugs.gnu.org; 23 Sep 2021 06:09:32 +0000 Received: from localhost ([127.0.0.1]:52467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTHvI-0006vr-2G for submit@debbugs.gnu.org; Thu, 23 Sep 2021 02:09:32 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:43893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTHvF-0006vZ-La for 50565@debbugs.gnu.org; Thu, 23 Sep 2021 02:09:30 -0400 Received: by mail-ed1-f43.google.com with SMTP id v10so14672383edj.10 for <50565@debbugs.gnu.org>; Wed, 22 Sep 2021 23:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fKsA52LT7ABJ3sQhB38lcw5lXPeVxD4gUzYznH7b2Do=; b=AJNp6ojRBV+35ZYuCB/RxVI8/qeuuVKwWllUDfWJaiygCrYlZ1L6to+Sn/TnBSfccC zCSezSQCBn6sekprH+kPEazHrUm5zXvf/KJSpF/SwqMNJW/3DUsAx0Tu2UGDZpt1jbH+ EcO9JnrlFzCEH7BAUu6fQzrasOxFzNL3pAbOopsGPpm95TZD7s6g/rfXHMhWc5yn3Qfs VYQuPr2tqdJ458ZUOS1f9jM57rc8SgOHZiBg8CarSWmXoKND72Tb30yi5dUtYS6PhMpS nAvTcj7PV8E9VU9Xf3bYI26LBN5a6YJH54VC7AgzqwcVdSCqgLQ2xHqAtR2bT1u+1NrP 6YTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=fKsA52LT7ABJ3sQhB38lcw5lXPeVxD4gUzYznH7b2Do=; b=xbfdIlfPy9EXcdiTlK9FXbNYOmQmCgIzDQ1gNTppp6Vx0mRhxLpbJjMtq1PNWF/JpW 9fWeEnz4bXEXAANpup//8nnata9bZRCwcVOriu8RUEPqdHhn/U7WWQp6rkK9fOrucMJH kGkGZVCe5fKAYw/yz4krCaDcZiKeFJxE5O6orqfLwA0x24eK5Q7P/zOmCcv610CjP3c4 Oijd5fXiki5o3bd/sekAIW8YAgWoNqyrEjhKsnGtnzJQjhh6lynvxBGlu0RRsZ1UF2dm ZYYCeHD8VjFWjqlYa8ZbgAcy9QoiZm0IW2J3c4kP6WqRQCtTqHCjRFCdOB6e9syS+sCy 16Ew== X-Gm-Message-State: AOAM532f3dk2oPJg/WmIZR62FUAJvwu1Z30uIspLn9ZuKOsn1OJNuyt1 w48zDVtQhfzW2Iyj0k1ASCsPe/8PLbc= X-Google-Smtp-Source: ABdhPJxcL8AiglLm4APks+3Qm26rO3lEY+UuOUEO3nx5kfamTlaad84jM0vbEu6OFqkvfi5SlgY0OA== X-Received: by 2002:aa7:d592:: with SMTP id r18mr3628511edq.172.1632377363717; Wed, 22 Sep 2021 23:09:23 -0700 (PDT) Received: from lelap.lan (catv-213-222-131-28.catv.broadband.hu. [213.222.131.28]) by smtp.gmail.com with ESMTPSA id a4sm2773119edb.79.2021.09.22.23.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 23:09:22 -0700 (PDT) From: Attila Lendvai Date: Thu, 23 Sep 2021 08:09:10 +0200 Message-Id: <20210923060910.29123-1-attila@lendvai.name> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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