Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
I now have hardware-assisted playback of H.264 and H.265 without modifying AppleGVA's binary. Swordsmith and Jellyfish playback beautifully.

Confirmed that it is also loading the GPU in FCPX for H.264 encode.
But only H264 encode/decode and HEVC decode correct?
 
Looks like we may not need GFX0 name ... but i guess it doesn't hurt to have it.

I'm also not sure what other mods have been done to this hackintosh (clearly as it is running AMD proc)

wq52vFZ.png
 
That makes no sense as the new MacPro7,1 comes with Polaris.


i've been reading through this thread and the open core thread for the last few days and tryng to get my mac pro & catalina to get full HWAccel. i got then h264 to work but not the HEVC. I am debating about the HW Spoof , but may just wait until a better solution comes out. So, i have a 2017 Imac 5k with an RX570 running catalina. i've checked and it has full HWAccel h264 and HEVC. This imac does not have a T2 chip. i cant see apple taking away HWAccel in the near future or it will make my 2 year, almost 3 year old imac obsolete. Just a thought since i keep seeing comments on T2 chip and polaris gpu.
 
i've been reading through this thread and the open core thread for the last few days and tryng to get my mac pro & catalina to get full HWAccel. i got then h264 to work but not the HEVC. I am debating about the HW Spoof , but may just wait until a better solution comes out. So, i have a 2017 Imac 5k with an RX570 running catalina. i've checked and it has full HWAccel h264 and HEVC. This imac does not have a T2 chip. i cant see apple taking away HWAccel in the near future or it will make my 2 year, almost 3 year old imac obsolete. Just a thought since i keep seeing comments on T2 chip and polaris gpu.

iMac use the Intel iGPU Quick Sync for HWAccel that we don’t have.

The AMD UVD and VCE in your iMac never been used.
 
Instead of editing the AppleGVA binary, I simply added a board-id entry in Info.plist for the Mac Pro 5,1. I then turned all the gva variables on (defaults write com.apple.gva...):

Code:
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES

I now have hardware-assisted playback of H.264 and H.265 without modifying AppleGVA's binary. Swordsmith and Jellyfish playback beautifully.

Confirmed that it is also loading the GPU in FCPX for H.264 encode.


I installed the latest 10.14.6 security update beta which replaced my previously edited AppleGVA.framework so I thought i would give this method a try.

I confirm this works!!!!!!

Much easier than hex editing.

I thought I'd try the code below, as a wild guess, but sadly it didn't enable HEVC Encode :confused::

Code:
defaults write com.apple.AppleGVA gvaForceAMDHEVCEncode -bool YES
 
Instead of editing the AppleGVA binary, I simply added a board-id entry in Info.plist for the Mac Pro 5,1. I then turned all the gva variables on (defaults write com.apple.gva...):

Code:
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES


Great find! are these just Terminal commands?
 
I've revisited this.

When I upgraded to the Vega 56, it turns out I had a bunch of old kexts installed, including WEG and Lilu. So, after removing all that cruft, I started with a fresh, unaltered version of AppleGVA and disabled SIP.

Instead of editing the AppleGVA binary, I simply added a board-id entry in Info.plist for the Mac Pro 5,1. I then turned all the gva variables on (defaults write com.apple.gva...):

Code:
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES

I now have hardware-assisted playback of H.264 and H.265 without modifying AppleGVA's binary. Swordsmith and Jellyfish playback beautifully.

Confirmed that it is also loading the GPU in FCPX for H.264 encode.

Another confirmation here. Working with Vega 64 on 10.15.1. Now to figure out HEVC encode.
 
  • Like
Reactions: h9826790
With the plist and com.apple.AppleGVA variables modification the VideoToolbox H264 encoding does not work on Handbrake, now I am going to perform also the binary modification to see if will fix it. Instead I confirm the H264/265 playback works like a charm.

EDIT: I confirm that after the AppleGVA binary modification the VideoToolbox H264 encode is working again.
 
Last edited:
hi all of you!
just got my hand on 5 rx580, did some test under high sierra and as expected only 3 were recognized, I’m going to perform tests on mojave asasp, I would definitely like to enable all hardware encode decode to see how many gpu in total mojave can handle.
maybe @dosdude can do his magic and write a pach for dumbass like me who dont want to mess with OC or clover , because from my understanding it is clearly a code issue, not a hardware issue. all i can say is 3 rx580 make blender radeon pro render scale extremely well and outperform cycle with 2 gtx1080.

the way i see it is apple dont like us to mess too much with their code, and as soon as it is proven that they are doing code limitation and it is exposed they rather fix the situation by allowing vanilla upgrade natively rather than have too much machine around with messed up code.

this is what happened with NVME, as soon as it was clear that NVME could work vanilla, they did it.

I aslo believe that they rather have cMP tweaked than people with real hackintosh .

they absolutely know that most of us will still rather go with boosted cMP for a couple more year until second hand 7.1 start hitting the market.

performance wise the 5.1 will remain competitive only for a couple more years.
 
Could someone write up a quick how-to on this newest method?

You mean this one?

 
You mean this one?


No.
 
  • Like
Reactions: crjackson2134
Could someone write up a quick how-to on this newest method?


OK let call the newest method "editing the Plist", it is relatively simple.

The original mesthod involves adding Kexts lets call it "LILU" after the name of one of the Kexts

The second method involved editing the AppleGVA Binary with a Hex editor lets call it HEX method

There is a 4th method using Open Core but that has its own thread.

TO recap the reports from users on this thread:

1) LILU method gives you H264 encode and decode plus HEVC decode, works with FCPX and VideoToolbox H264 encoding work on Handbrake

2) HEX method gives you H264 encode and decode plus HEVC decode, works with FCPX and VideoToolbox H264 encoding work on Handbrake

3) Editing the Plist gives you H264 encode and decode plus HEVC decode, works with FCPX and BUT NOT VideoToolbox H264 encoding on Handbrake ( I never use handbrake so the limitation does not affect me!)

4) Open Core method pretends the Mac Pro is an iMac Pro and you get full acceleration but it is still being tested.

TO edit the Plist: Credit to h9826790 read the original post here: #205 and also sirbryan his post: #775

1) Remove all Lilu, WhateverGreen, and boot argument if applicable. (If you need innie, you can keep Lilu). If you remove boot argument by NVRAM reset, you have to disable SIP again in order to modify system files.

If you have never attempted to enable AMD hardware acceleration then ignore the step above. Just make sure SIP is disabled so you can edit the system file.

2) Go to System⁩ ▸ ⁨Library⁩ ▸ ⁨PrivateFrameworks⁩

3) right click AppleGVA.framework

4) Duplicate this file and keep the duplicate copy somewhere safe incase you mess up and need to replace it.




9) double click the current AppleGVA.framework, you should able to open it.



Screenshot 2019-06-09 at 10.38.58 PM.png


18) open the Resources folder and open the info.plist with a text editor

19) search 7BA5B2D9E42DDD94

A.png



20) replace that by F221BEC8

B.png


in Terminal app copy and paste each line individually one after another


Code:
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES

you might want to run these commands too:


Optional steps to repair all modified files' permission.

22) In terminal, enter

Code:
sudo codesign --deep -fs - /System/Library/PrivateFrameworks/AppleGVA.framework

If at this stage Terminal reports an error "resource fork, Finder information, or similar detritus not allowed."

copy and paste this command in Terminal:

Code:
xattr -rc /System/Library/PrivateFrameworks/AppleGVA.framework

23) Enter

Code:
sudo chown -R root:wheel /System/Library/PrivateFrameworks/AppleGVA.framework


24) Enter

Code:
sudo update_dyld_shared_cache -force




21) Reboot.

I have tested this working on Mojave 10.14.6 with Vega56 i will test later with RX 480
 
OK let call the newest method "editing the Plist", it is relatively simple.

The original mesthod involves adding Kexts lets call it "LILU" after the name of one of the Kexts

The second method involved editing the AppleGVA Binary with a Hex editor lets call it HEX method

There is a 4th method using Open Core but that has its own thread.

TO recap the reports from users on this thread:

1) LILU method gives you H264 encode and decode plus HEVC decode, works with FCPX and VideoToolbox H264 encoding work on Handbrake

2) HEX method gives you H264 encode and decode plus HEVC decode, works with FCPX and VideoToolbox H264 encoding work on Handbrake

3) Editing the Plist gives you H264 encode and decode plus HEVC decode, works with FCPX and BUT NOT VideoToolbox H264 encoding on Handbrake ( I never use handbrake so the limitation does not affect me!)

4) Open Core method pretends the Mac Pro is an iMac Pro and you get full acceleration but it is still being tested.

TO edit the Plist: Credit to h9826790 read the original post here: #205 and also sirbryan his post: #775

1) Remove all Lilu, WhateverGreen, and boot argument if applicable. (If you need innie, you can keep Lilu). If you remove boot argument by NVRAM reset, you have to disable SIP again in order to modify system files.

If you have never attempted to enable AMD hardware acceleration then ignore the step above. Just make sure SIP is disabled so you can edit the system file.

2) Go to System⁩ ▸ ⁨Library⁩ ▸ ⁨PrivateFrameworks⁩

3) right click AppleGVA.framework

4) Duplicate this file and keep the duplicate copy somewhere safe incase you mess up and need to replace it.




9) double click the current AppleGVA.framework, you should able to open it.



Screenshot 2019-06-09 at 10.38.58 PM.png


18) open the Resources folder and open the info.plist with a text editor

19) search 7BA5B2D9E42DDD94

A.png



20) replace that by F221BEC8

B.png


in Terminal app copy and paste each line individually one after another


Code:
defaults write com.apple.AppleGVA gvaForceAMDKE -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCEncode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDAVCDecode -bool YES
defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -bool YES

you might want to run these commands too:


Optional steps to repair all modified files' permission.

22) In terminal, enter

Code:
sudo codesign --deep -fs - /System/Library/PrivateFrameworks/AppleGVA.framework

If at this stage Terminal reports an error "resource fork, Finder information, or similar detritus not allowed."

copy and paste this command in Terminal:

Code:
xattr -rc /System/Library/PrivateFrameworks/AppleGVA.framework

23) Enter

Code:
sudo chown -R root:wheel /System/Library/PrivateFrameworks/AppleGVA.framework


24) Enter

Code:
sudo update_dyld_shared_cache -force




21) Reboot.

I have tested this working on Mojave 10.14.6 with Vega56 i will test later with RX 480


This is even more involved than what I did. I simply edited the Info.plist file, duplicated the "<key><dict>" blocks for "Mac-7BA5B2D9E42DDD94" renaming the duplicated key to "MacPro5,1", ran the four "defaults" commands, and rebooted. No need for code signing or ownership changes.
 
  • Like
Reactions: sirbryan
I installed the latest 10.14.6 security update beta which replaced my previously edited AppleGVA.framework so I thought i would give this method a try.

I confirm this works!!!!!!

Much easier than hex editing.

I thought I'd try the code below, as a wild guess, but sadly it didn't enable HEVC Encode :confused::

Code:
defaults write com.apple.AppleGVA gvaForceAMDHEVCEncode -bool YES
Can't just make up preferences. Use grep to find the preferences. Use strings to see what else may exist in the file.
Code:
grep -ir 'com.apple.AppleGVA' /System/Library/PrivateFrameworks/AppleGVACore.framework /System/Library/PrivateFrameworks/AppleGVA.framework

strings /System/Library/PrivateFrameworks/AppleGVA.framework/AppleGVA

strings /System/Library/PrivateFrameworks/AppleGVACore.framework/AppleGVACore
Preference files (domains) look like com.apple.AppleGVA. The output of the strings command also includes com.apple.coremedia, com.apple.GVAEncoder, and com.apple.spot. You would have to disassemble the code to find out if those are also preferences. Both AppleGVA and AppleGVACore contain a string "gvaDebug" which might be useful. Disassemble the code to see how it's used. Google says it's just another preference:
 
  • Like
Reactions: w1z and cdf
This is even more involved than what I did. I simply edited the Info.plist file, duplicated the "<key><dict>" blocks for "Mac-7BA5B2D9E42DDD94" renaming the duplicated key to "MacPro5,1", ran the four "defaults" commands, and rebooted. No need for code signing or ownership changes.

Right. Rather than replacing items in Info.plist and rebuilding caches, all you have to do is add the Mac Pro's board-id (the F2... one I mentioned earlier) to Info.plist as if it was supported like all the other Mac motherboards.

Even a reboot isn't necessary. :cool:

I have yet to figure out what ffmpeg (videotoolbox) commands are required to get hardware-assisted H.264 encode to work outside of FCPX. (Seems as though FCPX doesn't use VT subroutines directly.)
[automerge]1574231144[/automerge]
But only H264 encode/decode and HEVC decode correct?
Yes, nothing more than what the other methods have given us (except OpenCore). Still investigating H.264 encode for VT-enabled apps.
 
Last edited:
There is something interesting about /System/Library/Video/Plug-Ins/AppleGVAHEVCEncoder.bundle/Contents/Info.plist, namely:

Code:
            <string>HEVCEncoder_CreateInstance</string>
            <key>CMManufacturer</key>
            <string>Apple</string>
            <key>CMMatchingInfo</key>
            <dict>
                <key>VTCodecType</key>
                <string>hvc1</string>
                <key>VTIORegistryCapabilitiesKey</key>
                <string>IOGVAHEVCEncodeCapabilities</string>
                <key>VTIsHardwareAccelerated</key>
                <true/>
            </dict>

[...]

    <key>System Support</key>
    <dict>
        <key>Mac-7BA5B2D9E42DDD94</key>
        <dict>
            <key>vendor8bit</key>
            <integer>1</integer>
        </dict>
    </dict>

Adding Mac-F221BEC8 doesn't do anything there... yet.

And running ioreg shows interesting flags, but missing the one mentioned above, specifically VTIsHardwareAccelerated:
Code:
$ ioreg -l  | grep IOGVA
    | |   |           |   |   "IOGVAHEVCEncode" = "1"
    | |   |           |   |   "IOGVAHEVCDecodeCapabilities" = {"VTPerProfileDetails"={"1"={"VTMaxDecodeLevel"=153},"2"={"VTMaxDecodeLevel"=153},"3"={"VTMaxDecodeLevel"=153}},"VTSupportedProfileArray"=(1,2,3)}
    | |   |           |   |   "IOGVAH264EncodeCapabilities" = {"VTQualityRating"=50,"VTRating"=350}
    | |   |           |   |   "IOGVACodec" = "AMDU7V4"
    | |   |           |   |   "IOGVAHEVCDecode" = "1"
    | |   |           |   |   "IOGVAHEVCEncodeCapabilities" = {"VTPerProfileDetails"={"1"={"VTMaxEncodeLevel"=153}},"VTQualityRating"=50,"VTRating"=350,"VTSupportedProfileArray"=(1)}
 
thank you so much for this very detailled panorama, this is cristal clear!

so yet there is no « download a pach and clic apply for noobs like me and everything works flawlessly just like if apple would have done it if they were not trying to force us to buy new machine , button »

it is so frustrating to be a noob and not being able to help out you guys!
 
And for those of you trying to figure out video sites like Amazon and Netflix...

This popped up in my logs when Safari (Silverlight) tried to play Netflix:

Code:
Couldn't read values in CFPrefsPlistSource<0x7ffa1452cbd0> (Domain: com.apple.AppleGVA, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access

Also,

Code:
Sandbox: com.apple.WebKit(871) deny(1) file-read-data /Users/bscott/Library/Preferences/com.apple.AppleGVA.plist
Violation:       deny(1) file-read-data /Users/bscott/Library/Preferences/com.apple.AppleGVA.plist 
Process:         com.apple.WebKit [871]

It looks like Safari is trying to read preferences to figure out HWAccel for DRM/H.264 decode and it can't.

I'm using the defaults.write method, but I may go and tweak AppleGVA anyway and see what happens.
 
I have yet to figure out what ffmpeg (videotoolbox) commands are required to get hardware-assisted H.264 encode to work outside of FCPX.

So, there's nothing special to be done. At least for me, "ffmpeg ... -c:v h264_videotoolbox ..." just works.
 
Instead of editing the AppleGVA binary, I simply added a board-id entry in Info.plist for the Mac Pro 5,1. I then turned all the gva variables on (defaults write com.apple.gva...):
Kudos for this discovery. On my MP3,1 with RX570 (Polaris), I just added the board ID & gva defaults, and I now have full H.264 playback & encode acceleration (neither for HEVC, though). I've been following the OpenCore thread and this one in hopes of enabling HW acceleration without screwing up the rest of my system, and this "light touch" mod seems to have done the trick. Thank you!
 
  • Like
Reactions: sirbryan
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.