From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QHHUC0UaTGECZwEAgWs5BA (envelope-from ) for ; Thu, 23 Sep 2021 08:10:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mNiMB0UaTGHNbAAAB5/wlQ (envelope-from ) for ; Thu, 23 Sep 2021 06:10:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6B19024A14 for ; Thu, 23 Sep 2021 08:10:12 +0200 (CEST) Received: from localhost ([::1]:35586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTHvv-0001jn-3l for larch@yhetil.org; Thu, 23 Sep 2021 02:10:11 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632377412; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fKsA52LT7ABJ3sQhB38lcw5lXPeVxD4gUzYznH7b2Do=; b=EMJ56dJBr1jmeHtKzwM7Mqoi+xmN9r5mPM0KvZAXLGQLrJOjyKxIjawcLHTTY8C3X+kNnj XpZrLDf76MhqlHYx2gl+JPt6DmKLNoSdFcU15sHYTVW7K8EIHOnsp3Zeiitv0he/BJgvyt FlNEiht2Re3vqkZA+zabDnwkEfzstWsqk3RhqYl0NIHHhjoyy3UtMsqqUj5J1kNJkJMC0L osgvhxL+LthBcCRlvIsf4Jr4ySH7P+ZFz4mj4wR90wM376gw/TfzJ3osolcrFtwDlNJfTX AD2OY+r25WZyw/ZAcdbQWHyyXOTBcP4xgGSJTUTx3jTLg7aTd3l//b6xOiIj7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632377412; a=rsa-sha256; cv=none; b=J3J890JtrDSo7ZsCfrSO8aZKGW/Gc/EdV23jj0RSm3ZnoC5vWrbvMoMMjbET9yI7Tff8xN q532HKiuNRow02mtNHg5jkjFHTAB4dmoMSyccc/5RhCx+cAyPUAYj3wmviplSwsBDPsukH Eor8CHGqH0W0LskwEizgPQm+9TVEM7CFlkWnb2h+1ZnRi2lj9+uHaxPWh2nMM0bIOhJfz/ JyI1SPuzJsO5nJ+imlcFpZvaPIgB6Vfd2TGcLcZ3g3bpb1jRbz+U/1/AdTO/pxmqoFeefk uLw9iy3yXU1HH8qcRUmHuECIqqOQDWNQ6cm5vmSO+FbAyh/3nvbSOOyFdHFaqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=AJNp6ojR; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=AJNp6ojR; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 6B19024A14 X-Spam-Score: 3.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: lbxDV3g68c+i * 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