I built a PC in January and have been working to make it function correctly. All of the normal stuff was happening, random black screen restart. Tried all the normal methods. Thought about bad hardware, but I knew if change some simple settings i could play games longer, or changing certain settings, I could cause a game to instantly black screen.
Red Devil 5700 XT
Asus Tuff x570
16 GB 3200 MHZ Ram
To see if this fix applies to you: first, If you see WHEA: Cache Hierarchy Error in the event viewer this is a potential fix.
This wont fix all problems associated with this code, the real code we are looking for in the event view is Event Id 12 Usermodepowerservice. Now, I'm unsure how I managed to get this code to pop up, because for a long time it never did. So just because you don't see it doesn't mean its not the issue. When I was playing sometimes it would start to lag and then eventual black scree, reboot.
What is happening: Windows 10 is changing the power mode selected to save power even if you have selected AMD High Performance Plan in your power settings. I'm unsure if this is an error on windows side or amd side.
To fix it:
Open admin command prompt. Type POWERCFG /LIST
Copy the GUI Number that has the asterisks next to it.
If you Have Windows 10 Home, your going to need to install the local group policy editor. There is a lot of information out there about it and I'm unsure what the best install method is so I'm leaving that info out.
Once you have it installed open it up and go to Computer Config > Admin Templates > System > Power Management
Click on the Specify Custom Power Plan
Enable it and paste your GUI number from above.
I have had 0 black screens since this and its been a week. Before this the longest I went was maybe 4 or 5 hours.