PlanetJoel.com

Linux freezing running on older Ryzen processors

I was having a consistent problem with my Linux machine running on an older Ryzen processor (I’m using an old Ryzen 5 1600) where every 24 hours or so the machine would freeze. Strangely it would still respond to ping, and sometimes entire services would keep running. Other services would stop, an inevitably both SSH and local console stopped functioning. There was nothing in the logs.

After a little bit of Copiloting / Googling, I found this is a common problem. The fix turned out to be remarkably simple, adding this line to the grub.conf

 

GRUB_CMDLINE_LINUX_DEFAULT="processor.max_cstate=1"

 

This instructs the CPU effectively not to go to sleep. Unfortunately this will use more power and will, potentially, reduce the lifetime of the CPU – but it immediately prevented the crashes. It seems the CPU can go to sleep and pull in less power, but this seems to cause it to go into an unrecoverable state in Linux. Some people seem to have speculated the CPU is undervolted so much in this state it effectively crashes.

In the end this simple fix resolved by freezing issues.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *