Bug 218702

Summary: Turbo is disabled on boot but no_turbo reads 0
Product: Power Management Reporter: Xi Ruoyao (xry111)
Component: intel_pstateAssignee: Kristen (kristen.c.accardi)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P3    
Hardware: Intel   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Xi Ruoyao 2024-04-10 10:45:44 UTC
On a Hasee X5-2021S5H laptop (shipping a Core i5-11300H), with the mainline kernel (tested at commit 2c71fdf02a95b3dd425b42f28fd47fb2b1d22702) there's a strange issue: when the system is booted the turbo is de-facto disabled (the maximum frequency is capped at the max non-turbo frequency 3.1 GHz), but /sys/devices/system/cpu/intel_pstate/no_turbo reads 0.

More interestingly, just writing 0 into /sys/devices/system/cpu/intel_pstate/no_turbo enables the turbo.

So I added a script to be executed on boot:

while ! echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo; do
    sleep 10
done

and it only succeeds at the 3rd iteration.  During the 1st and 2nd iteration the echo command fails with EPERM.
Comment 1 Xi Ruoyao 2024-06-15 12:47:43 UTC
Fixed with 0940f1a8011f (after that no_turbo is 1 and cannot be overridden), and after 350cbb5d2f67 we can write 0 to override it after the firmware gives control.