Fix default governor override on 5.9+

345b28cbf497d25018e89ec96c058f464d51a6f6 broke having INTEL_PSTATE enabled with a different governor than schedutil, so we need to pass it to command line instead.
This commit is contained in:
Tk-Glitch 2020-11-22 21:00:35 +01:00
parent 55fd339eba
commit 4246914049
2 changed files with 16 additions and 7 deletions

View File

@ -48,7 +48,7 @@ else
fi
pkgname=("${pkgbase}" "${pkgbase}-headers")
pkgver="${_basekernel}"."${_sub}"
pkgrel=95
pkgrel=96
pkgdesc='Linux-tkg'
arch=('x86_64') # no i686 in here
url="http://www.kernel.org/"

View File

@ -890,12 +890,21 @@ _tkg_srcprep() {
fi
# default cpu gov
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
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"
fi
msg2 "Command line set to \"$_custom_commandline\""
fi
# ACPI_CPUFREQ disablement