arc: remove dependencies for cpufreqscaling

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-26 11:36:56 +02:00
parent bb8c74e9ac
commit 877feba5cb
2 changed files with 4 additions and 8 deletions

View File

@ -53,8 +53,6 @@ function addonSelection() {
continue
elif [ "${ADDON}" == "codecpatch" ] && [ -n "${ARCCONF}" ]; then
continue
elif [ "${ADDON}" == "cpufreqscaling" ] && [[ "${CPUFREQ}" == "false" || "${ACPISYS}" == "false" ]] ; then
continue
else
echo -e "${ADDON} \"${DESC}\" ${ACT}" >>"${TMP_PATH}/opts"
fi

View File

@ -527,19 +527,17 @@ function arcSettings() {
[ $? -ne 0 ] && return 1
fi
# Check for CPU Frequency Scaling & Governor
if [ "${ARCMODE}" == "config" ] && [ "${CPUFREQ}" == "true" ] && [ "${ACPISYS}" == "true" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
if [ "${ARCMODE}" == "config" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
dialog --backtitle "$(backtitle)" --colors --title "CPU Frequency Scaling" \
--infobox "Generating Governor Table..." 3 40
governorSelection
[ $? -ne 0 ] && return 1
elif [ "${ARCMODE}" == "automated" ] && [ "${CPUFREQ}" == "true" ] && [ "${ACPISYS}" == "true" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
elif [ "${ARCMODE}" == "automated" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
if [ "${PLATFORM}" == "epyc7002" ]; then
writeConfigKey "addons.cpufreqscaling" "schedutil" "${USER_CONFIG_FILE}"
else
writeConfigKey "addons.cpufreqscaling" "conservative" "${USER_CONFIG_FILE}"
fi
else
deleteConfigKey "addons.cpufreqscaling" "${USER_CONFIG_FILE}"
fi
if [ "${ARCMODE}" == "config" ]; then
# Check for DT and HBA/Raid Controller
@ -566,9 +564,9 @@ function arcSettings() {
--msgbox "WARN: Your System doesn't support Hardwareencryption in DSM. (AES)" 5 70
fi
# Check for CPUFREQ
if [[ "${CPUFREQ}" == "false" || "${ACPISYS}" == "false" ]]; then
if [[ "${CPUFREQ}" == "false" || "${ACPISYS}" == "false" ]] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
dialog --backtitle "$(backtitle)" --title "Arc Warning" \
--msgbox "WARN: Your System doesn't support CPU Frequency Scaling in DSM." 5 70
--msgbox "WARN: It is possible that CPU Frequency Scaling is not working properly with your System." 6 80
fi
fi
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"