Re: [REGRESSION] Intel Turbo Boost stuck disabled on some Clevo machines (was: [PATCH] cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode)

srinivas pandruvada
2025-11-07T01:48:11Z

[-- Attachment #1: Type: text/plain, Size: 6120 bytes --]

Hi Aaron,

Please again verify this change. This limits the scope.
Patch attached.

Thanks,
Srinivas

On Thu, 2025-11-06 at 11:31 -0600, Aaron Rainbolt wrote:
> On Thu, 06 Nov 2025 07:23:14 -0800
> srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote:
>
> > Hi Aaron,
> >
> > On Wed, 2025-09-10 at 15:33 -0500, Aaron Rainbolt wrote:
> > > On Wed, 10 Sep 2025 10:15:00 -0700
> > > srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote:
> > >
> > > > On Wed, 2025-09-10 at 11:36 -0500, Aaron Rainbolt wrote:
> > > > > On Wed, 30 Apr 2025 16:29:09 +0200
> > > > > "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> > > > >
> > > > > > On Tue, Apr 29, 2025 at 11:07 PM Srinivas Pandruvada
> > > > > > <srinivas.pandruvada@linux.intel.com> wrote:
> > > > > > >
> > > > > > > When turbo mode is unavailable on a Skylake-X system,
> > > > > > > executing
> > > > > > > the
> > > > > > > command:
> > > > > > > "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo"
> > > > > > > results in an unchecked MSR access error: WRMSR to 0x199
> > > > > > > (attempted to write 0x0000000100001300).
> > Please try the attached patch, if this address this issue.
>
> I can confirm that this patch does resolve the issue when applied to
> Kubuntu Focus's 6.14 kernel. CPU frequencies are available that
> require
> turbo boost, and `cat /sys/devices/system/cpu/intel_pstate` returns
> `0`. The logs from `dmesg` also indicate that turbo was disabled
> earlier in boot, but the warnings about turbo being disabled stop
> appearing later on, even when manipulating the `no_turbo` file:
>
> [   25.893012] intel_pstate: Turbo is disabled
> [   25.893019] intel_pstate: Turbo disabled by BIOS or unavailable on
> processor
> [   25.950587] NET: Registered PF_QIPCRTR protocol family
> [   26.599013] Realtek Internal NBASE-T PHY r8169-0-6c00:00: attached
> PHY driver (mii_bus:phy_addr=r8169-0-6c00:00, irq=MAC)
> [   26.725959] ACPI BIOS Error (bug): Could not resolve symbol
> [\_TZ.ETMD], AE_NOT_FOUND (20240827/psargs-332)
>
> [   26.725976] No Local Variables are initialized for Method [_OSC]
>
> [   26.725978] Initialized Arguments for Method [_OSC]:  (4 arguments
> defined for method invocation)
> [   26.725979]   Arg0:   0000000030ddf166 <Obj>           Buffer(16)
> 5D A8 3B B2 B7 C8 42 35
> [   26.725991]   Arg1:   0000000002bd3ac4 <Obj>           Integer
> 0000000000000001
> [   26.725996]   Arg2:   0000000033eb047e <Obj>           Integer
> 0000000000000002
> [   26.725999]   Arg3:   00000000de6cf5f1 <Obj>           Buffer(8)
> 00 00 00 00 05 00 00 00
>
> [   26.726010] ACPI Error: Aborting method \_SB.IETM._OSC due to
> previous error (AE_NOT_FOUND) (20240827/psparse-529)
> [   26.726056] Consider using thermal netlink events interface
> [   26.769209] r8169 0000:6c:00.0 enp108s0: Link is Down
> [   26.857318] zram0: detected capacity change from 0 to 195035136
> [   26.864390] vboxdrv: Found 32 processor cores/threads
> [   26.873227] Adding 97517564k swap on /dev/zram0.  Priority:-2
> extents:1 across:97517564k SS
> [   26.880588] vboxdrv: TSC mode is Invariant, tentative frequency
> 2419194640 Hz
> [   26.880592] vboxdrv: Successfully loaded version 7.2.4 r170995
> (interface 0x00340001)
> [   26.895725] intel_pstate: Turbo is disabled
> [   26.895730] intel_pstate: Turbo disabled by BIOS or unavailable on
> processor
> [   26.943715] iwlwifi 0000:00:14.3: WFPM_UMAC_PD_NOTIFICATION: 0x20
> [   26.943746] iwlwifi 0000:00:14.3: WFPM_LMAC2_PD_NOTIFICATION: 0x1f
> [   26.943755] iwlwifi 0000:00:14.3: WFPM_AUTH_KEY_0: 0x90
> [   26.943765] iwlwifi 0000:00:14.3: CNVI_SCU_SEQ_DATA_DW9: 0x0
> [   26.944901] iwlwifi 0000:00:14.3: RFIm is deactivated, reason = 5
> [   27.045437] iwlwifi 0000:00:14.3: Registered PHC clock: iwlwifi-
> PTP, with index: 0
> [   27.098590] VBoxNetFlt: Successfully started.
> [   27.101687] VBoxNetAdp: Successfully started.
> [   27.153602] bridge: filtering via arp/ip/ip6tables is no longer
> available by default. Update your scripts to load br_netfilter if you
> need this.
> [   27.851014] loop14: detected capacity change from 0 to 8
> [   27.895706] r8169 0000:6c:00.0: invalid VPD tag 0xff (size 0) at
> offset 0; assume missing optional EEPROM
> [   28.898015] intel_pstate: Turbo is disabled
> [   28.898021] intel_pstate: Turbo disabled by BIOS or unavailable on
> processor
> [   31.900781] intel_pstate: Turbo is disabled
> [   31.900788] intel_pstate: Turbo disabled by BIOS or unavailable on
> processor
> [   33.959448] Bluetooth: RFCOMM TTY layer initialized
> [   33.959456] Bluetooth: RFCOMM socket layer initialized
> [   33.959462] Bluetooth: RFCOMM ver 1.11
> [   36.903768] intel_pstate: Turbo is disabled
> [   36.903777] intel_pstate: Turbo disabled by BIOS or unavailable on
> processor
> [   38.054345] systemd-journald[883]:
> /var/log/journal/a9e8e3d2041547169b107e1e1a23f2ce/user-1000.journal:
> Journal file uses a different sequence number ID, rotating.
> [   39.799560] warning: `kded5' uses wireless extensions which will
> stop working for Wi-Fi 7 hardware; use nl80211
> [   40.884365] wlp0s20f3: authenticate with 18:ee:86:8b:16:a2 (local
> address=98:bd:80:8a:e9:27)
> [   40.885147] wlp0s20f3: send auth to 18:ee:86:8b:16:a2 (try 1/3)
> [   40.968595] wlp0s20f3: authenticate with 18:ee:86:8b:16:a2 (local
> address=98:bd:80:8a:e9:27)
> [   40.968603] wlp0s20f3: send auth to 18:ee:86:8b:16:a2 (try 1/3)
> [   40.980941] wlp0s20f3: authenticated
> [   40.981904] wlp0s20f3: associate with 18:ee:86:8b:16:a2 (try 1/3)
> [   41.042933] wlp0s20f3: RX AssocResp from 18:ee:86:8b:16:a2
> (capab=0x1431 status=0 aid=14)
> [   41.046917] wlp0s20f3: associated
>
> If you post the patch, I'm happy to add a `Tested-by` tag for it.
> Thank you for your help!
>
> > Thanks,
> > Srinivas
>
>

[-- Attachment #2: 0001-cpufreq-intel_pstate-Check-IDA-feature-only-during-M.patch --]
[-- Type: text/x-patch, Size: 2331 bytes --]

From 14a7225dea86df0f288f94df174e3d1fcd0a18ed Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu, 6 Nov 2025 17:34:09 -0800
Subject: [PATCH] cpufreq: intel_pstate: Check IDA feature only during MSR
0x199 write

Commit 0fb5be7fea98 ("cpufreq: intel_pstate: Unchecked MSR aceess in
legacy mode") introduced a check for feature X86_FEATURE_IDA to verify
turbo mode support. Although this is the correct way to check for turbo
mode, it causes issues on some platforms that disable turbo during OS
boot but enable it later. Without this feature check, users were able to
write 0 to /sys/devices/system/cpu/intel_pstate/no_turbo post-boot to
get turbo mode frequencies.

To restore the old behavior while still addressing the unchecked MSR
issue on some Skylake-X systems, limit the X86_FEATURE_IDA check to only
when setting MSR 0x199 Turbo Engage Bit (bit 32).

Fixes: 0fb5be7fea98 ("cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
drivers/cpufreq/intel_pstate.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 43e847e9f741..38a8e877f222 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -598,9 +598,6 @@ static bool turbo_is_disabled(void)
{
u64 misc_en;

- if (!cpu_feature_enabled(X86_FEATURE_IDA))
- return true;
-
rdmsrl(MSR_IA32_MISC_ENABLE, misc_en);

return !!(misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE);
@@ -2014,7 +2011,8 @@ static u64 atom_get_val(struct cpudata *cpudata, int pstate)
u32 vid;

val = (u64)pstate << 8;
- if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
+ if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled) &&
+ cpu_feature_enabled(X86_FEATURE_IDA))
val |= (u64)1 << 32;

vid_fp = cpudata->vid.min + mul_fp(
@@ -2179,7 +2177,8 @@ static u64 core_get_val(struct cpudata *cpudata, int pstate)
u64 val;

val = (u64)pstate << 8;
- if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
+ if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled) &&
+ cpu_feature_enabled(X86_FEATURE_IDA))
val |= (u64)1 << 32;

return val;
--
2.43.0