How to set intel_idle.max_cstate=1

If using GRUB:

With sudo, edit /etc/default/grub and edit the GRUB_CMDLINE_LINUX_DEFAULT line adding intel_idle.max_cstate=1 to whatever might already be there. After saving the file run sudo update-grub, then re-boot. Suggest that you save a copy of your original grub file first.

To check that your cstate is not going deeper than 1 use turbostat (package: linux-tools-common).

Example (where there is already something on the GRUB_CMDLINE_LINUX_DEFAULT):

Before (edited):

$ sudo turbostat -S --debug sleep 10
 Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 PkgWatt CorWatt GFXWatt
       1    0.04    1654    3411       0    0.12    0.03   99.82    0.00      29      29    0.07    0.03   99.51    3.85    0.20    0.23
10.001629 sec

Make the change (using my method for configuration control):

~/config/etc/default$ cp /etc/default/grub ./
~/config/etc/default$ cp grub grub.original
~/config/etc/default$ nano grub

Change this:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"

To this:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_idle.max_cstate=1"

And update:

~/config/etc/default$ sudo cp grub /etc/default
~/config/etc/default$ sudo update-grub
~/config/etc/default$ sudo reboot -r now

Now check (edited):

$ sudo turbostat -S --debug sleep 10
 Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 PkgWatt CorWatt GFXWatt
       0    0.02    1920    3411       0   99.98    0.00    0.00    0.00      39      39    0.00    0.00    0.00   10.49    6.66    0.23
10.001079 sec

Your should also see these messages in dmesg and var/log/kern.log (edited):

~$ dmesg | grep intel_idle
[    1.019709] intel_idle: max_cstate 1 reached

$ grep intel_idle /var/log/kern.log
Mar 23 08:10:32 s15 kernel: [    1.019709] intel_idle: max_cstate 1 reached

After having the same freeze-problems with linux and my asrock Q2900 I found on a German IT website the solution/workaround provided by Intel. (https://www.golem.de/news/intel-einfrieren-bei-intels-bay-trail-socs-durch-patch-abgefedert-1609-123546.html) There is a general problem with Bay-Trail-SoCs from Intel. The link to the patch: https://bugzilla.kernel.org/attachment.cgi?id=223851

Further information: This patch/script does obtain the power saving mode. The topic-solution above does remove this mode at all.

Tags:

Intel

Idle