linux510-tkg: Revert upstream patch "cpufreq: Avoid configuring old governors as default with intel_pstate"

This is an undesirable behavior for us since our aggressive ondemand performs better than schedutil for gaming when using intel_pstate in passive mode.
Also it interferes with the option to select the desired default governor we have.

Possible fix for https://github.com/Frogging-Family/linux-tkg/issues/132
This commit is contained in:
Tk-Glitch
2021-02-03 12:51:22 +01:00
parent 2999df9e52
commit e385a94a06
3 changed files with 42 additions and 18 deletions

View File

@@ -501,6 +501,9 @@ _tkg_srcprep() {
echo "CONFIG_CMDLINE=\"${_custom_commandline}\"" >> ./.config
echo "# CONFIG_CMDLINE_OVERRIDE is not set" >> ./.config
echo "# CONFIG_X86_P6_NOP is not set" >> ./.config
#echo "# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set" >> ./.config
echo "# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set" >> ./.config
echo "# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set" >> ./.config
# openrgb
echo "CONFIG_I2C_NCT6775=m" >> ./.config
@@ -846,22 +849,13 @@ _tkg_srcprep() {
fi
# default cpu gov
if [ "$_basever" = "54" ] || [ "$_basever" = "57" ] || [ "$_basever" = "58" ]; then
if [ "$_default_cpu_gov" = "performance" ]; then
sed -i -e 's/CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y/# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set/' ./.config
sed -i -e 's/# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set/CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y/' ./.config
elif [ "$_default_cpu_gov" = "ondemand" ]; then
sed -i -e 's/CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y/# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set/' ./.config
sed -i -e 's/# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set/CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y/' ./.config
fi
else
if [ "$_default_cpu_gov" = "performance" ]; then
_custom_commandline+=" cpufreq.default_governor=performance"
elif [ "$_default_cpu_gov" = "ondemand" ]; then
_custom_commandline+=" cpufreq.default_governor=ondemand"
sed -i -e 's/CONFIG_CPU_FREQ_GOV_ONDEMAND=m/CONFIG_CPU_FREQ_GOV_ONDEMAND=y/' ./.config
fi
msg2 "Command line set to \"$_custom_commandline\""
if [ "$_default_cpu_gov" = "performance" ]; then
sed -i -e 's/CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y/# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set/' ./.config
sed -i -e 's/# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set/CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y/' ./.config
elif [ "$_default_cpu_gov" = "ondemand" ]; then
sed -i -e 's/CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y/# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set/' ./.config
sed -i -e 's/# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set/CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y/' ./.config
sed -i -e 's/CONFIG_CPU_FREQ_GOV_ONDEMAND=m/CONFIG_CPU_FREQ_GOV_ONDEMAND=y/' ./.config
fi
# ACPI_CPUFREQ disablement