Bug 218702 - Turbo is disabled on boot but no_turbo reads 0
Summary: Turbo is disabled on boot but no_turbo reads 0
Status: RESOLVED CODE_FIX
Alias: None
Product: Power Management
Classification: Unclassified
Component: intel_pstate (show other bugs)
Hardware: Intel Linux
: P3 normal
Assignee: Kristen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 10:45 UTC by Xi Ruoyao
Modified: 2024-06-15 12:47 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.