#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) # Store current freq governors and set governors to powersave. . /etc/profile ### Get the current cpu and gpu governor, save for when the device wakes from sleep. CUR_CPU_FREQ="$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)" CUR_GPU_FREQ="$(cat /sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu/governor)" set_setting sleep.cpugovernor "${CUR_CPU_FREQ}" set_setting sleep.gpugovernor "${CUR_GPU_FREQ}" ### Set all governors to powersave set_cpu_gov powersave set_dmc_gov powersave set_gpu_gov powersave