From patchwork Fri Mar 15 04:33:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barber X-Patchwork-Id: 61841 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 885D427BBEB; Fri, 15 Mar 2024 13:37:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9421C27BBE9 for ; Fri, 15 Mar 2024 13:37:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rl7ju-0005tA-4a; Fri, 15 Mar 2024 09:36:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkzov-0000Ex-FE for guix-patches@gnu.org; Fri, 15 Mar 2024 01:09:29 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkzov-00065a-6O for guix-patches@gnu.org; Fri, 15 Mar 2024 01:09:29 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkzpT-0001uK-7j for guix-patches@gnu.org; Fri, 15 Mar 2024 01:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69808] [PATCH] services: tlp: Add config for CPU energy performance policy. Resent-From: Ryan Barber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Mar 2024 05:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69808 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69808@debbugs.gnu.org Cc: Ryan Barber X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17104793517234 (code B ref -1); Fri, 15 Mar 2024 05:10:03 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2024 05:09:11 +0000 Received: from localhost ([127.0.0.1]:51107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkzoc-0001sY-TN for submit@debbugs.gnu.org; Fri, 15 Mar 2024 01:09:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:41544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkzHI-0000aK-5N for submit@debbugs.gnu.org; Fri, 15 Mar 2024 00:34:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkzGf-0005J4-5A for guix-patches@gnu.org; Fri, 15 Mar 2024 00:34:05 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkzGd-00084b-B8 for guix-patches@gnu.org; Fri, 15 Mar 2024 00:34:04 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6e6f6d782e4so323751b3a.0 for ; Thu, 14 Mar 2024 21:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skyscraper-nu.20230601.gappssmtp.com; s=20230601; t=1710477240; x=1711082040; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lXXAXEER5+qNtrOQ3idhA+POTvFi85WNRFZ5kHydUh4=; b=ZnseGJHE3r//Jj/0ZOwANAWm2R+aHoJhji/eExf4btrzFz26JX4V3pgqFGiYJb2J5k rPE/DUeiPrR26PiL7+J3lCeW74HKPJiCTMHxBNbtIdQhksYTPBpWk6399W8yH0TGV7Ce eQ5+UF0WuyVbpAVWYgA+GrQeQUGsUjITMrKKQVCQzOe35GC7sSjI+1/tr+zIwSG5uOd8 NwcLXa4ObPXKSTTjbr3gcW5qpPvWpmvUWxpMjyrsR4K5jitNlQl31Sz4UWi1NMJp86sz heGUoLJ5zducu9L/hZR1e2JUrYngA88mY47icwU2EfPBac2v9zHRGvggQSs/6g2bDXth vOLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710477240; x=1711082040; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lXXAXEER5+qNtrOQ3idhA+POTvFi85WNRFZ5kHydUh4=; b=IInH1eG76O8/l5QXgNT00eL6wVFnJhf2nL7/uezhzXfrfYWPfLRjW2oQq6zAq3kv4/ TYrDPELv/GS7i1FIl7efnjJh0hpfvAYd9mLMLC0E5vyL1QkRpcJmUuq9BUqFiyTkHeBX g1VOHYcQxpMwFd232B8W0oSHqE9uOwL9kvpO5Zfjnjt/bx8hyaXM9RfFh+RrFCuhESmJ WeLLkQ0daLV1/VDNgCH3Re3X97IzNRkyvr3y6RLJeMv2aECpZ156iQW6gxzYW9ZDAL4V XQGizfHnKWFq/h51ZtXjAbB5N/7nHuw/g5UujQW6CRFVHVowyJBaCNwYxuNP2sz1AeIY jY2Q== X-Gm-Message-State: AOJu0YyF1a+IngVP1SmDxzNt3vz8XK3dXVW+NDZj8yQ4JcXOmeL9mTQC SmVETwImn+MtTmNsQD1PpwCWfOLHYKzYdyEkak1hlZQnSK8aeSGxw/zFBWFqJeMoTTTY33raFYT qkNM= X-Google-Smtp-Source: AGHT+IEeIsmb0oD81WA4gidlvpgGXfgms1Xy4IWtB8HmdzfmcZKm3tOedtvYxKXAJSeyqG23ECRJuQ== X-Received: by 2002:a05:6a00:b81:b0:6e4:f49f:bc9 with SMTP id g1-20020a056a000b8100b006e4f49f0bc9mr2590123pfj.20.1710477240425; Thu, 14 Mar 2024 21:34:00 -0700 (PDT) Received: from localhost ([69.176.180.73]) by smtp.gmail.com with UTF8SMTPSA id u6-20020a056a00098600b006e535131c52sm2474296pfg.146.2024.03.14.21.33.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Mar 2024 21:34:00 -0700 (PDT) From: Ryan Barber Date: Thu, 14 Mar 2024 21:33:55 -0700 Message-ID: <20240315043357.30529-1-rfb@skyscraper.nu> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::435; envelope-from=rfb@skyscraper.nu; helo=mail-pf1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 15 Mar 2024 01:08:56 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 15 Mar 2024 09:36:47 -0400 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/pm.scm (tlp-configuration): Add cpu-energy-perf-policy-on-ac and cpu-energy-perf-policy-on-bat. * doc/guix.texi (Power Management Services): Document cpu-energy-perf-policy-on-bat and cpu-energy-perf-policy-on-ac. Change-Id: Ieddf949a325c317abffce00a4f1d047175342d78 --- doc/guix.texi | 12 ++++++++++++ gnu/services/pm.scm | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) base-commit: efe62c5ed38a09d7467a6c1c3d5f509d284ad290 diff --git a/doc/guix.texi b/doc/guix.texi index 796ac0028f..7c1949f267 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35332,6 +35332,18 @@ Defaults to @samp{#f}. @end deftypevr +@deftypevr {@code{tlp-configuration} parameter} string cpu-energy-perf-policy-on-ac +Set CPU energy/performance policy when on AC mode. Possible values are +performance, balance_performance, default, balance_power and power. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string cpu-energy-perf-policy-on-bat +Set CPU energy/performance policy when on BAT mode. Possible values are +performance, balance_performance, default, balance_power and power. + +@end deftypevr + @cindex thermald @cindex CPU frequency scaling with thermald @subsubheading Thermald daemon diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm index 3daf484cc1..62aee055e3 100644 --- a/gnu/services/pm.scm +++ b/gnu/services/pm.scm @@ -378,7 +378,17 @@ (define-configuration tlp-configuration (restore-device-state-on-startup? (boolean #f) "Restore radio device state (bluetooth, wifi, wwan) from previous -shutdown on system startup.")) +shutdown on system startup.") + + (cpu-energy-perf-policy-on-ac + maybe-string + "Set CPU energy/performance policy when on AC mode. Possible values are +performance, balance_performance, default, balance_power and power.") + + (cpu-energy-perf-policy-on-bat + maybe-string + "Set CPU energy/performance policy when on BAT mode. Possible values are +performance, balance_performance, default, balance_power and power.")) (define (tlp-shepherd-service config)