I use an Sapphire RX 580 Pulse 8 GB graphics card, which appears to be one of the more compatible ones. Unfortunately I have an issue where the card randomly freezes in macOS (does not happen in Windows or Linux).
I have verified my BIOS settings on my Z390i are optimal, and my memory is working great at the proper timings with a full 4 pass run in MemTest86.
I have tried iMac18,3 (and iMac19,1 after reinstall) with the iGPU + dGPU together. It results in the freeze, which I cannot reliable reproduce. It can happen 15 minutes after boot, or after a week of running the machine. Not using the dGPU and using iMac18,1 makes the machine stable, and the issue no longer occurs. During the freeze I can move my mouse, and I get a colored square over where the mouse would appear eventually. The GPU appears to crash and I can still access the system over SSH and view logs. At this time I can see that the logs repeatedly write `com.apple.DumpGPURestart` over and over.
I have also tried only using a dGPU with iMacPro1,1 and this resulted in the same as above.
My EFI is fairly simple, I have no unusual kexts, just Lilu 1.3.8 + Whatevergreen 1.3.2 (latest as of posting). I am using Clover 5070 (also latest). All tests were done using Mojave versions 10.14.1-6, all of them have had the same problem.
I'd like to be using iMac19,1 as it would ideally work best with my Coffee Lake i9, and my RX 580. Do you think windows/linux aren't pushing the GPU the way macOS is? Should I just buy another card and roll the dice? Any advice on how I could get this working would be greatly appreciated. I can provide more details if anyone wants, I've been chasing this problem for 6 months.
Here is a link to my
sapphire cards BIOS.
EDIT: Given some advice to try disabling XMP in another thread, I decided to try that with iMac19,1 SMBIOS and things have been stable so far (40 hours). I have tried this before in iMacPro1,1 and iMac18,3 but it never worked. I wonder if the combination of the SMBIOS that is more compatible with my chipset and processor fixed this. I am little surprised that my 3200 MHz RAM must be kept at 2133 MHz to run macOS, especially when it runs perfectly fine in Windows/Ubuntu at the desired speed, but it is a small price to pay for stability.