AMD Ryzen: Problems and Fixes 🔧

AMD Ryzen: :firecracker: Problems and Fixes :wrench:

Many of the problems concerning AMD Ryzen CPUs and APUs seems to have solutions/workarounds now. Here are some of the most disabling problems with possible fixes. As a newbie I had to do quite a bit of research to solve these for my self, hopefully it can be of use for others as well!

Installing

Depending on the age of the CPU or APU an installation media running a kernel (the live session) that supports the CPU (and GPU) is needed. This has not always been the case, especially for the APUs (which needs drivers for the new GPUs for the live GUI). A solution that has usually worked is to use Manjaro Architect. Please see this tutorial.

Manjaro Architect has not worked for everyone though, and you might have to add one of these boot options;

"Pass through" should work dynamically:

iommu=pt

But if you still have issues then use software-only instead with:

iommu=soft

(Soft) Lockups

There are many different types of lockups that has plagued the now many different AMD Ryzen CPUs and APUs. Many probably have had more than one type and therefore several solutions have been needed. A common error message in the journalctl (for different types of CPU/APU and problems it seems) have looked like:

NMI watchdog: BUG: soft lockup - CPU#12 stuck for 23s! [DOM Worker:1364]

First, make sure that:

  1. Update the kernel if possible (latest stable should be fine at the time of writing).
  2. Update UEFI (BIOS) if possible.

Most of these soft lockups seem to be solved by a combination of the following three solutions (or workarounds):

  1. In UEFI (BIOS) set Power Supply Idle Control (or something similar) to Typical Current Idle (or something similar) .
  2. Add the kernel boot parameter: idle=nomwait.
  3. Disable C6 states (both core and package) with Zenstates.py.

Kernel Boot Parameter

Adding a kernel boot parameter for GRUB in Manjaro:

  1. Open the file /etc/default/grub in a text editor.
  2. Add the parameter, in this case idle=nomwait (notice the m), to the line starting with GRUB_CMDLINE_LINUX_DEFAULT=, at the end, within the quotes, like so: GRUB_CMDLINE_LINUX_DEFAULT="<current parameters ...> idle=nomwait".
  3. Save the file.
  4. Update GRUB: sudo update-grub.
  5. Upon next reboot the default boot option should include the parameter.

Zenstates.py

Disabling C6 states in Manjaro (modified and extended this):

  1. Install zenstates-git from AUR (for example with Pamac, Octopi, or bmenu).
  2. The kernel module msr is needed for Zenstates. To load this module permanently (every boot): add msr to the file /etc/modules-load.d/modules.conf.
  3. To disable C6 states permanently (every boot), we need to create a system.d unit. To do this create a file in /etc/systemd/system called something like disable_c6.service.
  4. Add the following contents to the file:
[Unit]
Description=Ryzen Disable C6
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=basic.target

[Service]
Type=oneshot
ExecStart=/usr/bin/zenstates --c6-disable

[Install]
WantedBy=basic.target
  1. Run sudo systemctl enable disable_c6.service to enable the system.d unit.
  2. At the next reboot msr should be loaded, to check this run: lsmod | grep msr which should return a line starting with msr.
  3. At the next reboot zenstates should also have run, and thus C6 states disabled. To check this run sudo zenstates -l and it should return something ending with:
...
C6 State - Package - Disabled
C6 State - Core - Disabled
23 Likes
All issues with Ryzen 2500U+RX560X (Acer Nitro 5 AN515-42)
At my wits end... random freezing!
Random crashes on hp envy x360 @ AMD Ryzen 2500U
Installer GUI doesn't load with 17.1.12 on Ryzen 2700x-based system
HP Envy 13z: Stuck at Started TLP system startup/shutdown
Manjaro with 4.19 kernel and Ryzen 5 2500U APU?
WiFi and soft lockup issues in Acer Nitro 5
Latest kernel and amd?
(SOLVED)Random Freezes on Laptop with AMD Ryzen 5
Manjaro freezes/crashes randomly and leaves no logs about it
Problems with Manjaro Linux on a HP Elitebook 755 G5 with Ryzen 7 and Vega 10
Cpupower.service doen't start
Is secure to plug an ssd disk from an intel to a ryzen architecture or should i make a clean installation?
[SOLVED] (seemingly) random crashes after startup
Hard lockup after a while
Live USB boot stops at LVM2 mirror monitoring on Ryzen 5/Vega 8 notebook
Intermittent freezes with graphics-heavy situations
Is Ryzen Stable? If Not Then Intel ... Check Twice Before Choosing!
Is Ryzen Stable? If Not Then Intel ... Check Twice Before Choosing!
All issues with Ryzen 2500U+RX560X (Acer Nitro 5 AN515-42)
Architect boot difficulties
Manjaro日常开发使用经常死机(已解决)
LiveUSB crash on Ryzen 3600
Why are you using Manjaro?
System random freeze
[Solved] Complete system freezes randomly
System random freeze
[Solved] Complete system freezes randomly
Black screen when waking the computer from suspend
Freezing/stutters ... "task nvidia-modeset/:399 blocked for more than 122 seconds"
Dell Inspiron 15 5000 (amdgpu RX Vega 10) black screen or kernel warning after waking from sleep
New to Manjaro and having some issues
Manjaro randomly slows down and freezes
Random complete freeze on Manjaro for year.
Random complete freeze on Manjaro for year.
Regular GUI freezes
Looking for help troubleshooting Manjaro Gnome
Black screen after reboot with Radeon RX 5700 XT GAMING X

This should be helpful when I get around to building a Ryzen desktop…

Appendix

Personally I have built two very similar Ryzen desktops and have one Ryzen Laptop (Lenovo Ideapad 720s-ARR with AMD Ryzen 2500U with Vega 8).

One of the desktop is a Ryzen 1600 and have worked “flawlessly” since day one.

The other desktop, a Ryzen 1200, with similar components: same (supposedly supported) Corsair memory (but only 8 GB instead of 16 GB), similar ASUS motherboard (only mini ATX instead of ATX), had lockups. I was fortunate enough to guess correctly that the memory made it unstable, a switch at the store fixed that.

My laptop have had problems since day one. Most of the post above is related to fixing it. I have looked around everywhere in this forum (1, 2, 3, for example), all over the Internet, and also talked with @Strit here, who has a similar laptop.

Unfortunately the UEFI option is not possible on this laptop. Disabling C6 states seemed to help somewhat. However the kernel parameter idle=nomwait which I have not found anywhere in this forum, seems to have done the trick :slightly_smiling_face: (couple of days running fine, hopefully I have not jinxed it! :fearful: :crossed_fingers:)! Please try it out!

Update

2018-09-03: Still no lockups, so idle=nomwait seems to be working (for me)! :grin::+1::ok_hand::metal:

Further Reading

Now that I know what to look for I have found it in many places, please check them out for more information:

https://bugzilla.kernel.org/show_bug.cgi?id=196683

https://bugzilla.redhat.com/show_bug.cgi?id=1562530

https://community.amd.com/thread/224000

https://community.amd.com/thread/225795

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772081

Great work!! It will help me when I do my next decade upgrade!! :rofl:

PS: I corrected a small typo (/etc/default/grub)

2 Likes
OT

2990WX :smiley: (Christmas)

1 Like

only APU’s need that. Having a Ryzen 2700X myself and 4.14 works flawless.
I did not need to modify anything to make it work.

So does using Kernel 4.18 fixes the issues with the Ryzen APUs then? I for one would like to see a Ryzen notebook running without any problems, but that might take awhile yet.

Unfortunately not. I needed the kernel parameter also (possibly also disabling C6 states, will try without if this seems working).

Thanks!
My 1600 worked flawlessly since last autumn, didn’t remember which version I used. I will updated to reflect your input!

Anyone tried this using a B450 motherboard yet? So far I haven’t find any information on using such boards with Linux. Every time I do a search I keep getting Linux on B350 boards…

I suppose it is too early right now… I’m wondering if Ryzen APUs on B450 boards has fixed some the issues with them.

2 Likes

I don’t own a Ryzen G. So I can’t tell. The reports I last read were saying that at least AGESA PinnaclePI 1.0.0.3b or later is needed to have the APU’s working without issues on Linux with Kernel 4.17 or later.

Forum kindly sponsored by