Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by syscl

  1. I just don't know why a lot of people think LPCB device injection is necessary on Skylake+ platform. Actually, on Skylake+ platform you only need PPMC and PMRC combine together to make LPCB work(like in a real Mac, confirmed from MacBookPro's ioreg). AppleLPC will not load in this case. More details can be checked in my git: https://github.com/syscl/XPS9350-macOS/commit/ed474d5bc68efba71ed827e5eef5c5db910d24c2(I discovered this since Dec 1 2016).




    RE: nvram save script and SIP



    here is rewrite of the nvram_save_script (v1.16.6) using diskutil to find the EFI partition on disks vs gpt (which has restrictions when SIP is completely enabled).  The section to find EFI device is based on the RehabMan's parse method from above - but adapted for this script. The point was to check find a disk's EFI partition (not by name) and its associated device name (e.g disk0s1)


    the key section looks like this now:

    for ((i=0; i<${#gDisk[@]}; ++i))
          local gESP=""
          local plist=$( diskutil list -plist "/dev/${gDisk[i]}" 2> /dev/null )
          for ((part=0; 1; part++));
                content=$( /usr/libexec/PlistBuddy -c "Print :AllDisksAndPartitions:0:Partitions:$part:Content" /dev/stdin <<< $plist 2>&1 )
                if [[ "$content" == *"Does Not Exist"* ]];
                if [[ "$content" == "EFI" ]];
                    gESP=$( /usr/libexec/PlistBuddy -c "Print :AllDisksAndPartitions:0:Partitions:$part:DeviceIdentifier" /dev/stdin <<< $plist 2>&1 )
          gLogTimeStamp=$(date +%Y-%m-%d-%H:%M:%S)
          if [[ $gESP != "" ]];
                printf "${gLogTimeStamp}  ${gDisk[i]}: ESP --"
                         local gMountPoint=$(_mountESP ${gESP})
                printf "${gLogTimeStamp}  ${gDisk[i]}: ------ Ignored -- No ESP on disk\n"

    Thank you, I have committed to r4269 already. In fact, as of my first version of this script I use diskutil for all mounting, unmount and identified ESP/EFI partition, so actually all this operations can use diskutil(more concise and tidy code). Since we now use LogoutHook so that we don't need to worry about diskutil is unavailable issue. 



  3. I can test only 9 hours later when I return home. Sorry for the delay. Sources 4253 looks good.

    I don't know. Can you provide any log?

    But why you tell about kernelToPatch if IOPCIFamily is a kext? 

    I think this may be a Clover's "bug" in SearchAndReplace() routine because user can insert dedicated made search patterns such that SearchAndReplace() will search for not only kernel but also prelinked data. We should change the KERNEL_MAX_SIZE for SearchAndReplace to more accurate arguments(e.g. kernelBoundary and kextBoundary), and change the start searching location instead of starting from 0x0?



  4. As I say before: I don't know if it will continue to work when I compile commits on my system.  I re-create several times ~src folder with Build_clover.command 4.5.6: so far without success for previous version. Compile Ok, Boot no.


     CPU receptor problem appears only on screen when I boot.


    Sorry for my bad english

    Have you noticed when this message occurs? Like which version you first saw this message?



  5. I edit my previous post

    Because I saw @cecekpown said that you also have archCpuType issue in previous version, your log shows that my r4252-p2 solved the archCpuType issue.


    I haven't see CPU receptor problem in log and don't find it in code as well... Weird...



  6. I have not yet tried r4252-p2. The message appears in commits r4248-4251 and before, on my system.


    Now, I try your version ans post preboot.log 



    I don't have the permission to download the preboot.log.. why??


    By the way, can r4252-p2 boot (because I cannot see your boot log)?



  7. In addition to the problems (arch, kextd ...) I saw "Unsupported CPU on receptor" when booting. I don't know if it's important: seems to be first time under my Core i7 system. Thank you

    So r4252-p2 not work on your system? Could you provide the preboot.log by pressing the F2 when boot?


    Thank you in advance,



  8. @Slice

    I think GetOSVersionKextsDir has already taken care of 10.xx.xx:

    AsciiStrnCpyS(FixedVersion, 16, OSVersion, 5);

    Here's the patch for r4252 

    Index: rEFIt_UEFI/Platform/kext_inject.c
    --- rEFIt_UEFI/Platform/kext_inject.c	(revision 4252)
    +++ rEFIt_UEFI/Platform/kext_inject.c	(working copy)
    @@ -311,23 +311,6 @@
       // syscl - allow specific load inject kext
       // Clover/Kexts/Other is for general injection thus we need to scan both Other and OSVersion folder
    -  CHAR16            UniSysVers[6];
    -  CHAR8             ShortOSVersion[6];
    -  INTN              i;
    -  for (i = 0; i < 6; i++) {
    -    ShortOSVersion[i] = Entry->OSVersion[i];
    -    if (ShortOSVersion[i] == '\0') {
    -      break;
    -    }
    -    if (((i > 2) && (ShortOSVersion[i] == '.')) || i == 5) {
    -      ShortOSVersion[i] = '\0';
    -      ShortOSVersion[i + 1] = '\0';
    -      break;
    -    }
    -  }
    -  AsciiStrToUnicodeStrS(ShortOSVersion, UniSysVers, 6);
    -  DBG("OSVesion: %a, ShortOSVersion=%a, uni-vers=%s,\n", Entry->OSVersion, ShortOSVersion, UniSysVers);
       if ((SrcDir = GetOtherKextsDir())) {
         MsgLog("Preparing kexts injection for arch=%s from %s\n", (archCpuType==CPU_TYPE_X86_64)?L"x86_64":(archCpuType==CPU_TYPE_I386)?L"i386":L"", SrcDir);
         CurrentKext = InjectKextList;
    @@ -366,8 +349,10 @@
    -  if ((SrcDir = GetOSVersionKextsDir(ShortOSVersion))) {
    +  if ((SrcDir = GetOSVersionKextsDir(Entry->OSVersion))) {
         MsgLog("Preparing kexts injection for arch=%s from %s\n", (archCpuType==CPU_TYPE_X86_64)?L"x86_64":(archCpuType==CPU_TYPE_I386)?L"i386":L"", SrcDir);
    +    CHAR16 UniSysVers[6];
    +    AsciiStrToUnicodeStrS(Entry->OSVersion, UniSysVers, 6);
         CurrentKext = InjectKextList;
         while (CurrentKext) {
           DBG("current kext name %s Match %s, while sysver: %s\n", CurrentKext->FileName, CurrentKext->MatchOS, UniSysVers);

    Please give this a try and see if this work on your computer as well(I mean not corrupt previous kext inject function as well)






  9. For those who experienced archCpuType missing issue, please try this one.


    I narrowed down the issue and now the issue should have gone(work on M3800).


    @Slice, why we need this piece of code? This is the place that cause the archCpuType issue

    CHAR16            UniSysVers[6];
      CHAR8             ShortOSVersion[6];
      INTN              i;
      for (i = 0; i < 6; i++) {
        ShortOSVersion[i] = Entry->OSVersion[i];
        if (ShortOSVersion[i] == '\0') {
        if (((i > 2) && (ShortOSVersion[i] == '.')) || i == 5) {
          ShortOSVersion[i] = '\0';
          ShortOSVersion[i + 1] = '\0';
    AsciiStrToUnicodeStrS(ShortOSVersion, UniSysVers, 6);

    If GetOSVersionKextsDir return null, then we should not declare local variable ShortOSVersion. I used my version that the issue has gone.




  10. @Slice, from @cekepawon report, there's something funny, thinning fail occurs when the first time inject Shiki.kext in both my case and @Matgen84's case(still not sure). Another possible: memory issues around string between UnisysVers and ShortOSVersions?


    Will try once back to home.



  11. Slice, I svn diff, and terminal give me nothing. I build r4251 with ./ebuild.sh, still give me log like this on Dell Precision M3800.




    You said Official Clover cannot have "Preparing for kext injection...", what that mean sorry? Am I doing something wrong? Or miss something?



  12. Hi, is there something changed in r4250? I have tried to build r4250 and give me "Thinning failed". I have to force archCpuType=CPU_TYPE_X86_64 to make it boot, otherwise the archCpuType is corrupted?


    Here's the log from r4251(same with r4250 when I reverted).





  13. I just see no issues in your observations.

    You started 10.12 and don't see 10.13. It is OK (All Correct).



    This is a difference between old and new Clover. You need no to see 10.6 folder if you boot 10.13.1.

    Slice, why no init InjectKextList for all folder then list kext for current system, then it will never fail inject kext even if user see 10.6 then boot 10.13?




    I have nothing to deactivate, I boot 10.13


    I have kext in 10.13, 10.12. 10.7, 10.6
    No kext in Other  :)
    Boot 10.12 is ok, this is the only OS working
    if I put my kext in Other its work for 10.12 and 10.13


    Hi, what's your default OS when clover GUI start? 10.12 or 10.13?


    Edited: I have an idea and will let you know once I finish.

  15. Press F2 in CloverGUI.

    Boot OS.

    If crash then reboot and see /EFI/CLOVER/misc/preboot.log

    Notice here from @chris1111

    8:763  0:000  Preparing kexts injection for arch=x86_64 from EFI\CLOVER\kexts\Other
    8:763  0:000  Preparing kexts injection for arch=x86_64 from EFI\CLOVER\kexts\10.13

    Kext does not add into InjectKextList for Other and 10.13.


    Edited: what I guess is that you have 10.12 and 10.13, and you disable 10.12's kext but boot 10.13, so kext was not injected for 10.13 folder and Other.

  16. i dont have any problem with my haswell e 5820k

    without any xcpm patches, clover does it automatically.

    as far as i know, i cant disable those patches with DisableExtCpuXCPM, or is there bootargs that can disable it?

    OK, I will consider to add it if it is necessary. But till now I will try to figure out suit patches for him.




    Can also confirm is happening (@syscl):

    9:989  0:001  Preparing kexts injection for arch=x86_64 from EFI\CLOVER\kexts\Other
    9:989  0:000  Extra kext: EFI\CLOVER\kexts\Other\FakePCIID_Intel_HDMI_Audio.kext
    9:990  0:001  Extra kext: EFI\CLOVER\kexts\Other\FakePCIID.kext
    9:992  0:002  Extra kext: EFI\CLOVER\kexts\Other\VerbStub.kext
    9:994  0:001  Extra kext: EFI\CLOVER\kexts\Other\NvidiaGraphicsFixup.kext
    9:996  0:001  Extra kext: EFI\CLOVER\kexts\Other\BT4LEContiunityFixup.kext
    9:997  0:001  Extra kext: EFI\CLOVER\kexts\Other\AppleBacklightInjector.kext
    9:998  0:000  Extra kext: EFI\CLOVER\kexts\Other\HibernationFixup.kext
    10:000  0:002  Extra kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext
    10:002  0:001    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Trackpad.kext
    10:005  0:002    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Mouse.kext
    10:007  0:001    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Keyboard.kext
    10:011  0:004  Extra kext: EFI\CLOVER\kexts\Other\ACPIBatteryManager.kext
    10:013  0:002  Extra kext: EFI\CLOVER\kexts\Other\Shiki.kext
    10:015  0:001  Extra kext: EFI\CLOVER\kexts\Other\IntelGraphicsFixup.kext
    10:018  0:002  Extra kext: EFI\CLOVER\kexts\Other\AirportBrcmFixup.kext
    10:020  0:002  Extra kext: EFI\CLOVER\kexts\Other\FakeSMC.kext
    10:023  0:003  Extra kext: EFI\CLOVER\kexts\Other\CoreDisplayFixup.kext
    10:026  0:002  Extra kext: EFI\CLOVER\kexts\Other\Lilu.kext
    10:029  0:003  Extra kext: EFI\CLOVER\kexts\Other\AppleALC.kext
    10:031  0:002    |-- PlugIn kext: EFI\CLOVER\kexts\Other\AppleALC.kext\Contents\PlugIns\PinConfigs.kext
    10:044  0:012  Extra kext: EFI\CLOVER\kexts\Other\FakePCIID_Intel_HDMI_Audio.kext
    10:047  0:003  Extra kext: EFI\CLOVER\kexts\Other\FakePCIID.kext
    10:049  0:002  Extra kext: EFI\CLOVER\kexts\Other\VerbStub.kext
    10:052  0:002  Extra kext: EFI\CLOVER\kexts\Other\NvidiaGraphicsFixup.kext
    10:055  0:002  Extra kext: EFI\CLOVER\kexts\Other\BT4LEContiunityFixup.kext
    10:057  0:002  Extra kext: EFI\CLOVER\kexts\Other\AppleBacklightInjector.kext
    10:059  0:001  Extra kext: EFI\CLOVER\kexts\Other\HibernationFixup.kext
    10:062  0:003  Extra kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext
    10:065  0:003    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Trackpad.kext
    10:071  0:005    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Mouse.kext
    10:074  0:003    |-- PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Keyboard.kext

    Thank you for pointing out this issue. I am going to see what @Slice changed.


    Edit: @Slice corrected it  ^_^



  18. Hello all, after buying Logitech M557 and K380 for macOS, I soon realized some Apple's extended feature does not work any more. @Andy Vandijck has posted great work on wired devices. After doing some research and comparing @Andy Vandijck's work, I've successfully enabled extended feature for non-Apple wireless devices(Keyboard/Mouse).


    Here's the step of how to use FakeAppleWirelessMouse:

    • Find out your wireless' device product ID(pid) and vendor ID(vid). For example, Logitech M557's pid = 45072(0x0b010), vid = 1133(0x046d).
    • Open FakeAppleWirelessMouse.kext/Contents/Info.plist and replace all(3x) pid and vid with your own.
    • Place FakeAppleWirelessMouse.kext to bootloader's inject folder or /Library/Extensions or /System/Library/Extensions(choose one of it), then reboot.

    Notice: if you install kext in place other than boot loader's inject folder, place don't forget to rebuild your kernel cache before reboot by

    sudo kextcache -i /

    Here's some proof of my working M557 tested on MacBookPro141:



    For those want AppleWirelessKeyboard, same procedure as above.



    Here's all the require kexts:




    credit: @Andy Vandijck for his previous work

    credit: syscl who ported it to Bluetooth/Wireless Device 



    Good luck everyone:)