distribution/packages/jelos/profile.d/99-freqfunctions
fewtarius 4fa454a9f6
* Drop RetroArch LAKKA mode.
* Only put the big cores in max performance mode.
* Clean up build_distro a bit.
2022-02-26 22:14:27 -05:00

35 lines
580 B
Bash

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/os-release
set_gov() {
for POLICY in ${CPU_FREQ[@]}
do
if [ "${POLICY}" = "${NO_MAX_PERF}" ] && [ "$1" = "performance" ]
then
continue
else
echo $1 >${POLICY} 2>/dev/null
fi
done
for HANDLE in ${GPU_FREQ} ${DMC_FREQ}
do
echo $1 >${HANDLE} 2>/dev/null || echo dmc_$1 >${HANDLE} 2>/dev/null
done
}
maxperf() {
set_gov performance
}
normperf() {
set_gov ondemand
}
powersave() {
set_gov powersave
}