I've almost gone crazy with the system random freezes!

The likelihood of recent system freezes has reduced significantly, but it still occurs at night. It seems that disabling C6 through software during boot isn’t a complete solution.

Through some further searches, I found the following articles: ADM Ryzon processor random “freeze” issue, AMD Ryzen CPU random “freeze”, AMD Ryzen 2700X + CentOS 7 random freeze problem.

Based on various descriptions in those articles, the solution is as follows:

  1. If your BIOS supports disabling CPU power management, you should do so in the BIOS.
  2. Add idle=nomwait to the kernel parameters.
  3. Add processor.max_cstate=1 intel_idle.max_cstate=0 to the kernel parameters.
  4. After updating the kernel parameters, manually execute sudo update-grub to update the configuration.

You can check the max_cstate value with the following command before making changes; the value is 9 by default.

cat /sys/module/intel_idle/parameters/max_cstate

Modify the kernel boot parameters by using sudo nano /etc/default/grub.

You can view the kernel boot parameters using cat /proc/cmdline.

2 Likes