From unknown Sat Jun 21 10:37:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#70845 <70845@debbugs.gnu.org> To: bug#70845 <70845@debbugs.gnu.org> Subject: Status: [PATCH] services: Add fancontrol-service-type Reply-To: bug#70845 <70845@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:37:26 +0000 retitle 70845 [PATCH] services: Add fancontrol-service-type reassign 70845 guix-patches submitter 70845 Adrien 'neox' Bourmault severity 70845 normal tag 70845 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 11:41:29 2024 Received: (at submit) by debbugs.gnu.org; 9 May 2024 15:41:29 +0000 Received: from localhost ([127.0.0.1]:55952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s55th-0004Vz-4U for submit@debbugs.gnu.org; Thu, 09 May 2024 11:41:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s55te-0004Vm-8I for submit@debbugs.gnu.org; Thu, 09 May 2024 11:41:27 -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 1s55t6-0006Hy-D7 for guix-patches@gnu.org; Thu, 09 May 2024 11:40:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s55t5-0002Sh-EC; Thu, 09 May 2024 11:40:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=X3fpXJ/fDqZn4Z++RYpYtFhJ8wkuCFx37wWclyQH2gk=; b=KAtNhYkUQC+OKL F0rYLyazhaV+ESDqysGSGYpkpkSPmfC06+ADFtPfHHpVcruZwAu01zcjTTggrU0tYsvfM1LFCuwst 7xUcg9Afa8N7KuIhYYCUvQAl1nO4pqlKlDmU9LTiHVLDejvwO1khgu+YKvcTozGDi/nZGFOIDzfRA hQF26rtLxuDcQC/xZs9gxVyeMsWpDmLHYoM9mjeNbMirwtHJkLMEWoFdjUzsylIKzlGeDnbyGw2N4 gHXH44xITxgwvSQLWMHE5N9ZSWdLpXVynjnkfW8erIgxOH+RYZM7ra92z1UzXLSyp6nkYYC6rlDKz KrfySagyw7cehyJugVLA==; From: Adrien 'neox' Bourmault To: guix-patches@gnu.org Subject: [PATCH] services: Add fancontrol-service-type Date: Thu, 9 May 2024 17:37:43 +0200 Message-ID: <20240509154032.5047-1-neox@gnu.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: Adrien 'neox' Bourmault X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi! I've created a fancontrol service for my own use on a KGPE-D16 workstation, and wanted to share it with GNU Guix. The configuration has to be generated upstream with pwmconfig (lm-sensors package) and you just have to tell the service where it is for it to work. Change-Id: I120e54cbf849eebd088be2a4d0a0113ffcdfcd84 Signed-off-by: Adrien 'neox' Bourmault --- gnu/services/pm.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm index 3daf484cc1..1b305e76a6 100644 --- a/gnu/services/pm.scm +++ b/gnu/services/pm.scm @@ -31,7 +31,9 @@ (define-module (gnu services pm) tlp-configuration thermald-configuration - thermald-service-type)) + thermald-service-type + + fancontrol-service-type)) (define (uglify-field-name field-name) (let ((str (symbol->string field-name))) @@ -466,3 +468,31 @@ (define thermald-service-type (default-value (thermald-configuration)) (description "Run thermald, a CPU frequency scaling service that helps prevent overheating."))) + +;;; +;;; fancontrol +;;; +;;; This service implements fan control in conjunction with the tools in the +;;; lm-sensors package (pwmconfig/fancontrol). + +(define (fancontrol-shepherd-service config) + (shepherd-service + (documentation "Run the fancontrol daemon (fancontrol-daemon)." ) + (provision '(fancontrol)) + (requirement '(udev user-processes)) + (start #~(make-forkexec-constructor + (list #$(file-append lm-sensors "/sbin/fancontrol") + #$config) + #:user "root" #:group "root" + #:log-file "/var/log/fancontrol.log")) + (stop #~(make-kill-destructor)))) + +(define fancontrol-service-type + (service-type + (name 'fancontrol) + (description + "Run fancontrol as a daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list fancontrol-shepherd-service)))))) + -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 13:40:30 2024 Received: (at 70845) by debbugs.gnu.org; 9 May 2024 17:40:30 +0000 Received: from localhost ([127.0.0.1]:56474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s57ks-0000GK-IA for submit@debbugs.gnu.org; Thu, 09 May 2024 13:40:30 -0400 Received: from cyberdimension.org ([79.143.250.36]:49136 helo=rockpro64.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s57kp-0000GC-6v for 70845@debbugs.gnu.org; Thu, 09 May 2024 13:40:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=5MKbaQ/M+Jgy9y2 6W8mdtwGFymLF6VqyGS912rY/97c=; h=subject:to:from:date; d=cyberdimension.org; b=OcF8h4BDUANRHpuVNHwRiuhcarGR3aEwKvHgjoaL+uKBsC datZ9pvPOsDWxkkbJq89/FoTWb6HzN/TUF1IIQ+vgp/xnw8Rm4cPAeEoc2ngBIpZ9AA/hM eScOj0OXwGmZ/QjFnJlusByMN5mSBwt7lpQ4lIMmrQAHOrc4mjPkhopP8zZkWNdyFd60wx AD8mpR9cym4ZN80+A037v5R5pcLXsmVIKKzfuGr/hbAf5D8evFT8xOasiO7TN1OdB/SJkN KF1HwPoQ3CqnSXgcxRtAsu0XaePwrIUkD3fW7uYPzohMt0qaiQr2TqonmIDh9hZtUT4BmA CROPiu8AqRaMG1HQ== Received: from primary_laptop (localhost [127.0.0.1]) by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id 054a9da3 for <70845@debbugs.gnu.org>; Thu, 9 May 2024 17:39:58 +0000 (UTC) Date: Thu, 9 May 2024 19:39:56 +0200 From: Denis 'GNUtoo' Carikli To: 70845@debbugs.gnu.org Subject: Re: [PATCH] services: Add fancontrol-service-type Message-ID: <20240509193942.20e6ec8e@primary_laptop> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/uP=3_L6HHKkZBlroZNp3DU9"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70845 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/uP=3_L6HHKkZBlroZNp3DU9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, Thanks a lot for the patch. For the record I'm not a Guix maintainer / committer, and that I didn't look at everything but I spotted something that could be improved: the user has no way to override the lm-sensors package being used. Most services provide a way to do that kind of override, so it would make sense to add that at some point. Denis. --Sig_/uP=3_L6HHKkZBlroZNp3DU9 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmY9CmwACgkQX138wUF3 4mNhFA/7BI7Ov0pp9eAdAJ/Vd/6ulxUFrqRrpuJI5pPNBKl+9sA7NA88MCET6ERh ZKLy4liq25djLrAbWuKGOU5QAuz6+/2gvasKlGifFfQqSgI0MisOTOEXpyvrXdyA QyPEL3Etcccb4ZzRAIUZTMKbcYX9NYp2xwhYpOM0ewae5MTpHYLHxsnDbefwo8xJ 8dgUeqM4lc1xIfrgbTVM0yIFJbfA3vTNGCb/ufqx3hH5fiy3gU/Xki/zWwzIhRhJ qxMMqXSmGTWAhHLSJJ8SLa64UDb5mfK1rVeXkFztaLJXm63Yov370b+zBTMk9W/T iMWVf38mJurgwFx2rB1tZMU9Q6vLzC/xf+eYkHH0YFyoYtI53aLsiKfiUWUYigzC qadluO65cmhRZWMl/u91KZo80dGY51jFSPMagE9vAjN3PPceV2vIEfaFEjBq48F1 P1xGTdO1jreY2M6ynphLro1VgxZgkYTp8OU/oA4VAyOqih5GqA6Ms+6+ZzpWiNJg Fqg5ah8SQHkwzW5qfclh2f8czXHWGsEDrwqGXhDBMwNKa6hvrqfnUM1zpJ1XcGk2 g+0XGBONp8dJv2615mhRRBpnGwq6t18i78zMaogsbiLh3gfd4jOCO6FKv388OkrP KtemqUtwxHWHH8B4dLd5QaZiBuL3wvLxnvWaEGy3U2iwAHZ+bho= =3FAO -----END PGP SIGNATURE----- --Sig_/uP=3_L6HHKkZBlroZNp3DU9-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 15:28:41 2024 Received: (at 70845) by debbugs.gnu.org; 9 May 2024 19:28:41 +0000 Received: from localhost ([127.0.0.1]:40816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s59RZ-0000ez-6e for submit@debbugs.gnu.org; Thu, 09 May 2024 15:28:41 -0400 Received: from leparc.libre-en-communs.org ([80.67.176.33]:60024 helo=a-lec.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s59RV-0000et-6Y for 70845@debbugs.gnu.org; Thu, 09 May 2024 15:28:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a-lec.org; s=mail; t=1715282885; bh=1Nf8Dir+wXrgGgSsNZ/ZwFt4sQBi7DiaWK+z00Hd+F8=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=RPpsw3Do3PdqqPoWAz6qCKLU6sRiUCEBzlgFgBWtUcne1/X6ooXoUfYBaaggbHo2i Szx4xkgv1BWkl6YxWWWzDVW0mdXvC9t3zEiVys3yZhOewtTybzK4hatMVpUzQy1Ima LmJpNMzSjsw7pJjP6MpC6ygWE5m5kVqJIUP6GGx7raDqLW6cLNO2cqjYBHmmg9L3EK pEkxcVV5wZsWngUQ03Dws7CE/ZXcMQBHXD+5oxXXy7rUWYB07gV6VFmGTNxwGPWicY wZf5wkUNWK5FjZh4o9uqs9MOU0VEhb/4YRhYdi5gN7qLr2uA8vWj0IdVWx1jVi3w3j fr7jwfV3myxqw== Received: from n-guix-fix-2.home (2a01cb0803b54e0031dab61d4c18e856.ipv6.abo.wanadoo.fr [IPv6:2a01:cb08:3b5:4e00:31da:b61d:4c18:e856]) (Authenticated sender: neox) by mail.a-lec.org (Postfix) with ESMTPSA id D40AB8095E; Thu, 9 May 2024 21:28:05 +0200 (CEST) Message-ID: Subject: Re: [PATCH] services: Add fancontrol-service-type From: Adrien 'neox' Bourmault To: 70845@debbugs.gnu.org In-Reply-To: <20240509193942.20e6ec8e@primary_laptop> References: <20240509193942.20e6ec8e@primary_laptop> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-fgR0EYVxCEf0ZgUh2cvn" Date: Thu, 09 May 2024 21:28:02 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 70845 Cc: Denis 'GNUtoo' Carikli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-fgR0EYVxCEf0ZgUh2cvn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le jeudi 09 mai 2024 =C3=A0 19:39 +0200, Denis 'GNUtoo' Carikli a =C3=A9cri= t=C2=A0: > Hi, >=20 > Thanks a lot for the patch. >=20 > For the record I'm not a Guix maintainer / committer, and that I > didn't look at everything but I spotted something that could be > improved: the user has no way to override the lm-sensors package being > used. >=20 > Most services provide a way to do that kind of override, so it would > make sense to add that at some point. >=20 > Denis. Hi and thanks for you feedback. Not every service I saw allows such overrid= e, but it seems indeed a good idea. However, it would complicate a bit this pa= tch as it would require to create a proper configuration type for the service a= nd I also did not dig into that (did not have much time). Someone else might be = able to do it. Happy hacking! --=20 Adrien Bourmault Maintainer, GNU Boot project Associate member, Free Software Foundation GPG : 393D4CC68136F39799DA75F295F65F55F682A17A --=-fgR0EYVxCEf0ZgUh2cvn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ5PUzGgTbzl5nadfKV9l9V9oKhegUCZj0jvQAKCRCV9l9V9oKh emnAAQCKZsuPXxvAHUTyOasO6pPsABwyWiIk1oiyrxN5mK4i3wD+OlXilD4SYdjW yV3V4L+9DyUYsbh+Zmz+EZtelQ5SQwk= =OUk2 -----END PGP SIGNATURE----- --=-fgR0EYVxCEf0ZgUh2cvn-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 15:32:53 2024 Received: (at 70845) by debbugs.gnu.org; 9 May 2024 19:32:53 +0000 Received: from localhost ([127.0.0.1]:40821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s59Vc-0000iU-RU for submit@debbugs.gnu.org; Thu, 09 May 2024 15:32:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s59VY-0000iM-Bs for 70845@debbugs.gnu.org; Thu, 09 May 2024 15:32:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s59TO-0000tR-4H; Thu, 09 May 2024 15:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:To:From: Subject; bh=4GWXK46DKkPpfKxVF5e3d8+Anf5i+1a6vW9DraMfkX4=; b=Cn9PJq0hSBAvxML6n XpFkqH2TjgTfNa6RMUurae9cIcJn/RNJRp4uSDz7GEA78BxgcI2DOfHeUgeFvJZxa0Zc9ps3pZZwY tK4V9XHqOrUcuZ8/liOLir3Rdd4Vm6yMTb0Vxn7T103XbpKjEqQzIwwLmSRW0Kytuv47DbU+/PBi7 61XJ1ttaiYntOpLKWtlMPt/7tDqA0pnRcqGg880i9hW9BiLHrrGBt2ebl56WItilWsIv84mq83MwH 7MDuapt3/hdAx7aVqP9vKxM4nmP9GzBttUKJFVZ5HXuoAQ2HC9px33QZezStVVJElurJYm/RN5yRY 6t/5iL80wdhNRsr1w==; Message-ID: <452c2d78e57c54b313decb40dbfeb59315e63131.camel@gnu.org> Subject: Re: [PATCH] services: Add fancontrol-service-type From: Adrien 'neox' Bourmault To: 70845@debbugs.gnu.org In-Reply-To: <20240509193942.20e6ec8e@primary_laptop> References: <20240509193942.20e6ec8e@primary_laptop> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-BOpegENNGiY7Hto99fsU" Date: Thu, 09 May 2024 21:30:10 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70845 Cc: Denis 'GNUtoo' Carikli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-BOpegENNGiY7Hto99fsU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le jeudi 09 mai 2024 =C3=A0 19:39 +0200, Denis 'GNUtoo' Carikli a =C3=A9cri= t=C2=A0: > Hi, >=20 > Thanks a lot for the patch. >=20 > For the record I'm not a Guix maintainer / committer, and that I > didn't look at everything but I spotted something that could be > improved: the user has no way to override the lm-sensors package being > used. >=20 > Most services provide a way to do that kind of override, so it would > make sense to add that at some point. >=20 > Denis. Hi and thanks for you feedback. Not every service I saw allows such overrid= e, but it seems indeed a good idea. However, it would complicate a bit this pa= tch as it would require to create a proper configuration type for the service a= nd I also did not dig into that (did not have much time). Someone else might be = able to do it. Happy hacking! --=20 Adrien Bourmault Maintainer, GNU Boot project Associate member, Free Software Foundation GPG : 393D4CC68136F39799DA75F295F65F55F682A17A --=-BOpegENNGiY7Hto99fsU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ5PUzGgTbzl5nadfKV9l9V9oKhegUCZj0kQgAKCRCV9l9V9oKh ei1/AP9xElgZxK2ktrKwcNtCS8z6vMU5qbgzlgxkInkfgJYX5gD/Vn7Vq3dAtRgU 6DTfn76VNp0b6ozu+Bvr2Nd4yRtrjg8= =lBEY -----END PGP SIGNATURE----- --=-BOpegENNGiY7Hto99fsU-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 12 11:17:59 2024 Received: (at 70845) by debbugs.gnu.org; 12 May 2024 15:17:59 +0000 Received: from localhost ([127.0.0.1]:54931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6Axb-0001xX-8n for submit@debbugs.gnu.org; Sun, 12 May 2024 11:17:59 -0400 Received: from cyberdimension.org ([79.143.250.36]:41680 helo=rockpro64.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6AxZ-0001xR-4T for 70845@debbugs.gnu.org; Sun, 12 May 2024 11:17:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=dM/JO5sOUVDU3aU e3jw3kiEC6jEdE5QW8njgpEFlQmU=; h=references:in-reply-to:subject:cc:to: from:date; d=cyberdimension.org; b=MKcFDA6OXrCgyPr3ruWghB9mIKJcyginDcw e6W8Y2tF65nf56nVVsm5+JHcL0vWQVv/rVYfXgSI22fa8enon1QJsjE/VIViRuV3pWi7+p 5WZV1JscF8etExt0hwGnoUkxWCQKBardT55cjoso3kup/bqLuk2fEaqrC0xZ+zShPRwNCO hsxBbp3j5Hhf6U2kuir5rHa7KlZ/OZr/3hlJgG4DqGrTMOeY3oCXEJn+qEtNjmGNAGZGC8 5ybTKFy38jsTd0f6PGs5V/WpaFDNIUAbIKjOpxobYiA5LHeCcMgandtuGy0pBzevM9WuLY +Xo2FviSHsoaNNpWNvhUfqEvRnA== Received: from primary_laptop (localhost [127.0.0.1]) by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id c2eefa22; Sun, 12 May 2024 15:17:56 +0000 (UTC) Date: Sun, 12 May 2024 17:17:49 +0200 From: Denis 'GNUtoo' Carikli To: Adrien 'neox' Bourmault Subject: Re: [PATCH] services: Add fancontrol-service-type Message-ID: <20240512171749.201e713a@primary_laptop> In-Reply-To: <452c2d78e57c54b313decb40dbfeb59315e63131.camel@gnu.org> References: <20240509193942.20e6ec8e@primary_laptop> <452c2d78e57c54b313decb40dbfeb59315e63131.camel@gnu.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/+SiB0n2vaCi8zkL.H1.n4V3"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70845 Cc: 70845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/+SiB0n2vaCi8zkL.H1.n4V3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi again, While looking at the patches I interacted with on issues.guix.gnu.org, I noticed a small issue: the commit message summary lacks a dot at the end. Denis. --Sig_/+SiB0n2vaCi8zkL.H1.n4V3 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmZA3Z4ACgkQX138wUF3 4mOzNQ/9F9jjSF16u/UKXwCF1xrF19664jw5n7M736CTi9hgE7Hb0XeAWXnfz5oh ydYFAmKDr8RUKR7YMP+lMCNrYRvIbUCzS8GtxRk9cxJhF774jWeg1qlHp/T4aesc yf5yAfDSvdBQ1LmH6P0yKN2umSBsc5NRKstkcG1y0nCRS9IBOe0sAV6tp5PwJm5X ZOPuwl0X+tokqXbAFZdKgPHBP873YeUdPDJUOTUGYE04mSkX+frYl4HlwQ+gg5QK UEBO1zC8o66aEDJGP+2BHZ/sv7EDWCHSfPcOoj8gPqYxAs6klBb0GYghtdEqTVKS DTMJaI9HapSWgmGi5AujyBd8Vk0pJlt+0Clk1VwbM2kxVo+dMiZOHXRQK0FrcUeR X+tDS/1xxLaWr6W9eegqWbUcTHUl/GWefzClm/4bK9agMehznV0RLkwG3AH/BXIQ RVVypNVM2/MvHusK0jgwMEXZSBdiLgLR71k1s30YHaXQS6xeuBgFA+Iz6be7CLKJ kmtIhI1rfpJF1pylNODlwQYmeQKMjKlopquffzoK6oeYGl04OScuph3NlKsL6S1D wwx293qwiMHH5Ttp3ejckwJRwkGry9Q/xltmHr2KCSuzVhZiprrCjZB72yHbADLg NTxzLbrlTZhAfvoKtnVGimjds3qFXfvzUSIooCD9BauYLpsQUw8= =NWiu -----END PGP SIGNATURE----- --Sig_/+SiB0n2vaCi8zkL.H1.n4V3-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 13 10:07:30 2024 Received: (at 70845) by debbugs.gnu.org; 13 May 2024 14:07:30 +0000 Received: from localhost ([127.0.0.1]:32940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6WKw-00024T-7r for submit@debbugs.gnu.org; Mon, 13 May 2024 10:07:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6WKq-00024N-Nw for 70845@debbugs.gnu.org; Mon, 13 May 2024 10:07:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6WKj-00066k-CI; Mon, 13 May 2024 10:07:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=uX0RU2AC0fsfPWwNET6lxAmgFmGuToW45xDxFWvzSXs=; b=I866xYzAPangDR qYmZX+934nOp0SUDXl/JUhOfJ0/TsbE4hFtAOMIGRv9TqZruKB5l/fLrx6YT395umHXocmif9/se6 TVH47oYpAhd4uGnFiggmmljAJlF9UesJHopZlQAZr1h8kkXHQcG7hZnIxjq4gn2eyP/hq+Qq1tHKQ /SZwftHx1EFA9WiY6odnpKMLStqcE63UAaGQMXSle7DiebDJ8jRAYlf5jo1Gq5D1ueDvNIfm+bEik 2SVXWxXExS5is14hU04U4zYl41MIo41zEDW2pCfDU1m8ZRa3v4SJHKcdA7x5uUxcXGHUi68mpRHWO RiOITcxF9LlwOS5AoG0Q==; From: Adrien 'neox' Bourmault To: 70845@debbugs.gnu.org Subject: [PATCH v2] services: Add fancontrol-service-type. Date: Mon, 13 May 2024 16:06:27 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70845 Cc: Adrien 'neox' Bourmault X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! I've created a fancontrol service for my own use on a KGPE-D16 workstation, and wanted to share it with GNU Guix. The configuration has to be generated upstream with pwmconfig (lm-sensors package) and you just have to tell the service where it is for it to work. This is the second version of this patch, fixing the lack of copyright notice and dot at the end of the commit message. Change-Id: I120e54cbf849eebd088be2a4d0a0113ffcdfcd84 Signed-off-by: Adrien 'neox' Bourmault --- gnu/services/pm.scm | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm index 3daf484cc1..2196673875 100644 --- a/gnu/services/pm.scm +++ b/gnu/services/pm.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2024 Adrien 'neox' Bourmault ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,7 +32,9 @@ (define-module (gnu services pm) tlp-configuration thermald-configuration - thermald-service-type)) + thermald-service-type + + fancontrol-service-type)) (define (uglify-field-name field-name) (let ((str (symbol->string field-name))) @@ -466,3 +469,31 @@ (define thermald-service-type (default-value (thermald-configuration)) (description "Run thermald, a CPU frequency scaling service that helps prevent overheating."))) + +;;; +;;; fancontrol +;;; +;;; This service implements fan control in conjunction with the tools in the +;;; lm-sensors package (pwmconfig/fancontrol). + +(define (fancontrol-shepherd-service config) + (shepherd-service + (documentation "Run the fancontrol daemon (fancontrol-daemon)." ) + (provision '(fancontrol)) + (requirement '(udev user-processes)) + (start #~(make-forkexec-constructor + (list #$(file-append lm-sensors "/sbin/fancontrol") + #$config) + #:user "root" #:group "root" + #:log-file "/var/log/fancontrol.log")) + (stop #~(make-kill-destructor)))) + +(define fancontrol-service-type + (service-type + (name 'fancontrol) + (description + "Run fancontrol as a daemon.") + (extensions + (list (service-extension shepherd-root-service-type + (compose list fancontrol-shepherd-service)))))) + base-commit: 7b0f145802f0c2c785014293d748721678fef824 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 18:17:20 2024 Received: (at 70845) by debbugs.gnu.org; 15 May 2024 22:17:20 +0000 Received: from localhost ([127.0.0.1]:44769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Mw4-000088-Gt for submit@debbugs.gnu.org; Wed, 15 May 2024 18:17:20 -0400 Received: from out-180.mta1.migadu.com ([95.215.58.180]:30352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Mw1-000080-Te for 70845@debbugs.gnu.org; Wed, 15 May 2024 18:17:18 -0400 Date: Wed, 15 May 2024 18:16:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=incana.org; s=key1; t=1715811400; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=2xyBmLigYL9+90rWS4yBR/iEERQPw6qZKKcGRWH1Xg4=; b=p99e0DJ3PZxJ0PoZyI8OqAnTFNbbsAB9EW1JvNXWNrb3fpwzBb3h8fHXNZupq5Fkr9H1KP Sd4oQYeIhTtx4JTQ0XQ28LxWF3nJgVqr+L7f4yehhsHEdJrM91VydzRogVWpXc54PjMI8I jq0PsA8IwfmYWJY4F/7G2Nr8Pdh95RDE3TsH5pTTNX5qq1b8DTs16lHZMfmBgEISEEd7o4 8/J80b6D+Nkedp2E4nPWRbUqE0EI3y892Ltwn5c8vI98oO28qgEemyyDo5UOwbFTBCk3ZM tCZTog2YUrfn8hrtB0tGXKOwJF8292HcGtATCIdx6LJQzngQTpyy5OdZBPLzfw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Juliana Sims Subject: Re: [PATCH v2] services: Add fancontrol-service-type. To: neox@gnu.org Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70845 Cc: 70845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: b8ea66dd0b5edd9e8d345a0beda3198049ab6231.1715609187.git.neox@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Adrien, Thanks for this patch! It looks pretty good, though I do have a few small bits of feedback. First and foremost, this service needs documentation. Could you add that as well? Speaking of documentation, the 'documentation' field of your Shepherd service has an extraneous bit of whitespace. Is it absolutely vital to use root for this service? Could you instead create a user and usergroup with only the privileges required to run fancontrol? You may need to do something with udev so that works. I'm not sure exactly what privileges are required, but avoiding root seems like a good idea. That's the only real critique I have here. Consider the rest of this email fun ideas rather than review per se :) We had an out-of-band exchange about this patch that I'll summarize here for the record. I echoed the sentiments of the reviewer who suggested exposing the fancontrol package so that users could change it. Your response was that the configuration is generated by pwmconfig and therefore it wouldn't make sense to provide a Scheme interface to configuration. I don't know this package or how it works, but would it be possible for this service to generate that config automatically when it's first started? If the config is customizable about generation, you could then expose various settings through the Guix service interface for users to modify and rewrite the file for them. That would make using define-configuration worthwhile for more than simply the ability to change the package. All that aside, you should be able to expose the package setting to users without using define-configuration. Best, Juli From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 05:28:20 2024 Received: (at 70845) by debbugs.gnu.org; 16 May 2024 09:28:20 +0000 Received: from localhost ([127.0.0.1]:47690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7XPQ-0000h5-0w for submit@debbugs.gnu.org; Thu, 16 May 2024 05:28:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7XPO-0000go-Gl for 70845@debbugs.gnu.org; Thu, 16 May 2024 05:28:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7XPF-0002v0-4r; Thu, 16 May 2024 05:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:To:From: Subject; bh=uKcphVikyNow4yZGuNO/3pOoHw3mzlzI8xGGxNmfpXY=; b=bwTnq6pi9dpPMevuB DqZsts9tYfx1x40uF+89z/aWTMyAecDcPtbUsRNnzQ4sl80Zi4Qd79T/EayoRa3uCUyvn7fN8nhVp bvVd2u9PrXiwoG/dd1QUG99NZF0eh6nHqW7f2UYO589uWSrD2q1juPW5Q726h84cjEi7tpcBTutgB +z48osv/X0nl3ANh9iqOMPGCIUkg2EKhsGrplqrebHoBgrUVsi13W9sySjcYVRJgg1pYUIT13j9J7 SftuFKbcqk+EWz+kXigjn37HwCh9oLhjmEll9wORCANrMY24mA6aB5qNI01Kioy+f++zvjpHV8kHZ ObxH2+QZ77JZCwq1Q==; Message-ID: <3c931f339af9e0fbe0ea2110cb253e95a70d972e.camel@gnu.org> Subject: Re: [PATCH v2] services: Add fancontrol-service-type. From: Adrien 'neox' Bourmault To: 70845@debbugs.gnu.org In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-fcv8QdUWSLhJJUEY758t" Date: Thu, 16 May 2024 11:27:42 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70845 Cc: Juliana Sims X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-fcv8QdUWSLhJJUEY758t Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mercredi 15 mai 2024 =C3=A0 18:16 -0400, Juliana Sims a =C3=A9crit=C2=A0= : > Hi Adrien, Hi Juliana and thanks a lot for your review. I'm now working on a v3 ;) > First and foremost, this service needs documentation. Could you add=20 > that as well? Speaking of documentation, the 'documentation' field of=20 > your Shepherd service has an extraneous bit of whitespace. Ok, seems sensible to do, I'm working on it and fixing the whitespace issue= . >=20 > Is it absolutely vital to use root for this service? Could you instead= =20 > create a user and usergroup with only the privileges required to run=20 > fancontrol? You may need to do something with udev so that works. I'm=20 > not sure exactly what privileges are required, but avoiding root seems= =20 > like a good idea. I don't actually know if this is vital, but it was the only way to make it = work properly. I did not think about udev though, so I'll try to test things. I = agree that avoiding root is a good idea. > I don't know this package or how it works, but would it be possible for= =20 > this service to generate that config automatically when it's first=20 > started? If the config is customizable about generation, you could then= =20 > expose various settings through the Guix service interface for users to= =20 > modify and rewrite the file for them. That would make using=20 > define-configuration worthwhile for more than simply the ability to=20 > change the package. Okay, perhaps more details are needed then. The fancontrol software is made= to control the speed of the fans (CPU heatsinks for example) based on a configuration that is proper to the fans and that depends on many physical parameters that might include, sometimes, the environment where the compute= r is used. This configuration has to be generated with the pmwconfig software, w= hich will ask questions to the users (for example "Should we check I2C bus?" or = "Did you hear a fan stopping?"). Since the configuration process is both critica= l and interactive, it appears difficult to me to do that automatically. One more = thing is that users should recreate a configuration when the use environment has changed. >=20 > All that aside, you should be able to expose the package setting to=20 > users without using define-configuration. Ok, thanks for the information. I'll work on that. Have a nice day everyone and happy hacking! --=20 Adrien Bourmault Maintainer, GNU Boot project Associate member, Free Software Foundation GPG : 393D4CC68136F39799DA75F295F65F55F682A17A --=-fcv8QdUWSLhJJUEY758t Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ5PUzGgTbzl5nadfKV9l9V9oKhegUCZkXRjQAKCRCV9l9V9oKh ekNgAP9B9cPpTGsFdWDdto6YMMZBjH+rHtr+YgGLs5qBurUciwD7B20iSTpIvojB on2hHvjkngazIGKvMcvt4Hy783LzigE= =SMTk -----END PGP SIGNATURE----- --=-fcv8QdUWSLhJJUEY758t--