Question Help please - code 12 gpu device error in windows 10 - TOLUD setting?

Apr 9, 2021
I'm having problems with a 5 x GPU mining rig I built, I'm a complete newbie to all this. I hope this is the right place to post this. Components are:
  • ASRock B450 Pro4 motherboard, UEFI version 4.20
  • Ryzen 5 3600 Matisse CPU
  • Corsair 240GB MP510 Force SSD in Ultra M2 slot
  • Kingston 16GB DDR4 RAM
  • 1 x Asus Nvidia GTX 3070 8GB graphics card on PCIE lane 3 (driver version dated 22/11/2020)
  • 4 x Sapphire AMD RX 5500 XT 8GB graphics cards on PCIE lanes 1, 2, 5, and 6 (driver version 27.20.14501.18003 dated 13/11/2020)
  • 2 x PSUs (1 x 850W and 1 x 650W) with each GPU and its riser in the same PSU. XTs.
The GPUs are connected to the MOBO using powered PCIE-risers. The 650W is powering 2 of the 5500 XTs plus MOBO. The 850W is powering the 3070 and the remaining 2 5500 XTs. Risers are powered using either PCIE or Molex power cables.
I'm running Windows 10 64-bit with latest updates up to 9 April 2021, and have been able to boot up the system with no issue.

The problem is this:
Device manager shows all 5 cards under 'Display Adaptors', however 2 of the AMD cards have device status:
"This device cannot find enough free resources that it can use. (Code 12)".
If I tried to disable the 2 cards with an error and run a miner (have tried Phoenix Miner and NiceHash), I got a BSOD with VIDEO_TDR_FAILURE with amdkmdag.sys error.

What I've tried so far:
  • Checked all cables are properly connected.
  • I've changed virtual memory to 40,000MB (based on 5 x 8GB GPUs) .
  • From various online searches for possible solutions, I've enabled "IOMMU" and "Above 4G Decoding" in the UEFI - this hasn't helped. I've also disabled unused ports i.e. serial, HD audio.
  • I've also tried adding a HackFlags registry key (link) and this also hasn't helped.
I've read that changing the UEFI TOLUD (Top of Low Usable DRAM) setting to 3.5GB addresses this error, but I cannot find such a setting in this MOBO's UEFI. Does anyone know how to resolve this some other way e.g. another setting on the MOBO or in Windows?

I'd appreciate any help you can give me.