Add a guard to set_epp so it isn't executed on devices that don't have it available.

This commit is contained in:
fewtarius 2023-12-30 21:02:14 +00:00
parent 318133d0fa
commit 444bfdbab6
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -336,11 +336,14 @@ case ${CPU_VENDOR} in
esac
### Apply energy performance preference
EPP=$(get_setting "power.epp" "${PLATFORM}" "${ROMNAME##*/}")
if [ ! -z ${EPP} ]
if [ -e "/usr/bin/set_epp" ]
then
${VERBOSE} && log $0 "Set EPP to (${EPP})"
/usr/bin/set_epp ${EPP}
EPP=$(get_setting "power.epp" "${PLATFORM}" "${ROMNAME##*/}")
if [ ! -z ${EPP} ]
then
${VERBOSE} && log $0 "Set EPP to (${EPP})"
/usr/bin/set_epp ${EPP}
fi
fi
### Configure GPU performance mode