Ryzen lockup fix, disable c6 state on boot

733 views
Skip to first unread message

William Casarin

unread,
Jun 26, 2018, 2:03:42 PM6/26/18
to nix-...@googlegroups.com

For those with a Ryzen CPU and are experience lockups: I found my system
was very unstable until I added this to my config.

Changing BIOS settings didn't help, I have to run this on boot. Not sure
if this is worth including in nixpkgs since it's pretty hacky.

Posting it here for future users who may run into this issue.

--8<---------------cut here---------------start------------->8---
let zenstates = pkgs.fetchFromGitHub {
owner = "r4m0n";
repo = "ZenStates-Linux";
rev = "0bc27f4740e382f2a2896dc1dabfec1d0ac96818";
sha256 = "1h1h2n50d2cwcyw3zp4lamfvrdjy1gjghffvl3qrp6arfsfa615y";
};
in
{
systemd.services.disable-c6 = {
description = "Ryzen Disable C6 State";

wantedBy = [ "basic.target" ];
after = [ "sysinit.target" "local-fs.target" ];

serviceConfig.Type = "oneshot";
serviceConfig.ExecStart = util.writeBash "disable-c6-state" ''
${pkgs.kmod}/bin/modprobe msr
${pkgs.python2}/bin/python ${zenstates}/zenstates.py --c6-disable --list
'';
};
}
--8<---------------cut here---------------end--------------->8---

Cheers,

David Costa

unread,
Jun 30, 2018, 2:35:49 PM6/30/18
to nix-...@googlegroups.com
On Tue, 26 Jun 2018 11:03:39 -0700
William Casarin <jb...@jb55.com> wrote:

> Changing BIOS settings didn't help, I have to run this on boot. Not
> sure if this is worth including in nixpkgs since it's pretty hacky.

Sorry for the slight OT but this may help someone with this mobo:

I confirm that many people reported that changing bios settings may or
may not fix the issue depending on the vendor implementation, AMD and
the mobo vendors are not saying what's going under the hood.

For my motherboard Gigabyte AB350-Gaming changing the idle current to
"typical" fixed everything. I say this because many sources incorrectly
reported that a BIOS update is all that is needed but I actually had to
manually change a pretty hidden setting which is under
advanced/amdcbs/zen-common-options/"power supply idle control"

source here: https://bugzilla.kernel.org/show_bug.cgi?id=196683#c339

Cheers,
David
Reply all
Reply to author
Forward
0 new messages