From 3090d9e949eca74cd2798267ac2f994c2efa4c51 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Wed, 24 May 2023 14:19:26 +0200 Subject: Add gentoo ebuild --- gentoo/files/cputemp2maxfreq.conf | 8 ++++++++ gentoo/files/cputemp2maxfreq.init | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gentoo/files/cputemp2maxfreq.conf create mode 100755 gentoo/files/cputemp2maxfreq.init (limited to 'gentoo/files') diff --git a/gentoo/files/cputemp2maxfreq.conf b/gentoo/files/cputemp2maxfreq.conf new file mode 100644 index 0000000..48088ec --- /dev/null +++ b/gentoo/files/cputemp2maxfreq.conf @@ -0,0 +1,8 @@ +# Logging mechanism to use, options are: none, stdout, kmsg,syslog +LOGGER="syslog" + +# Target CPU temperature, frequency will scale down above this temperature +TEMPERATURE=70 + +# Other arguments to pass to the daemon, see cputemp2maxfreq for options +OTHER="" diff --git a/gentoo/files/cputemp2maxfreq.init b/gentoo/files/cputemp2maxfreq.init new file mode 100755 index 0000000..83a3798 --- /dev/null +++ b/gentoo/files/cputemp2maxfreq.init @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="cputemp2maxfreq daemon" +description="Daemon to scale scale_max_freq when CPU temperature rises" +command=/usr/sbin/cputemp2maxfreq +command_args="-l $LOGGER -t $TEMPERATURE $ARGS" + +start() { + ebegin "Starting $NAME" + start-stop-daemon --start --background \ + --make-pidfile --pidfile /var/run/cputemp2maxfreq.pid \ + --exec ${command} -- ${command_args} + eend $? +} + -- cgit v1.2.3