From f716032523eb9c7ab2fc1509a28a8e688822dd2a Mon Sep 17 00:00:00 2001 From: Eduard Toloza Date: Fri, 15 Mar 2019 23:44:03 -0500 Subject: [PATCH] Update --- system-bin/processor-performance | 8 ++++++++ system-units/enable-processor-performance.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100755 system-bin/processor-performance create mode 100644 system-units/enable-processor-performance.service diff --git a/system-bin/processor-performance b/system-bin/processor-performance new file mode 100755 index 0000000..6a03d94 --- /dev/null +++ b/system-bin/processor-performance @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +if [ "$1" == "start" ]; then + for fgovernor in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo performance > "${fgovernor}"; done + exit +elif [ "$1" == "stop" ]; then + for fgovernor in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo powersave > "${fgovernor}"; done + exit +fi diff --git a/system-units/enable-processor-performance.service b/system-units/enable-processor-performance.service new file mode 100644 index 0000000..c64dc0d --- /dev/null +++ b/system-units/enable-processor-performance.service @@ -0,0 +1,10 @@ +[Unit] +Description=Enable/Disable performance governor in the processor + +[Service] +ExecStart=/usr/bin/processor-performance start +ExecStop=/usr/bin/processor-performance stop +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target