diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index c950f14d..7a092883 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -1117,6 +1117,7 @@ function sysinfo() { fi TEXT+="\n Memory: \Zb$((${RAMTOTAL}))GB\Zn" TEXT+="\n AES | ACPI: \Zb${AESSYS} | ${ACPISYS}\Zn" + TEXT+="\n CPU Scaling: \Zb${CPUFREQ}\Zn" TEXT+="\n Date/Time: \Zb$(date)\Zn" TEXT+="\n" TEXT+="\n\Z4> Network: ${ETHN} NIC\Zn\n" @@ -2060,8 +2061,7 @@ function governorMenu () { function governorSelection () { rm -f "${TMP_PATH}/opts" >/dev/null touch "${TMP_PATH}/opts" - CPUFREQSUPPORT=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) - if [ -n "${CPUFREQSUPPORT}" ] || [ "${ACPISYS}" == "true" ]; then + if [ "${CPUFREQ}" == "true" ]; then # Selectable CPU governors [ "${PLATFORM}" == "epyc7002" ] && echo -e "schedutil \"use schedutil to scale frequency *\"" >>"${TMP_PATH}/opts" [ "${PLATFORM}" != "epyc7002" ] && echo -e "ondemand \"use ondemand to scale frequency *\"" >>"${TMP_PATH}/opts" diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index b35f9a48..1ef93615 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -35,6 +35,11 @@ if ! grep -q "^flags.*acpi.*" /proc/cpuinfo; then else ACPISYS="true" fi +if $(ls -ltr /sys/devices/system/cpu/cpufreq/* 2>/dev/null | wc -l) -gt 0; then + CPUFREQ="true" +else + CPUFREQ="false" +fi # Get Loader Disk Bus BUS=$(getBus "${LOADER_DISK}") @@ -506,7 +511,7 @@ function arcSettings() { fi # Check for Custom Build if [ "${CUSTOM}" == "false" ]; then - if [ "${ACPISYS}" == "true" ]; then + if [ "${CPUFREQ}" == "true" ]; then # Select Governor for DSM dialog --backtitle "$(backtitle)" --colors --title "DSM Frequency Scaling" \ --infobox "Generating Governor Table..." 3 40 @@ -537,10 +542,10 @@ function arcSettings() { dialog --backtitle "$(backtitle)" --title "Arc Warning" \ --msgbox "WARN: Your System doesn't support Hardwareencryption in DSM. (AES)" 5 80 fi - # Check for ACPI - if [ "${ACPISYS}" == "false" ]; then + # Check for CPUFREQ + if [ "${CPUFREQ}" == "false" ]; then dialog --backtitle "$(backtitle)" --title "Arc Warning" \ - --msgbox "WARN: Your System doesn't support CPU Frequency Scaling in DSM. (ACPI)" 5 80 + --msgbox "WARN: Your System doesn't support CPU Freqeuency Scaling in DSM." 5 80 fi fi EMMCBOOT="$(readConfigKey "arc.emmcboot" "${USER_CONFIG_FILE}")" diff --git a/files/initrd/opt/arc/include/compat.sh b/files/initrd/opt/arc/include/compat.sh index 9231dca0..a9287124 100755 --- a/files/initrd/opt/arc/include/compat.sh +++ b/files/initrd/opt/arc/include/compat.sh @@ -7,8 +7,8 @@ function compatboot () { # Remove old Addons - if arrayExistItem "amepatch:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then - deleteConfigKey "addons.amepatch" "${USER_CONFIG_FILE}" + if arrayExistItem "codecpatch:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then + deleteConfigKey "addons.codecpatch" "${USER_CONFIG_FILE}" fi return 0 } \ No newline at end of file