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