Jump to content

Zenith432

Zenith432

Member Since 21 Jun 2009
Offline Last Active Today, 08:39 AM
*****

Posts I've Made

In Topic: Intel HD 630 acceleration

29 July 2017 - 09:12 AM

@Glad79:

In IORegistry, check the connector-type on each AppleIntelFramebuffer object.  4 is DP, 8 is HDMI.  I don't know which is DVI.

If the connector-type is wrong, you need to add KextPatch for each port to the right connector-type.  Download sample config.plist from

here.  It has patches showing how change each of the 3 ports from DP->HDMI (4->8), however, you need to change the patch strings to change 4 to the right type (8 or DVI type).

In Topic: Clover Bug/Issue Report and Patch

27 July 2017 - 02:04 PM

@cecekpawon:
I don't have any recovery partitions, and I'm not using BaseSystem.dmg on the fly. It's already expanded onto HFS+ filesystem on the USB stick.
The prelinkedkernel on it did not contain AppleIntelKBLGraphicsFramebuffer. The kext only existed in /System/Library/Extensions in normal form, and yet, after kernel
initialization, it decided to load this kext even though it wasn't prelinked.
Lilu has mechanism to wait for late-load kext to load before patching. Clover can't do this because it's before kernel initialization.
 

Already proposed before, heres from my last mods IsPatchNameMatch...


I see full bundle name is already implemented today (in 4128)

PatchKext
  } else {
    //
    //others
    //
    for (i = 0; i < Entry->KernelAndKextPatches->NrKexts; i++) {
      CHAR8 *Name = Entry->KernelAndKextPatches->KextPatches[i].Name;
      BOOLEAN   isBundle = (AsciiStrStr(Name, ".") != NULL);
      if ((Entry->KernelAndKextPatches->KextPatches[i].DataLen > 0) &&
          isBundle?(AsciiStrCmp(gKextBundleIdentifier, Name) == 0):(AsciiStrStr(InfoPlist, Name) != NULL)) {
      //    (AsciiStrStr(InfoPlist, Entry->KernelAndKextPatches->KextPatches[i].Name) != NULL)) {
        DBG_RT(Entry, "\n\nPatch kext: %a\n", Entry->KernelAndKextPatches->KextPatches[i].Name);
        AnyKextPatch(Driver, DriverSize, InfoPlist, InfoPlistSize, i, Entry);
      }
    }
  }

so what PMHeart suggested in #2391 already works.

In Topic: Clover Bug/Issue Report and Patch

27 July 2017 - 11:16 AM

com.apple.driver.AppleIntelKBLGraphics is also a substring of com.apple.driver.AppleIntelKBLGraphicsFramebuffer ;)

In Topic: Clover Bug/Issue Report and Patch

27 July 2017 - 11:00 AM

Done!

  • First, I turned on KernelAndKextPatches->Debug.  In the regular system, the AppleIntelKBL... kexts get patched as expected.  In the USB stick system, only XHCIPCI gets patched.
  • Then, I did as cecekpawon suggested and ran 'lzvn -d ... list' on prelinkedkernel from USB stick and... AppleIntelKBLGraphicsFramebuffer is not there :)  Like cecekpawon said.
  • For some reason, KBLFramebuffer still gets loaded by the USB stick even though it's not in its prelinkedkernel.
  • Next, I tried various options to 'kextcache -u' run offline from a regular system in order to get the USB stick prelinkedkernel to include KBLFramebuffer.  None of them worked.  I also noticed it's possible to give '-v 5' option to kextcache and it will list all kext bundles it's including in the prelinkedkernel (so spares the need to use lzvn.)
  • Next, I tried another method - I booted the USB Installer stick.  Then ran 'mount -uw /' to make its root filesystem writable.  Then deleted prelinkedkernel on it, and ran 'kextcache -system-prelinked-kernel'.  I checked with lzvn that this time it includes AppleIntelKBLGraphicsFramebuffer.  Success!
  • Finally, I removed IntelGraphicsFixup, Lilu, rebuilt prelinkedkernel locally on booted USB stick.  Checked it has KBLFramebuffer, but not IntelGraphicsFixup/Lilu.  Then I rebooted USB stick with patches in Clover config.plist... and all works :)

So that problem solved :thumbsup_anim:

 

In the process I discovered another bug in Clover...

See the Clover kext patch log in the photo...

 

The Clover kext patcher applies the patch meant for

AppleIntelKBLGraphics

to

AppleIntelKBLGraphicsFramebuffer

and it finds 4 instances of the hex string and patches them!  Even though patch is not meant for this kext!

Fortunately this does not cause crash that I ran into.

But it's still wrong to do.

In Topic: Clover Bug/Issue Report and Patch

27 July 2017 - 08:24 AM

Sorry, but where is the "installer prelinked" you are talking about? I explicitly rebuild
/System/Library/PrelinkedKernels/prelinkedkernel
on the USB stick by deleting it, and running 'kextcache -u' from regular system on the USB stick - after every change to /S/L/E on the stick.
It is the only prelinked with FakeSMC embedded, and since the USB stick boots (as long as IntelGraphicsFixup is also included) - I believe it is the correct prelinked.
I have tired this with
putting KBLFramebuffer in this prelinked and leaving it out.
putting IntelGraphicsFixup+Lilu in this prelinked and leaving it out.
So I have no reason to suspect that KBLFramebuffer is being "singled out" and being left out of the prelinked when I build it explicitly (or that I have the wrong prelinked).
However, I'll try lzvn to see what's in the prelinked later when I have time.

Thanks.
 

Zenith432: Please double check if your "com.apple.driver.AppleIntelKBLGraphicsFramebuffer" does exists on your installer prelinked. My best guess is No, seems Apple never prelinked it (including AppleHDA and some more) in installer / recovery. Yes, I can confirm "com.apple.driver.usb.AppleUSBXHCIPCI" exists on my prelinked installer. To be sure, please compare both (prelinked on installer & installed system) with lzvn decompressor  (I have extended it to support LZSS just in case if you have this compression type): "./lzvn -d prelinkedkernel dictionary". Lilu beat Clover in this case with his "trampoline" to get survived in installer / recovery mode. I have tried this method with Clover (with helps of UEFI-Bootkit) & cc to @bs0d (of course he didnt read it) and just failed.

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy