I stumbled upon this post when I was experiencing this issue on my Ryzen 7 1800x. Crazy that it is 2020 and this problem is still here, years after the initial post
Was running Debian 10 Stretch, then switched to Ubuntu Server 18.04.4 LTS.
Random Kernel Panic's, and CPU Timeouts, or System would lock up entirely and not even display a screen. Happened once every few days, then happened several times over a 24 hour period.
MSI 450i AC Gaming motherboard, updated to latest BIOS. Didn't fix it.
Turned on the "Typicle Idle" setting in the BIOS as suggested here, and have had no crashes for the last 7 days since the BIOS setting change.
Didn't get to try the zenstates.py script, have it on my system ready to go if needed though.