OK, I found a way to enable hwaccel WITHOUT Lilu and WEG.
TBH, I don't think this is a better approach. More work to do, higher risk to damage the OS, harder to disable / revert. And I don't know how to enable DRM streaming in this way (Chromium base Netflix still works, but iTunes DRM streaming doesn't work).
But the advantage is, you may able to keep SIP fully enabled.
To achieve this, two files need to be edited.
Both hide inside the AppleGVA.framework
1) System ▸ Library ▸ PrivateFrameworks ▸ AppleGVA.framework ▸ Versions ▸ A ▸ AppleGVA
2) System ▸ Library ▸ PrivateFrameworks ▸ AppleGVA.framework ▸ Versions ▸ A ▸ Resources ▸ Info.plist
I won't go into too details step by step at this moment. Because this is a more danger approach IMO. And I couldn't find any real world difference then using board-id injection. HEVC encoding still can't be activated. I am not sure if this can give Polaris GPU more stable hwaccel support. I only confirm this can work 10min ago. I keep running FCPX and Compressor in the last 10min. No crash, no freeze. But I can't say this is a better way to RX580 users yet. Simply too little data to confirm anything.
However, for those who have knowledge / skill to edit these two files. You may try it if you wish.
1) Open the AppleGVA file by a Hex editor.
Replace BOTH iMac Pro's board-id by the cMP's board-id
2) Open Info.plist by text editor.
Replace the iMac Pro board-id by the cMP's board-id
Reboot. (REMOVE all Lilu, WEG, and boot arguments if applicable)
Then the cMP will also able to use hwaccel without Lilu and WEG.
I boot into another boot drive in order to mod this test drive's files. So that I don't have to copy the file to desktop etc, or fix permission. Just mod them directly (because they were not a part of the OS when I mod them).
Anyway, do NOT do this if you have any doubt. It is definitely NOT for any normal users, or daily use at this moment.
P.S. you may need to run the following command after editing the AppleGVA file
Code:
sudo codesign -f -s - /System/Library/PrivateFrameworks/AppleGVA.framework/Versions/A/AppleGVA
Update 1: Did lots of tests in the last 10 hours. Result shows perfectly stable for my RX580. Here is the a quick 5min capture of FCPX stability test (as always, please use Chromium base browser and watch the video in 4K. Otherwise, hard to see the details). This may become the solution for those Polaris GPU users that having system freeze issue.
Another short video which playback 5 different HEVC / H264 video in FCP timeline simultaneously. Please ignore that little choppy playback. That's because the GPU have to record the screen as well. This is more for stability test, not performance test. I did the test for much longer, but just record few minutes to shows how I did that.
I also intentionally destroy the AppleGVA file and see what will happen. Mojave can always boot to desktop. So, it seems this approach is quite safe, and easy to fix / recovery if the user did something wrong.
For stability / stress tests, I ran the above test a few times. And few more with Compressor encoding 3 videos simultaneously in the background + Luxmark + Unigine Heaven (Extreme Preset). And one of the test I even login to another profile and doing more video encoding in the background (multi profile logged in). Of course, the screen capture also done via hwaccel as well. Not a single freeze, crash, glitch yet.
If any Polaris user can tell me a reproducible way to get into that GPU Restart event (when using the Lilu / WEG method). Please let me know. I can do the stability test for this hex edit method.