AMD Ryzen:
Problems and Fixes
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:
- Update the kernel if possible (latest stable should be fine at the time of writing).
- Update UEFI (BIOS) if possible.
Most of these soft lockups seem to be solved by a combination of the following three solutions (or workarounds):
- In UEFI (BIOS) set
Power Supply Idle Control
(or something similar) toTypical Current Idle
(or something similar) . - Add the kernel boot parameter:
idle=nomwait
. - Disable
C6 states
(both core and package) with Zenstates.py.
Kernel Boot Parameter
Adding a kernel boot parameter for GRUB in Manjaro:
- Open the file
/etc/default/grub
in a text editor. - Add the parameter, in this case
idle=nomwait
(notice them
), to the line starting withGRUB_CMDLINE_LINUX_DEFAULT=
, at the end, within the quotes, like so:GRUB_CMDLINE_LINUX_DEFAULT="<current parameters ...> idle=nomwait"
. - Save the file.
- Update GRUB:
sudo update-grub
. - Upon next reboot the default boot option should include the parameter.
Zenstates.py
Disabling C6 states in Manjaro (modified and extended this):
- Install zenstates-git from AUR (for example with Pamac, Octopi, or bmenu).
- The kernel module
msr
is needed for Zenstates. To load this module permanently (every boot): addmsr
to the file/etc/modules-load.d/modules.conf
. - 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 likedisable_c6.service
. - 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
- Run
sudo systemctl enable disable_c6.service
to enable the system.d unit. - At the next reboot
msr
should be loaded, to check this run:lsmod | grep msr
which should return a line starting withmsr
. - 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