cpufreq: intel_pstate: Add DMI quirk for Dell Inspiron systems
Subsystems (2)
PATCH 1/1 cpufreq: intel_pstate: Add DMI quirk for Dell Inspiron systems
Some Dell Inspiron systems experience frequency scaling issues with intel_pstate driver where the CPU gets locked at 900MHz after load.
Add DMI quirk table to detect affected Dell Inspiron models and prevent intel_pstate from loading, allowing acpi-cpufreq to handle frequency scaling instead.
Affected models:
- Dell Inspiron 15 7000 Gaming
- Dell Inspiron 7567
- Dell Inspiron 7559
--- drivers/cpufreq/intel_pstate.c | 65 ++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 23 deletions(-)
drivers/cpufreq/intel_pstate.c +42 -23
@@ -28,7 +28,6 @@#include <linux/pm_qos.h> #include <linux/bitfield.h> #include <trace/events/power.h> -#include <linux/dmi.h> #include <linux/units.h> #include <asm/cpu.h>
@@ -48,6 +47,7 @@#ifdef CONFIG_ACPI #include <acpi/processor.h> #include <acpi/cppc_acpi.h> +#include <linux/dmi.h> #endif #define FRAC_BITS 8
@@ -299,25 +299,6 @@ struct pstate_funcs {static struct pstate_funcs pstate_funcs__read_mostly ; -/* DMI quirk table for systems that should prefer acpi-cpufreq over intel_pstate */ -static int intel_pstate_prefer_acpi_cpufreq (const struct dmi_system_id *id) -{ -pr_info ("Preferring acpi-cpufreq for %s due to performance issues with intel_pstate\n" , - id->ident); -return 1 ; -} - -static const struct dmi_system_id intel_pstate_acpi_cpufreq_prefer[] = { - { - .callback = intel_pstate_prefer_acpi_cpufreq, - .ident ="Dell Inspiron 15 7000 Gaming" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"Inspiron 15 7000 Gaming" ), - }, - }, - { } -};static bool hwp_active__ro_after_init ;static int hwp_mode_bdw__ro_after_init ;static bool per_cpu_limits__ro_after_init ;
@@ -2799,6 +2780,41 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { };MODULE_DEVICE_TABLE (x86cpu, intel_pstate_cpu_ids); +/* DMI quirk table for systems that should prefer acpi-cpufreq over intel_pstate */ +static int intel_pstate_prefer_acpi_cpufreq (const struct dmi_system_id *id) +{ +pr_info ("Detected %s, preferring acpi-cpufreq\n" , id->ident); +return 0 ; +} + +static const struct dmi_system_id intel_pstate_acpi_cpufreq_prefer[] = { + { + .ident ="Dell Inspiron 15 7000 Gaming" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Inspiron 15 7000 Gaming" ), + }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + { + .ident ="Dell Inspiron 7567" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Inspiron 7567" ), + }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + { + .ident ="Dell Inspiron 7559" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Inspiron 7559" ), + }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + {} +}; +#ifdef CONFIG_ACPI static const struct x86_cpu_id intel_pstate_cpu_oob_ids[]__initconst = { X86_MATCH(INTEL_BROADWELL_D, core_funcs),
@@ -3825,6 +3841,12 @@ static int __init intel_pstate_init(void)const struct x86_cpu_id *id;int rc; + +/* Early DMI check - prevent intel_pstate on problematic systems */ +if (dmi_check_system (intel_pstate_acpi_cpufreq_prefer)) { +pr_info ("intel_pstate: system prefers acpi-cpufreq, not loading\n" ); +return -ENODEV ; + }if (boot_cpu_data.x86_vendor !=X86_VENDOR_INTEL )return -ENODEV ;
@@ -3887,9 +3909,6 @@ static int __init intel_pstate_init(void)pr_info ("Invalid MSRs\n" );return -ENODEV ; } -/* Check for systems that should prefer acpi-cpufreq */ -if (!default_driver &&dmi_check_system (intel_pstate_acpi_cpufreq_prefer)) - default_driver = &intel_cpufreq;/* Without HWP start in the passive mode. */ if (!default_driver) default_driver = &intel_cpufreq;
Signature · 1 line
2.48.1
srinivas pandruvada
maintainerQuoted 7 lines · Joe Walter
Some Dell Inspiron systems experience frequency scaling issues with
intel_pstatedriver where the CPU gets locked at 900MHz after load.Add DMI quirk table to detect affected Dell Inspiron models and prevent
intel_pstatefrom loading, allowing acpi-cpufreq to handle frequency scaling instead.
This is the first time in 10+ years a quirk using DMI..
Quoted 5 lines
Affected models:
- Dell Inspiron 15 7000 Gaming
- Dell Inspiron 7567
- Dell Inspiron 7559
I think these all are using KabyLake CPU models around 2017.
Do you have turbostat logs to see why it is dropping to 900 MHz? If not please attach. Most of such drops usually triggered by power/thermal limits. We have to check the power limit settings.
Try with a different EPP settings instead of default by using /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference
Also try:
echo passive > /sys/devices/system/cpu/intel_pstate/status
Thanks,
Srinivas
Quoted 137 lines
Tested-by Joe Walter <[email protected]>Signed-off-by Joe Walter <[email protected]>---
drivers/cpufreq/intel_pstate.c | 65 ++++++++++++++++++++++---------- --1 file changed, 42 insertions(+), 23 deletions(-)drivers/cpufreq/intel_pstate.c +0
-1@@ -28,7 +28,6 @@ #include <linux/pm_qos.h> #include <linux/bitfield.h> #include <trace/events/power.h> -#include <linux/dmi.h> #include <linux/units.h>
#include <asm/cpu.h>drivers/cpufreq/intel_pstate.c +1
-0@@ -48,6 +47,7 @@ #ifdef CONFIG_ACPI #include <acpi/processor.h> #include <acpi/cppc_acpi.h> +#include <linux/dmi.h> #endif
#defineFRAC_BITS8drivers/cpufreq/intel_pstate.c +0
-0@@ -299,25 +299,6 @@ struct pstate_funcs {
static structpstate_funcspstate_funcs__read_mostly;
-/* DMI quirk table for systems that should prefer acpi-cpufreq overintel_pstate*/
-static intintel_pstate_prefer_acpi_cpufreq(const struct dmi_system_id *id)drivers/cpufreq/intel_pstate.c +0
-2-{ - pr_info("Preferring acpi-cpufreq for %s due to performanceissues with intel_pstate\n",
drivers/cpufreq/intel_pstate.c +0
-5- id->ident); -return 1 ; -} - -static const struct dmi_system_id intel_pstate_acpi_cpufreq_prefer[]= {
drivers/cpufreq/intel_pstate.c +0
-6- { - .callback = intel_pstate_prefer_acpi_cpufreq, - .ident = "Dell Inspiron 15 7000 Gaming", - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 157000 Gaming"),
drivers/cpufreq/intel_pstate.c +0
-4- }, - }, - { } -};static bool
hwp_active__ro_after_init;
static inthwp_mode_bdw__ro_after_init;
static boolper_cpu_limits__ro_after_init;drivers/cpufreq/intel_pstate.c +0
-0@@ -2799,6 +2780,41 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { }; MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
+/* DMI quirk table for systems that should prefer acpi-cpufreq overintel_pstate*/
+static intintel_pstate_prefer_acpi_cpufreq(const struct dmi_system_id *id)drivers/cpufreq/intel_pstate.c +2
-0+{ + pr_info("Detected %s, preferring acpi-cpufreq\n", id-Quoted 1 line
ident);
drivers/cpufreq/intel_pstate.c +4
-0+return 0 ; +} + +static const struct dmi_system_id intel_pstate_acpi_cpufreq_prefer[]= {
drivers/cpufreq/intel_pstate.c +5
-0+ { + .ident = "Dell Inspiron 15 7000 Gaming", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 157000 Gaming"),
drivers/cpufreq/intel_pstate.c +8
-0+ }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + { + .ident = "Dell Inspiron 7567", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron7567"),
drivers/cpufreq/intel_pstate.c +8
-0+ }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + { + .ident = "Dell Inspiron 7559", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron7559"),
drivers/cpufreq/intel_pstate.c +6
-0+ }, + .callback = intel_pstate_prefer_acpi_cpufreq, + }, + {} +}; +#ifdef
CONFIG_ACPI
static const structx86_cpu_idintel_pstate_cpu_oob_ids[]__initconst= {
X86_MATCH(INTEL_BROADWELL_D, core_funcs),drivers/cpufreq/intel_pstate.c +0
-0@@ -3825,6 +3841,12 @@ static int __init intel_pstate_init(void) const struct x86_cpu_id *id; int rc;drivers/cpufreq/intel_pstate.c +2
-0+ +/* Early DMI check - prevent intel_pstate on problematic systems */
drivers/cpufreq/intel_pstate.c +2
-0+if (dmi_check_system (intel_pstate_acpi_cpufreq_prefer)) { + pr_info("intel_pstate: system prefers acpi-cpufreq,not loading\n");
drivers/cpufreq/intel_pstate.c +2
-0+return -ENODEV ; + }if (boot_cpu_data.x86_vendor !=
X86_VENDOR_INTEL) return-ENODEV;drivers/cpufreq/intel_pstate.c +0
-3@@ -3887,9 +3909,6 @@ static int __init intel_pstate_init(void) pr_info("Invalid MSRs\n"); return -ENODEV; } -/* Check for systems that should prefer acpi-cpufreq */ -if (!default_driver && dmi_check_system(intel_pstate_acpi_cpufreq_prefer)) - default_driver = &intel_cpufreq; /* Without HWP start in the passive mode. */ if (!default_driver)
default_driver=&intel_cpufreq;
Rafael J. Wysocki
maintainerQuoted 52 lines · Joe Walter
Some Dell Inspiron systems experience frequency scaling issues with
intel_pstatedriver where the CPU gets locked at 900MHz after load.Add DMI quirk table to detect affected Dell Inspiron models and prevent
intel_pstatefrom loading, allowing acpi-cpufreq to handle frequency scaling instead.Affected models:
- Dell Inspiron 15 7000 Gaming
- Dell Inspiron 7567
- Dell Inspiron 7559Tested-by Joe Walter <[email protected]>Signed-off-by Joe Walter <[email protected]>--- drivers/cpufreq/intel_pstate.c | 65 ++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 23 deletions(-)drivers/cpufreq/intel_pstate.c +1
-10@@ -28,7 +28,6 @@#include <linux/pm_qos.h> #include <linux/bitfield.h> #include <trace/events/power.h> -#include <linux/dmi.h> #include <linux/units.h> #include <asm/cpu.h> @@ -48,6 +47,7 @@#ifdef CONFIG_ACPI #include <acpi/processor.h> #include <acpi/cppc_acpi.h> +#include <linux/dmi.h> #endif #define FRAC_BITS 8@@ -299,25 +299,6 @@ struct pstate_funcs {static struct pstate_funcs pstate_funcs__read_mostly ; -/* DMI quirk table for systems that should prefer acpi-cpufreq over intel_pstate */ -static int intel_pstate_prefer_acpi_cpufreq (const struct dmi_system_id *id) -{ -pr_info ("Preferring acpi-cpufreq for %s due to performance issues with intel_pstate\n" , - id->ident); -return 1 ; -} - -static const struct dmi_system_id intel_pstate_acpi_cpufreq_prefer[] = {
drivers/cpufreq/intel_pstate.c struct pstate_funcs { · line 320
Quoted 10 lines
drivers/cpufreq/intel_pstate.c +0
-10- { - .callback = intel_pstate_prefer_acpi_cpufreq, - .ident = "Dell Inspiron 15 7000 Gaming", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 15 7000 Gaming"), - }, - }, - { } -};
This isn't a patch against mainline intel_pstate because there are no DMI checks in there.