Ryzen freezes - possible solution related to C6 state

ryzen

#1

Hey guys!

After several attempts to solve freezing with Ryzen cpus I found the solution:

Get zenstates from here: https://github.com/r4m0n/ZenStates-Linux

Create a systemd service in /etc/systemd/system:

[Unit]
Description=Ryzen Disable C6
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=basic.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/disable_c6

[Install]
WantedBy=basic.target

Create executable bash file /usr/local/bin/disable_c6

#!/bin/sh
zenstates.py --c6-disable

Background:

It seems C6 state causes lockups for several systems. Although it´s disabled in bios it was still enabled while testing with zenstates. After executing --c6-disable I never had any lockup again! Ryzen 1700X, ASRock AB350 K4

Hope this will help other users to get rid of random lockups especially while cpu is idle


Manjaro still constantly locking up after the upgrade to Ryzen w/ AGESA 1.0.0.6 on kernels 4.10+
Fix Ryzen lockups related to low system usage
AMD Ryzen: Problems and Fixes :wrench:
AMD Ryzen: Problems and Fixes :wrench:
#2

what Kernel are you currently using?


#3

Here a description what the C6 state is.


#4

Latest 4.14-12.1, tried other kernels before too


#5

thanks for your tip.

i am using the same kernel as you, but i have had occasional freezes on all kernels starting with 4.9.x. all freezes happened with low cpu usage.

i just wanted to test your tip temporarily and used the following commands:

  git clone https://github.com/r4m0n/ZenStates-Linux.git
  sudo modprobe msr     
  sudo ./ZenStates-Linux/zenstates.py --c6-disable

this command shows, whether the c6 state is enabled on your system:

  sudo ./ZenStates-Linux/zenstates.py -l

but you are right. creating a systemd service is the best long-term solution!


#6

Well… forgot the msr module right :smiley: