Contribute
Register

[Guide] Intel Framebuffer patching using WhateverGreen

Joined
Aug 14, 2010
Messages
1,013
Motherboard
GA-Z97X-UD5H-BK Rev 1.0 Bios F8
CPU
i7-4790k OC 4.9ghz
Graphics
GT 740
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. iOS
You're injecting audio layout 14. Not what you were injecting before. Check General->Audio section in FB-Patcher. Also check Installed section to make sure AppleALC is installed.
@headkaze - that is also odd it should have been 13, that is what I chose from the dropdown (I don't think 14 is an option) - as I said to @RehabMan I am going to run the install again - in fact I am going to do it several times.
 
Joined
Aug 14, 2010
Messages
1,013
Motherboard
GA-Z97X-UD5H-BK Rev 1.0 Bios F8
CPU
i7-4790k OC 4.9ghz
Graphics
GT 740
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. iOS
Yes, of course.
People really need to pay close attention to their kextcache output!
@RehabMan where do I view kextcache output? Let me modify that that question, I found it in the PR files. Is there another way of viewing it except via the PR files?
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,624
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
@RehabMan where do I view kextcache output? Let me modify that that question, I found it in the PR files. Is there another way of viewing it except via the PR files?

In Terminal, rebuild cache:
Code:
sudo kextcache -i /
 
Joined
Aug 14, 2010
Messages
1,013
Motherboard
GA-Z97X-UD5H-BK Rev 1.0 Bios F8
CPU
i7-4790k OC 4.9ghz
Graphics
GT 740
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. iOS
In Terminal, rebuild cache:
Code:
sudo kextcache -i /
thank you
@headkaze - that is also odd it should have been 13, that is what I chose from the dropdown (I don't think 14 is an option) - as I said to @RehabMan I am going to run the install again - in fact I am going to do it several times.
@RehabMan and @headkaze I have run several times again and initially kept getting the same result - then on paying closer attention to the wording of the kextcache output I realised something.

I had thought that I could have all my injected kexts in both EFI/Clover/Kexts/Other and in Library/Extensions provided I had set in config.plist SystemParameters/Inject Kexts to Detect. I thought this meant that they would only be loaded from Clover if they were missing in Library/Extensions.

I read from the kextcache output

"AppleALC.kext - dependency 'as.vit9696.Lilu' not found.
AppleALC.kext is missing dependencies (including anyway; dependencies may be available from elsewhere)"

and wondered if it was a clash due to Lilu, WhateverGreen and AppleALC not being loaded from the same place.

I removed all three from EFI/Clover/Kexts/Other and rebooted - a check of kextcache output revealed that the error regarding finding Lilu was gone for AppleALC

I then carried on testing. Unfortunately the result remains the same I can't get HDMI audio either with just injecting the layout ID alone (tested with all layouts available in FB-Pacher) or with injecting layout ID and spoofing (again tested with all layouts)

@headkaze I believe that the error you saw when layout ID14 was selected in the first PR files I sent would have been due to me not first deleting the entry from config.plist and rebooting before trying another layout in FB-Patcher. I realise now that while you can change the layout ID without deleting the entry and rebooting the same is not true if you have already spoofed the device. At least that is the best theory I have come up with.
 

Attachments

  • debug_18337.zip
    1.5 MB · Views: 51

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,624
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I thought this meant that they would only be loaded from Clover if they were missing in Library/Extensions.

No.

The big switch for "Detect" is presence of FakeSMC.kext or VirtualSMC.kext in kernel cache.

With InjectKexts="Detect":
If FakeSMC.kext or VirtualSMC.kext in cache (eg. installed to /L/E): NO kexts from Clover/kexts/Other are injected.
If neither FakeSMC.kext or VirtualSMC.kext in cache (eg. not installed to /L/E): ALL kexts from Clover/kexts/Other are injected.

My recommendation: Install "all kexts you need" to /L/E. Copy "essential kexts" to EFI/Clover/kexts/Other.
Note that there is overlap between the two sets "all kexts you need" and "essential kexts".

Unfortunately the result remains the same I can't get HDMI audio either with just injecting the layout ID alone (tested with all layouts available in FB-Pacher) or with injecting layout ID and spoofing (again tested with all layouts)
The setup you have now is proof enough that AppleALC + device-id inject is not enough to do what FakePCIID_Intel_HDMI_Audio.kext does (as I expected, since there just isn't code in AppleALC that does what we need it to do in this case).

Until such options/code are added to AppleALC, FakePCIID_Intel_HDMI_Audio.kext remains useful in this case.
 
Joined
Aug 14, 2010
Messages
1,013
Motherboard
GA-Z97X-UD5H-BK Rev 1.0 Bios F8
CPU
i7-4790k OC 4.9ghz
Graphics
GT 740
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. iOS
No.

The big switch for "Detect" is presence of FakeSMC.kext or VirtualSMC.kext in kernel cache.

With InjectKexts="Detect":
If FakeSMC.kext or VirtualSMC.kext in cache (eg. installed to /L/E): NO kexts from Clover/kexts/Other are injected.
If neither FakeSMC.kext or VirtualSMC.kext in cache (eg. not installed to /L/E): ALL kexts from Clover/kexts/Other are injected.

My recommendation: Install "all kexts you need" to /L/E. Copy "essential kexts" to EFI/Clover/kexts/Other.
Note that there is overlap between the two sets "all kexts you need" and "essential kexts".


The setup you have now is proof enough that AppleALC + device-id inject is not enough to do what FakePCIID_Intel_HDMI_Audio.kext does (as I expected, since there just isn't code in AppleALC that does what we need it to do in this case).

Until such options/code are added to AppleALC, FakePCIID_Intel_HDMI_Audio.kext remains useful in this case.

@RehabMan thank you for that explanation. @headkaze I will use FakePCIID_Intel_Audio.kext just now as it is known to be working for me on the BRIX I am currently testing on. I do like the FB-Patcher and will try to use it for USB on another machine (the one in my profile) so no doubt I will be in touch again soon. Thank you for all the help so far
 
Joined
Jun 20, 2014
Messages
1,015
Motherboard
Gigabyte Aero 15X v8-BK4K4P
CPU
i7-8750H
Graphics
UHD 630 / GTX 1070
The setup you have now is proof enough that AppleALC + device-id inject is not enough to do what FakePCIID_Intel_HDMI_Audio.kext does (as I expected, since there just isn't code in AppleALC that does what we need it to do in this case).

Until such options/code are added to AppleALC, FakePCIID_Intel_HDMI_Audio.kext remains useful in this case.

It is odd as the device-id injection works for me and at least one other person I know of (@neocoma504). We also know device-id injection works for IGPU so I'm not sure why it doesn't work in @the_gael's case.

@the_gael Sorry I was wrong about the layout-id being 14 it was indeed 13 (0x0d). So the properties you're injecting do look correct.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,624
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
It is odd as the device-id injection works for me and at least one other person I know of (@neocoma504). We also know device-id injection works for IGPU so I'm not sure why it doesn't work in @the_gael's case.

It really depends on what specific native device you have, and which problem in particular you're trying to fix.
 
Joined
Jun 20, 2014
Messages
1,015
Motherboard
Gigabyte Aero 15X v8-BK4K4P
CPU
i7-8750H
Graphics
UHD 630 / GTX 1070
It really depends on what specific native device you have, and which problem in particular you're trying to fix.
In @the_gael's case it appears a simple device-id spoof in device properties is not enough. I originally thought that was all FakePCIID was doing but upon further inspection I see it injects into the PCI config space too. So it's more of a hardware level spoof injection. I think the ideal solution would be to integrate this type of injection into AppleALC and maybe have some sort of boot flag to toggle it.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,624
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
In @the_gael's case it appears a simple device-id spoof in device properties is not enough.

Yes... As mentioned earlier, requires hooking PCI config space queries for device-id.

I originally thought that was all FakePCIID was doing but upon further inspection I see it injects into the PCI config space too. So it's more of a hardware level spoof injection.

Yup.

I think the ideal solution would be to integrate this type of injection into AppleALC and maybe have some sort of boot flag to toggle it.

I proposed the same to vit9696 a while back (when I was proposing my PR for no-controller-patch).

Yes... similar code already exists in WhateverGreen which could be adopted in AppleALC.

And then a bunch of patching could be removed (Controllers.plist related).
 
Top