Contribute
Register

KextsToPatch migration to Whatevergreen.kext

Joined
May 14, 2017
Messages
68
Motherboard
Lenovo G50-80
CPU
5200U
Graphics
HD 5500, R5 330M(disabled)
Mobile Phone
iOS
My Graphics Card is Intel HD Graphics HD5500. When I upgrade my system to Mojave, I got a DVMT kp and solved it like the first example in this guide with all KextsToPatch disabled:
https://www.tonymacx86.com/threads/guide-intel-framebuffer-patching-using-whatevergreen.256490/

But I found I cannot use HDMI Audio! So I Try to copy the KextsToPatch in whatevergreen like this:(the image below is also from the guide mentioned before)

But it doesn't work until I use Framebuffer-patch0-xxxx(I used Framebuffer-patch1-xxx at first) So I want to confirm a detail:
If I use whatevergreen KextsToPatch Function, Should I use the number of the patch name starting from 0 instead of 1? That is to say, The KextsToPatch in whatevergreen can only start with framebuffer-patch0-xxxx, and if you use framebuffer-patch1-xxx without Framebuffer-patch0-xxx, the Framebuffer-patch1-xxx wouldn't work.
Here is the Whatevergreen property I use now, and HDMI Audio really works. Please note that I disable the original KextsToPatch.
upload_2018-9-16_10-43-7.png
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
But it doesn't work until I use Framebuffer-patch0-xxxx(I used Framebuffer-patch1-xxx at first) So I want to confirm a detail:
If I use whatevergreen KextsToPatch Function, Should I use the number of the patch name starting from 0 instead of 1? That is to say, The KextsToPatch in whatevergreen can only start with framebuffer-patch0-xxxx, and if you use framebuffer-patch1-xxx without Framebuffer-patch0-xxx, the Framebuffer-patch1-xxx wouldn't work.
The code bails out at the first non-existing framebuffer-patchX-enable:
Code:
    for (size_t i = 0; i < MaxFramebufferPatchCount; i++) {
       char name[48];
       snprintf(name, sizeof(name), "framebuffer-patch%lu-enable", i);
       // Missing status means no patches at all.
       uint32_t framebufferPatchEnable = 0;
       if (!WIOKit::getOSDataValue(igpu, name, framebufferPatchEnable))
           break;
...
It means you must start at 0 and you can't have any gaps (starting at non-zero is simply starting with a gap).

Here is the Whatevergreen property I use now, and HDMI Audio really works. Please note that I disable the original KextsToPatch.
View attachment 351098
Better to use framebuffer-conX-type and framebuffer-conX-flags to change that.
The X will depend on what connector position the 0105 port is at in your specific ig-platform-id.
Typically 0105 is at position 1 for laptop ig-platform-ids (because the LVDS connector is at 0).
 
Joined
May 14, 2017
Messages
68
Motherboard
Lenovo G50-80
CPU
5200U
Graphics
HD 5500, R5 330M(disabled)
Mobile Phone
iOS
Better to use framebuffer-conX-type and framebuffer-conX-flags to change that.
The X will depend on what connector position the 0105 port is at in your specific ig-platform-id.
Typically 0105 is at position 1 for laptop ig-platform-ids (because the LVDS connector is at 0).
So you mean the connector number also starts from 0? should I use property of types for both con0 and con1 to prevent the same issue that patch for con1 without con0 doesn't work?

BTW, I don't know why my laptop's built-in VGA port and HDMI video function can be used with no Framebuffer patch. I am informed that MacBook don't support VGA port any more long long ago. maybe deeper understanding towards graphics is needed? Or, the built-in port for laptop doesn't need patches to have it detected, but HDMI Audio does? I know that Whatevergreen will change the type from DP to HDMI unless you add the boot flag -igfxnohdmi https://github.com/acidanthera/WhateverGreen

I wonder if it is the automatic patch that makes HDMI video works automatically?
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
So you mean the connector number also starts from 0? should I use property of types for both con0 and con1 to prevent the same issue that patch for con1 without con0 doesn't work?
You asked about framebuffer-patchX, not framebuffer-conX.
My answer (regarding patchX being zero-based and contiguous) is specific to framebuffer-patchX.

For framebuffer-conX, the X indicates the connector position you're attempting to patch. They can be in any order. Valid conX values range from 0-3, as there are 4 connectors.

To be clear, the X in framebuffer-conX properties has a completely different meaning than the X in framebuffer-patchX properties.

BTW, I don't know why my laptop's built-in VGA port can be used with no Framebuffer patch. I am informed that MacBook don't support VGA port any more long long ago. maybe deeper understanding towards graphics is needed? Or, the built-in port for laptop doesn't need patches to have it detected, but HDMI Audio does?
Sometimes the VGA typed as DP works. Just go with it if you find VGA useful.

I wonder if it is the automatic patch that makes HDMI video works automatically?
If you don't specify kernel flag -igfxnohdmi, all DP connectors will automatically be changed to HDMI, as if you did it manually with the required framebuffer-conX properties.

If your computer has only HDMI ports, this is fine. If your computer has any DP ports, then it is a bit of a bad default, requiring the -igfxnohdmi kernel flag to prevent such automatic patching.
 
Last edited:
Top