I realised I undervolted my cpu too much. If you are undervolting don't go to the edge of stability. Go just above the stability at which the cpu can run well on load.
I had a similar issue with it a while back. Mine undervolts until -125mV - -130mV and is still stable during regular use, but in some rare cases the system would completely crash after playing a more intensive game. Dialing it back to -110mV solved it for me, and it's what I'm still using to this day on my 7700HQ.
my ryzen 5 1600 undervolts to -0.150V from base voltage. although it crashed after long inactivity. -0.134 is now perfect
It’s not at all surprising that restricting power to a piece of electronic circuitry might make it unstable.
What is surprising is that people do this and then continue to blame a Linux distro for their self-inflicted problems.
I do apologise if I ever blamed the distro when it was not called for.
Anyway a heads up for future tinkers who aren't experienced with undervolting but do it anyway.
Also turn off amd cool and quiet. The powerstates are said to cause system freeze after afk.