distribution/packages/hardware/quirks/platforms/RK3566/sleep.d/post/002-freq
fewtarius 788a398aab
* Add support for changing the merged storage target between the internal and external card.
* Since JELOS creates the games directory structure it is possible that the overlay will hide games if you switch targets as it will consider them removed.  Delete the empty directories and reboot to resolve.
    * Ex: find /storage/games-internal -type d -empty -delete && find /storage/games-external -type d -empty -delete && reboot
  * Merged storage can now be disabled persistently.
  * A new directory structure is required to enable switching:
    * /storage/games-internal/roms
    * /storage/games-external/roms
    * The target /storage/roms has not changed.
* Lowers clocks to powersave for RK3566 devices.
2023-12-03 13:04:06 +00:00

23 lines
561 B
Bash

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
### Restore previous governors before going to sleep
. /etc/profile
### Grab the old governors.
OLD_CPU_FREQ=$(get_setting "sleep.cpugovernor")
if [ ! -n "${OLD_CPU_FREQ}" ]; then
OLD_CPU_FREQ="schedutil"
fi
OLD_GPU_FREQ=$(get_setting "sleep.gpugovernor")
if [ ! -n "${OLD_GPU_FREQ}" ]; then
OLD_GPU_FREQ="simple_ondemand"
fi
# Restore old governors.
set_cpu_gov "${OLD_CPU_FREQ}"
set_dmc_gov "${OLD_CPU_FREQ}"
set_gpu_gov "${OLD_GPU_FREQ}"