Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
executable file 40 lines (37 sloc) 1.32 KB
#description: Disables all C6 and enables all C7 core states for Baytrail CPUs
#author: Wolfgang Reimer <linuxball (at)>
#date: 2016014
#version: 1.0
#usage: sudo <path>/
#notes: Intended as test script to verify whether erratum VLP52 (see
# [1]) is the root cause for kernel bug 109051 (see [2]). In order
# for this to work you must _NOT_ use boot parameter
# intel_idle.max_cstate=<number>.
# [1]
# [2]
# Disable ($1 == 1) or enable ($1 == 0) core state, if not yet done.
disable() {
local action
read disabled <disable
test "$disabled" = $1 && return
echo $1 >disable || return
action=ENABLED; test "$1" = 0 || action=DISABLED
printf "%-8s state %7s for %s.\n" $action "$name" $cpu
# Iterate through each core state and for Baytrail (BYT) disable all C6
# and enable all C7 states.
cd /sys/devices/system/cpu
for cpu in cpu[0-9]*; do
for dir in $cpu/cpuidle/state*; do
cd "$dir"
read name <name
case $name in
C6*) disable 1;;
C7*) disable 0;;
cd ../../..