4

I have a ryzen cpu and my cpu has been freezing/crashing a lot over the years and I couldnt' find a solution until recently and I'm told setting the max_cstate should solve my issue.

But how do I check if I set processor.max_cstate correctly from the terminal/tilix?

Current cpu: AMD Ryzen 3 1200 Quad-Core Processor

OS: Ubuntu Desktop 20.04

exts
  • 141

1 Answers1

3

You can check the number of idle states your system currently supports by examination. Example 1 (limitation in place):

~$ grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
/sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
/sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1

Example 2 (same computer, no limitation):

$ grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
/sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
/sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
/sys/devices/system/cpu/cpu0/cpuidle/state2/name:C1E
/sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3
/sys/devices/system/cpu/cpu0/cpuidle/state4/name:C6
/sys/devices/system/cpu/cpu0/cpuidle/state5/name:C7s
/sys/devices/system/cpu/cpu0/cpuidle/state6/name:C8
/sys/devices/system/cpu/cpu0/cpuidle/state7/name:C9
/sys/devices/system/cpu/cpu0/cpuidle/state8/name:C10

Just make the cpu number a wildcard if you want the list for everything (typically the same for each CPU).

Doug Smythies
  • 16,146