I am getting somewhere with sleep/wake.
I hazily recall reading somewhere that WEG can cause sleep/wake issue. So decided to try without it. The only reason I added it is that its
unfairgva=0x01
fixes Safari+Netflix and TV+ DRM issues.
After multiple software sleep (choose Sleep in Apple menu) and idle sleep (letting machine go to sleep along with the display) attempts I can tentatively conclude that WEG patching is indeed the culprit for wake issues: every one of those sleep/wake tries was working. I still needed to press mouse or keyboard few times, but that's really irrelevant.
So I picked up WEG source code to look what it actually does. Looking at
commit that implements unfairgva all it seem to be doing is enforcing board-id to be the same as iMacPro1,1, where it's known that all DRM stuff works:
Code:
DBGLOG("unfair", "setting hwgva-id to iMacPro1,1");
entry->setProperty("hwgva-id", const_cast<char *>("Mac-7BA5B2D9E42DDD94"), static_cast<uint32_t>(sizeof("Mac-7BA5B2D9E42DDD94")));
There's more C++ code which I can't understand, but this looks to be the crux of the unfairgva. Given that I never had success with sleep/wake on iMacPro1,1 SMBIOS, this DRM fix may also cause issues with sleep on AMD.
I wonder if this
hwgva-id
setting can be done with SSDT or through DeviceProperties somehow...if that is all it's doing.