Contribute
Register

Radeon RX 4XX/5XX standalone system, AMDRadeonX4250.kext (GVA support H264) does not support HEVC HW

Status
Not open for further replies.
I have an ASUS Z390and an i7-8700K. I'm using iMac 19,1 in SMBIOS (speed step is fine from 1.6 to 5ghz) and Clover.
I jumped from Catalina 10.15.1 to 10.15.3
I force ATI DGPU use with "defaults write com.apple.AppleGVA gvaForceAMDKE -boolean yes" and "defaults write com.apple.AppleGVA gvaForceAMDHEVCDecode -boolean yes"
I checked using console Log + monitor + intel's gadget

I tested using FCPX and handbrake: H264 encoding and decoding are using AMD GPU only
For HEVC encoding FCPX is using both Intel IGPU + AMD DGPU

Everything is not better as when I try to read H265 10 bits 4K 60 FPS content (like SAMSUNG demo) with players (like Elmedia) it is random :

sometimes the AMD GPU + CPU is used and it is stuttered as CPU it is closed to 100%
sometimes AMD GPU only is used (CPU remains to 90% idle) -> perfect playing

with VLC screen remains black (!)
with IINA CPU is always used

I didn't test iMac Pro value in SMBIOS, do you think it worth it ? I read in this post someone has had better results with ImcPro1,1 value, I didn't understand why as IGPU is supposed to be very fast (but not the best in quality)


So far both H264/H265 is working with imac19,1 in SMBIOS in Catalina 10.5.3, no need of dummy kext
 
I'm surprised that you believe your Ivy Bridge CPU power management is working with any help except for PlugInType=1 for iMacPro1,1 model ID. Have you checked that the SpeedStep P-States switch actually step across the whole range using Hackintool ? Also have you checked the CPU power consumption and average speed during idle which ?
@macnb
Thanks for the CPUfriend.kext tips, i switched from imac13,2 to imacPro1,1 now HEVC is fine (10.15.3)
Like @mitch_de i use only PlugInType=1 and KernelXCPM ticked in Clover configurator.
All my P-states shows up in Hackintool.
https://github.com/al3xtjames/Gigabyte-GA-Z77X-macOS-Install/issues/77#issuecomment-386847691
is it really necessary to generate an ssdtPRGen.sh if KernelXCPM is working?
 
@macnb
Thanks for the CPUfriend.kext tips, i switched from imac13,2 to imacPro1,1 now HEVC is fine (10.15.3)
Like @mitch_de i use only PlugInType=1 and KernelXCPM ticked in Clover configurator.
All my P-states shows up in Hackintool.
You're welcome.

But what does Intel Power Gadget show in the charts ?
What is the Average frequency of all cores ?
You should also check the PKG power consumption.

Even with CPUFriend, an SSDT generated by ssdtPRGen.sh and PluginType set to 1 (in the SSDT), my Ivy Bridge running as iMacPro1,1 does not idle at 1.6GHz.

Avg is 3.2Ghz and Avg temp is 34 Deg C.
Screenshot 2020-02-25 at 13.35.25.png

[QUOTE="zedoc, post: 2075894, member: 757080"]
is it really necessary to generate an ssdtPRGen.sh if KernelXCPM is working?
[/QUOTE]
Yes I believe ssdtPRGen is required because KernelXCPM forces macOS to use XNU CPM in the kernel as opposed to AppleIntelCPUPowerManagement.kext. KernelXCPM does not create the necessary CPU frequencies for all the P-States.
Clover can generate "similar" frequencies if you set in PlugInType=1. But you should not do that if you are using ssdtPRGen.sh.
It is debatable which generates better frequency tables (ssdtPRGen vs Clover) :)
 
Last edited:
I had a hard time finding the settings in Mojave in this thread,
but I was able to use HEVC conversion just by setting it to "SMBIOS MacPro1.1".

Used equipment:HP8100CMT i7-870 RX460

Since the sample file could not be downloaded, the trailer for H264 was downloaded from here and converted to HEVC below.
The command has been modified so that it can be played on QuickTime.

Code:
ffmpeg -i input.mp4 -c:v hevc_videotoolbox -tag:v hvc1 -b:v 5000k output.mp4

Play the completed out.mp4 with IINA and display the information with Command + i. The information is displayed on the HW by VideoToolbox.
ffmpeg does not work with "SMBIOS iMac13.2", but the playback information of IINA is displayed in HW by VideoToolbox.

For a while, I'm going to set it to "SMBIOS MacPro1.1".
 
Last edited:
You're welcome.

But what does Intel Power Gadget show in the charts ?
What is the Average frequency of all cores ?
You should also check the PKG power consumption.

Even with CPUFriend, an SSDT generated by ssdtPRGen.sh and PluginType set to 1 (in the SSDT), my Ivy Bridge running as iMacPro1,1 does not idle at 1.6GHz.

Avg is 3.2Ghz and Avg temp is 34 Deg C.
View attachment 451600
[QUOTE="zedoc, post: 2075894, member: 757080"]
is it really necessary to generate an ssdtPRGen.sh if KernelXCPM is working?
Yes I believe ssdtPRGen is required because KernelXCPM forces macOS to use XNU CPM in the kernel as opposed to AppleIntelCPUPowerManagement.kext. KernelXCPM does not create the necessary CPU frequencies for all the P-States.
Clover can generate "similar" frequencies if you set in PlugInType=1. But you should not do that if you are using ssdtPRGen.sh.
It is debatable which generates better frequency tables (ssdtPRGen vs Clover) :)
[/QUOTE]

@macnb
interesting, for now with PlugInType=1 and KernelXCPM ticked in Clover configurator and CPUFriend+CPUFriendDataProvider.kext in clover/kext/other/
my Average frequency of all cores is around 2.5Ghz
Capture d’écran 2020-03-02 à 04.21.51.png
when performing full CPU usage:
Capture d’écran 2020-03-02 à 15.50.15.png
my plugin type setting in clover configurator:
Capture d’écran 2020-03-02 à 15.59.33.png
Capture d’écran 2020-03-02 à 16.09.34.png

I'm planning to try ssdtPRGen+ssdt_data.dsl combined to compare (my OC is 4.5).
should i run:
Code:
sudo ~/ssdtPRGen.sh -c 2 -t 77 -turbo 4500 -target 1 -x 1 -b Mac-FC02E91DDD3FA6A4
to generate ssdt or get rid of -x 1 probably, then untick KernelXCPM in clover?:think:
Code:
sudo ~/ssdtPRGen.sh -c 2 -t 77 -turbo 4500 -target 1 -b Mac-FC02E91DDD3FA6A4

i've also found this interesting post by @LisaAlterEgo here for me to combine ssdt_data.dsl with ssdtPRGen ssdt:
https://www.tonymacx86.com/threads/...ver-uefi-hotpatch.279627/page-13#post-2058672

16. You need to combine the ssdt_data.dsl file with the previously created ssdt.dsl file:

open ssdt_data.dsl
open ~/PRGen170/ssdt.dsl

These should open in MaciASL. In your MaciASL editor, search for "plugin-type" in the ssdt.dsl.
Two lines above, remove the "0x02" after package (leaving an empty pair of parentheses), put a comma
after "One", copy the 5 lines starting with "cf-frequency-data" from the ssdt_data file, and paste it
after the "One," in the ssdt.dsl file.

It was not very clear for me from the CPUFriend github explanation :)

Also are you using EIST on Auto or Disable in BIOS settings?
 
Hardware support for HEVC disables when I disable iGPU with 10.15.3 - iMacPro smbios.

Back when I was using Mojave I had switched to iMacPro smbios and at that point both HEVC and H.264 was being handled by AMD, there was no difference whether iGPU was on or off in BIOS. But I kept it ON for windows.

Now I am using 10.15.3 and I recently switched off iGPU in bios and today I realised that I no longer have support for HEVC. playing or outputting HEVC in FCPX shoots up CPU usage. I am still on iMacPro smbios. No changes with config at all, just disabled iGPU in bios.
Switching on iGPU brings back support for HEVC but it doesn't use iGPU at all, render happens on AMD only but it seems that it just wants iGPU to be enabled in bios even though it doesn't even touch it while rendering.
 
Hardware support for HEVC disables when I disable iGPU with 10.15.3 - iMacPro smbios.

Back when I was using Mojave I had switched to iMacPro smbios and at that point both HEVC and H.264 was being handled by AMD, there was no difference whether iGPU was on or off in BIOS. But I kept it ON for windows.

Now I am using 10.15.3 and I recently switched off iGPU in bios and today I realised that I no longer have support for HEVC. playing or outputting HEVC in FCPX shoots up CPU usage. I am still on iMacPro smbios. No changes with config at all, just disabled iGPU in bios.
Switching on iGPU brings back support for HEVC but it doesn't use iGPU at all, render happens on AMD only but it seems that it just wants iGPU to be enabled in bios even though it doesn't even touch it while rendering.
Recent WhateverGreen versions have dealt with the issue. Did you try it?
 
Recent WhateverGreen versions have dealt with the issue. Did you try it?

Yes, I did I have updated both lilu and weg.
I have Vega 64 and I think the AMD acceleration issue with Catalina was with only 4**/5** cards but I could be wrong.

I have tested it on 2 PC, one has 5700 XT and other Vega 64, both machines lose HEVC support when iGPU is disabled. I tried both iMacPro and MacPro7,1 SMBIOS.
Seems pretty odd as in Mojave iGPU's status was irrelevant with iMacPro smbios.

I have attached my CLOVER folder for you or anyone else to have a look.
 

Attachments

  • CLOVER.zip
    3.3 MB · Views: 56
Yes, I did I have updated both lilu and weg.
I have Vega 64 and I think the AMD acceleration issue with Catalina was with only 4**/5** cards but I could be wrong.

I have tested it on 2 PC, one has 5700 XT and other Vega 64, both machines lose HEVC support when iGPU is disabled. I tried both iMacPro and MacPro7,1 SMBIOS.
Seems pretty odd as in Mojave iGPU's status was irrelevant with iMacPro smbios.

I have attached my CLOVER folder for you or anyone else to have a look.

Could you provide your IORegistryExplorer output, and in particular,
tell us what Radeon Framebuffers are being selected? There are injectors
to enable HEVC for Baffin and Ellesmere, but I'm not sure what your cards
default to.
 
Hardware support for HEVC disables when I disable iGPU with 10.15.3 - iMacPro smbios.

Back when I was using Mojave I had switched to iMacPro smbios and at that point both HEVC and H.264 was being handled by AMD, there was no difference whether iGPU was on or off in BIOS. But I kept it ON for windows.

Now I am using 10.15.3 and I recently switched off iGPU in bios and today I realised that I no longer have support for HEVC. playing or outputting HEVC in FCPX shoots up CPU usage. I am still on iMacPro smbios. No changes with config at all, just disabled iGPU in bios.
Switching on iGPU brings back support for HEVC but it doesn't use iGPU at all, render happens on AMD only but it seems that it just wants iGPU to be enabled in bios even though it doesn't even touch it while rendering.
When I was testing the operation with "SMBIOS = MacPro6.1", I was wondering why the HEVC file that had been playing was not playable.
This is probably due to a change in the on / off setting of the iGPU.

After reading the @DiscoDancer post, I tried to see if the result of VTCopyVideoEncoderList changes depending on whether iGPU is enabled or disabled during installation.
The result is that the result of VTCopyVideoEncoderList changes, but I can not decipher the changed contents.

A simple Xoce program will be posted, so if you are interested in the content, try it.
Dump VTCopyVideoEncoderList information to ~ / VTCopyVideoEncoderList.txt.

Code:
#import <Foundation/Foundation.h>
#import <VideoToolbox/VTVideoEncoderList.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool
    {
        NSMutableString *record = [NSMutableString stringWithCapacity:0];
        [record appendString:@"Dump:VTCopyVideoEncoderList\n"];

        CFArrayRef encoder_list;
        VTCopyVideoEncoderList(NULL, &encoder_list);
        
        NSArray *array = (__bridge NSArray*)encoder_list;
        
        int index = 1;
        for( id list in array )
        {
            NSArray *keys = [list allKeys];
            [record appendFormat:@"index[%02d] \n{", index];
            for( id key in keys)
            {
                if( [key compare:@"CodecType"] != NSOrderedSame )
                    [record appendFormat:@"\n%@:\"%@\"",key, [list objectForKey:key]];
                else
                    [record appendFormat:@"\n%@:\"%@\"(0x%08X)",
                       key,
                       [list objectForKey:key],
                       (int)[[list objectForKey:key] integerValue]
                      ];

//                NSLog(@"index[%2d] key[%@] data[%@]", index, key, [list objectForKey:key]);
            }
            [record appendString:@"\n},\n"];
            index++;
        }
        CFRelease(encoder_list);
        
        NSString *file = @"~/VTCopyVideoEncoderList.txt";
        [record writeToFile:[file stringByExpandingTildeInPath]
                 atomically:YES
                   encoding:NSUTF8StringEncoding
                      error:NULL];
    }
    return 0;
}
 
Status
Not open for further replies.
Back
Top