distribution/packages/hardware/quirks/platforms/RK3566/sleep.d/pre/002-freq

20 lines
570 B
Text
Raw Normal View History

#!/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 ${CPU_FREQ}/scaling_governor)"
CUR_GPU_FREQ="$(cat ${GPU_FREQ}/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