AMD Ryzen 5 3600 + Ubuntu 20.04 problems

Solution 1:

[UPDATE Jul 2] TL,DR: If you have Ryzen 3600, just add this to your boot parameters:

pci=assign-busses apicmaintimer idle=poll reboot=cold,hard 

1. If using grub, open Terminal:

sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=assign-busses apicmaintimer idle=poll reboot=cold,hard"

sudo update-grub

2. If using kernelstub (on POP! OS), open Terminal:

sudo kernelstub -a "pci=assign-busses apicmaintimer idle=poll reboot=cold,hard"

Restart and enjoy no crash whatsoever!


[UPDATE May 24] Trying out solution mentioned in the comment below by OP. Having SMT on at the moment. Will report if there's any problem.


I also have Ryzen 5 3600 and Gigabyte X570. You can't simply "refresh cpu cores info for OS after system boot" because it's not a boot problem. This is a power management problem that's probably because Linux kernel v5.4 ACPI features were not compatible with Ryzen Zen architecture. So Linux did not know whether a CPU core is idle or not and sometimes issued commands to shut it down when it's doing some work. That results in applications crash randomly, especially desktop GUI apps and video-related processes that require parallel processing.

When using "acpi=off", we explicitly told the kernel to disable all power management features. So that effectively disabled multi-core usage because the OS has no way to manage them.

TL,DR: After trying many different combos of BIOS settings and kernel boot parameters, I ended up having:

  • BIOS:

    • Global C State Control: Disabled

    • Power Idle Control: Typical Current Idle (that disable C6 states)

    • SMT: Disabled (very important, even only turning SMT off made CPU stuck soft lockup happened much less frequently.)

  • boot: (grub or kernelstub) acpi=ht irqpoll

Notes: "ht" means hyperthreading. That disabled ACPI almost completely except just enough to command the cpu cores. SMT = Simultaneous Multi Threads, that allow 1 core to run more than 1 thread (process) at the same time. But having buggy ACPI can cause trouble running SMT. Disabling it will result in showing only 6 physical cores instead of 12 logical cores, but that's ok. Video games even showed higher FPS rates when SMT is disabled.

Hope this helps :)