Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RajdeepWasekar

macrumors newbie
Original poster
Sep 26, 2022
10
0
Hi
I'm looking for some solution where I can use my eGPU(AMD Radeon RX 6900XT) for Hardware acceleration (HEVC, H264).
I'm currently using Kryptonite using Open Core to load the GPU. Is there a way or procedure which can help me activate the Hardware Acceleration ?
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Hi
I'm looking for some solution where I can use my eGPU(AMD Radeon RX 6900XT) for Hardware acceleration (HEVC, H264).
I'm currently using Kryptonite using Open Core to load the GPU. Is there a way or procedure which can help me activate the Hardware Acceleration ?
Did you try changed the Board ID to the 7,1 or iMac Pro Board ID? That's required to fully activate GPU HWAccel on the 5,1.

I have no 6,1 and eGPU to run any test, but if I were you, I will try the 7,1 Board ID first.
 

arw

macrumors 65816
Aug 31, 2010
1,227
974
How does one verify if HA is fully active? I'm happy to do some testing.
I have a MP6,1 with D300 on 11.7.1 and an RX 6800 XT. Kryptonite without Board ID spoofing (don't know which parts of the config.plist to edit).
With the RX, VideoProc is green but Handbrake doesn't show Video Toolbox as encoder options.

edit: Attached my EFI partition

Off-topic: How would one properly disable the D300s / PCIe slots to save power? Blocking the GPU driver for the PCI slots doesn't reduce power consumption (last screenshot).
 

Attachments

  • mp6,1.png
    mp6,1.png
    83.5 KB · Views: 147
  • videoproc.rx6800xt.png
    videoproc.rx6800xt.png
    67.8 KB · Views: 158
  • rx6800xt.geekbench.metal.png
    rx6800xt.geekbench.metal.png
    68.7 KB · Views: 143
  • disable.D300s.png
    disable.D300s.png
    170.7 KB · Views: 145
  • MP61_eGPU_EFI.zip
    7.3 MB · Views: 107
Last edited:

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
How does one verify if HA is fully active? Then I can do some testing.
I have a MP6,1 with D300 on 11.7.1 and an RX 6800XT. Kryptonite without Board ID spoofing.
VideoProc is green but Handbrake doesn't show Video Toolbox as encoder options.
With disabled D300s VideoProc is green but doesn't explicitly show the RX.

edit: Attached my EFI partition without disabled D300s.

Off-topic: How would one properly disable the D300s / PCIe slots to save power? Blocking the GPU driver for the PCI slots doesn't reduce power consumption (last screenshot).
As long as the dGPUs are physically conencted, they will consume power. AFAIK, let the driver run is better. The "enter ultra low power state" instruction can only be sent via the GPU driver. If you block the driver, the GPU will keep running by the UEFI. It won't power down, and may even draw more power than using driver (during idle).

In order to let Video Proc display your 6800XT's info, you have to rename it to "AMD Radeon RX 6800 XT", as long as the word AMD is missing, Video Proc won't show it (but this should be cosmetic).

In handbrake, you mean no VideoToolBox options in this Video Encoder window?
Screenshot 2023-01-10 at 8.38.47.png


In general, if you can you play H264 videos by using HWAccel (for RX580 and Radeon VII, I can see the decoder's activity in OpenGL Driver Monitor), and use HEVC hardware encoding (fast encode with very low CPU usage), then all HWAccel function should be working correctly.

Anyway, I shared my findings for the 5,1 in this thread. The associated OC EFI folder is in the post #1314. You may download that and compare the config.plst, then see what you want to try.

If HWAccel doesn't work (despite Video Proc give you the green lights), I will leave the GPU naming thing aside first, that's cosmetic. And try to add WhateverGreen kext, unfairgva=1 boot argument, and spoof the Board ID to Mac-27AD2F918AE68F61
 
  • Like
Reactions: arw

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
How does one verify if HA is fully active? I'm happy to do some testing.

With the RX, VideoProc is green but Handbrake doesn't show Video Toolbox as encoder options.
Or you can simply perform the test inside VideoProc, just inport a H264 video, and select HEVC output. Disable Auto Copy if you are not 100% sure the source video isn't HEVC
Screenshot 2023-01-10 at 9.16.04.png


Then select HEVC output, you should see this green Support HWAccel
Screenshot 2023-01-10 at 9.14.58.png



Then start the transcoding. If HWAccel is working correctly, only Intel should light up (this has nothing to do about QuickSync, but just VideoProc no way to tell which GPU is using in HWAccel, therefore, always reporting Intel)
Screenshot 2023-01-10 at 9.16.20.png
 
  • Like
Reactions: killawat and arw

RajdeepWasekar

macrumors newbie
Original poster
Sep 26, 2022
10
0
Thank you for the reply.
But I'm very much confused with the process and the thread. Which thread should I follow for spoofing ?
 

arw

macrumors 65816
Aug 31, 2010
1,227
974
@RajdeepWasekar have you verified the steps suggested by @h9826790 and using VideoProc?

From my testing, with the default Kryptonite configuration, H264 and HEVC hardware de-/encode is already working:

- 4K HEVC playback in IINA uses less than half a core of CPU resources.

Then start the transcoding. If HWAccel is working correctly, only Intel should light up (this has nothing to do about QuickSync, but just VideoProc no way to tell which GPU is using in HWAccel, therefore, always reporting Intel)
Yes, it looks like that. Intel is green. Only little CPU load.
Although encode is not as fast as in my 5,1 with RX 570 but that maybe a bandwidth issue.

In order to let Video Proc display your 6800XT's info, you have to rename it to "AMD Radeon RX 6800 XT", as long as the word AMD is missing, Video Proc won't show it (but this should be cosmetic).
- Renaming the GPU worked fine for my 5,1 but so far I haven't figured out the correct PCI path to the GPU via the Thunderbolt enclosure.

In handbrake, you mean no VideoToolBox options in this Video Encoder window?
Yep, exactly that. Maybe if I succeed in spoofing the 7,1 board ID it appears. But so far all my attempts in transferring SMBIOS entries from your 5,1 config.plist result in my 6,1 not booting.

As long as the dGPUs are physically conencted, they will consume power. AFAIK, let the driver run is better. The "enter ultra low power state" instruction can only be sent via the GPU driver. If you block the driver, the GPU will keep running by the UEFI. It won't power down, and may even draw more power than using driver (during idle).
Thanks, that explains my measurements. Will look into the instruction.
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Although encode is not as fast as in my 5,1 with RX 570 but that maybe a bandwidth issue.
Possible

Renaming the GPU worked fine for my 5,1 but so far I haven't figured out the correct PCI path to the GPU via the Thunderbolt enclosure.

Did you try Hackintool? If you can see the eGPU at there, then you can easily get the corresponding PCIe path.
Screenshot 2023-01-11 at 7.49.08.png


But so far all my attempts in transferring SMBIOS entries from your 5,1 config.plist result in my 6,1 not booting.
So, even you just insert
Code:
<key>BoardProduct</key>
<string>Mac-27AD2F918AE68F61</string>
into the SMBIOS section. This will break the bootability straight away?
 
  • Like
Reactions: arw

startergo

macrumors 603
Sep 20, 2018
5,020
2,282
Renaming the GPU worked fine for my 5,1 but so far I haven't figured out the correct PCI path to the GPU via the Thunderbolt enclosure.
Can you attach an Ioregistry backup to this post or if you prefer you can send me a PM?
 
  • Like
Reactions: arw

RajdeepWasekar

macrumors newbie
Original poster
Sep 26, 2022
10
0
Did you try changed the Board ID to the 7,1 or iMac Pro Board ID? That's required to fully activate GPU HWAccel on the 5,1.

I have no 6,1 and eGPU to run any test, but if I were you, I will try the 7,1 Board ID first.
I've tried spoofing the board id to 7,1 but still didn't get smooth play back on the Sony HDR demo video. Even in DaVinci the playback is not lagging.
 

arw

macrumors 65816
Aug 31, 2010
1,227
974
Thanks @h9826790 and @startergo , with Hackintool I got the correct path. (bottom right TB2 socket)
Code:
PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)

I must have made an error when copying the path from gfxutil. The matching entry is:
Code:
/PCI0@0/PEG0@1/BR00@0/BR11@2/UFS1@0/DSB1@3/UPS0@0/pci-bridge@1/pci-bridge@0/pci-bridge@0/display@0

So, even you just insert
Code:
<key>BoardProduct</key>
<string>Mac-27AD2F918AE68F61</string>
into the SMBIOS section. This will break the bootability straight away?
Yes, with "UpdateSMBIOS=YES" in verbose I see it is related to Lilu:
Lilu dev: @ failed to obtain model information, retrying...
But let's see if it's already enough for @RajdeepWasekar as I'm good with how it is…

With the attached updated config.plist I created the screenshots. EFI folder from Post #3.
"model" name is manually set to my specific GPU.

edit: I'm using: Mac Pro 6,1 (TB Bus 0 Port 6, bottom right) > Apple TB2 cable (0,5m) > Apple TB3/TB2 adapter > Sonnet eGFX Breakaway Box 550 > ASUS TUF RX 6800 XT
 

Attachments

  • MP6,1.png
    MP6,1.png
    189.5 KB · Views: 102
  • VideoProc1.png
    VideoProc1.png
    198 KB · Views: 109
  • VideoProc2.png
    VideoProc2.png
    276.6 KB · Views: 103
  • VideoProc3.png
    VideoProc3.png
    939.1 KB · Views: 102
  • MP6.1_eGPU_config.plist.zip
    3.3 KB · Views: 89
Last edited:

RajdeepWasekar

macrumors newbie
Original poster
Sep 26, 2022
10
0
Thanks @h9826790 and @startergo , with Hackintool I got the correct path. (bottom right TB2 socket)
Code:
PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)

I must have made an error when copying the path from gfxutil. The matching entry is:
Code:
/PCI0@0/PEG0@1/BR00@0/BR11@2/UFS1@0/DSB1@3/UPS0@0/pci-bridge@1/pci-bridge@0/pci-bridge@0/display@0


Yes, with "UpdateSMBIOS=YES" in verbose I see it is related to Lilu:

But let's see if it's already enough for @RajdeepWasekar as I'm good with how it is…

With the attached updated config.plist I created the screenshots. EFI folder from Post #3.
"model" name is manually set to my specific GPU.

edit: I'm using: Mac Pro 6,1 (TB Bus 0 Port 6, bottom right) > Apple TB2 cable (0,5m) > Apple TB3/TB2 adapter > Sonnet eGFX Breakaway Box 550 > ASUS TUF RX 6800 XT
So I used your EFI and also changed the device name to my device name and path. And I don't see any improvement. The HDR video that is given in the link is lagging still. Playback is very choppy. Also in activity monitor the name of the GPU is coming something different.
1673481367041.png
1673481470396.png
 

startergo

macrumors 603
Sep 20, 2018
5,020
2,282
I must have made an error when copying the path from gfxutil. The matching entry is:
Code:
/PCI0@0/PEG0@1/BR00@0/BR11@2/UFS1@0/DSB1@3/UPS0@0/pci-bridge@1/pci-bridge@0/pci-bridge@0/display@0
Try this SSDT. Inspect the IOregistry to see if attached correctly.
 

Attachments

  • BRG0-6800-XT.zip
    1.2 KB · Views: 88
  • Like
Reactions: arw

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
So I used your EFI and also changed the device name to my device name and path. And I don't see any improvement. The HDR video that is given in the link is lagging still. Playback is very choppy. Also in activity monitor the name of the GPU is coming something different. View attachment 2140641 View attachment 2140643
Apart from HWAccel, did you check if the eGPU work as expected? (e.g. in 3D, or GPGPU). Besides, can you check the device ID for your 6900XT, AFAIK, there are more than one device ID for 6900XT, not all supported natively in macOS.
 

RajdeepWasekar

macrumors newbie
Original poster
Sep 26, 2022
10
0
Apart from HWAccel, did you check if the eGPU work as expected? (e.g. in 3D, or GPGPU). Besides, can you check the device ID for your 6900XT, AFAIK, there are more than one device ID for 6900XT, not all supported natively in macOS.
yeah other things are working fine except HEVC and h.264 encode/decode.
Are you able to playback this smoothly ? https://4kmedia.org/sony-swordsmith-hdr-uhd-4k-demo/
 

startergo

macrumors 603
Sep 20, 2018
5,020
2,282
So I used your EFI and also changed the device name to my device name and path. And I don't see any improvement. The HDR video that is given in the link is lagging still. Playback is very choppy. Also in activity monitor the name of the GPU is coming something different. View attachment 2140641 View attachment 2140643
it is not detected properly. Can you attach the IOregistry backup here?
 

arw

macrumors 65816
Aug 31, 2010
1,227
974
In Activity Monitor it looks the same for me (except port 6).
And while other HEVC HDR 4K content is playing smoothly with HA, the mentioned "Sony-Swordsmith-HDR-UHD-4K.mp4" also stutters unless I disable GPU decode.
The only difference I can see is the high bitrate.
It plays fine with HA on my MP5,1 with RX 570.
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format-Profil : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec-ID : hvc1
Codec-ID/Info : High Efficiency Video Coding
Dauer : 1min 26s
Bitrate : 71,4 Mbps
maximale Bitrate : 114 Mbps
Breite : 3 840 Pixel
Höhe : 2 160 Pixel
Bildseitenverhältnis : 16:9
Modus der Bildwiederholungsrate : konstant
Bildwiederholungsrate : 59,940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.144
Stream-Größe : 733 MiB (100%)
Kodierungs-Datum : UTC 2016-10-24 06:29:51
Tagging-Datum : UTC 2016-10-24 05:33:22
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : R: x=1.000000 y=1.000000, G: x=1.000000 y=1.000000, B: x=1.000000 y=1.000000, White point: x=1.000000 y=1.000000
Mastering display luminance : min: 0.1000 cd/m2, max: 0 cd/m2
Codec configuration box : hvcC
it is not detected properly. Can you attach the IOregistry backup here?
Sent PM
 
Last edited:

startergo

macrumors 603
Sep 20, 2018
5,020
2,282
It looks like we cannot inject or modify IOReg properties into any device connected via Thunderbolt.
 
  • Like
Reactions: arw
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.