PMheart Posted June 3, 2017 Share Posted June 3, 2017 Hello, This is going to be a general discussion thread of LiluFriend on InsanelyMac Forum. LiluFriend is an open-source kernel extension that fixes Lilu does not function correctly under system locations like /System/Library/Extensions or /Library/Extensions. Note: LiluFriend needs configuring properly, otherwise it will fail to load. For more details, check here. Everything including binaries, detailed instructions, is available on GitHub: https://github.com/PMheart/LiluFriend Also, it's better to report issues on GitHub. 9 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/ Share on other sites More sharing options...
Andrey1970 Posted June 3, 2017 Share Posted June 3, 2017 You like to clog system folders with third-party files? Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2434758 Share on other sites More sharing options...
PMheart Posted June 3, 2017 Author Share Posted June 3, 2017 You like to clog system folders with third-party files? Hi. For now, yes. I haven't found a better solution yet. Installing everything to /L/E uses Apple's native way, otherwise no. Clover's kext injection can be just for necessary and convenience. (installer/recovery) Also, it's simply wrong to leave lots of kexts outside kernel cache (Using the current way to inject kexts). A kernel cache should be the right eventual place where all kexts should go into. If you really want to place your 3rd-party kexts outside /L/E or /S/L/E, then you should inject code to kernel cache, instead of something Clover now does... It's somewhat complex and I don't tend to do so, and I just put everything inside /L/E, it works like a charm. POC: https://pikeralpha.wordpress.com/2015/07/28/apples-kext-signing-bypassed/ 2 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2434812 Share on other sites More sharing options...
camillionario Posted June 20, 2017 Share Posted June 20, 2017 Hello PM heart, this only works for Lilu. And I can also add the three Lilux kext that I use in E / C / (ApleAlc, Lilu and NvidiaGraphicsFixup.kext) in the lilufriend InfoPlist. Thks. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448120 Share on other sites More sharing options...
PMheart Posted June 20, 2017 Author Share Posted June 20, 2017 Hello PM heart, this only works for Lilu. And I can also add the three Lilux kext that I use in E / C / (ApleAlc, Lilu and NvidiaGraphicsFixup.kext) in the lilufriend InfoPlist. Thks. Hi. Yes, actually you may even need to add all Lilu related kexts' bundle id. By the way, what does E / C mean? I assume that it refers to Clover's kext folder, if so, then LiluFriend is simply not required. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448141 Share on other sites More sharing options...
camillionario Posted June 20, 2017 Share Posted June 20, 2017 Yeah, I mean Efi / Clover / kext. What I want to do is put all kexts in S / L / E and try not to use the Clover folder. That's why the question.Thank you for your response, your help is appreciated. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448174 Share on other sites More sharing options...
PMheart Posted June 20, 2017 Author Share Posted June 20, 2017 Yeah, I mean Efi / Clover / kext. What I want to do is put all kexts in S / L / E and try not to use the Clover folder. That's why the question. Thank you for your response, your help is appreciated. Nah, I saw what you wanted. Sorry for the misunderstanding before.Well, I think the README of LiluFriend has already contained all you need, so please read it carefully, and, if you still have some unsolved questions, feel free to ask for any help. 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448179 Share on other sites More sharing options...
camillionario Posted June 20, 2017 Share Posted June 20, 2017 I have put all the kexts in S / L / E and all have been loaded except LiluFriend. This is normal or should be loaded.Attached liluFriend edited. LiluFriend.kext.zip Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448248 Share on other sites More sharing options...
joevt Posted June 21, 2017 Share Posted June 21, 2017 I have put all the kexts in S / L / E and all have been loaded except LiluFriend. This is normal or should be loaded. Attached liluFriend edited. What does the following command say? sudo touch /System/Library/Extensions && sudo kextcache -u / For some reason, it says LiluFriend depends on CoreDisplayFixup. If you install CoreDisplayFixup then it will load. 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448765 Share on other sites More sharing options...
PMheart Posted June 21, 2017 Author Share Posted June 21, 2017 I have put all the kexts in S / L / E and all have been loaded except LiluFriend. This is normal or should be loaded. Attached liluFriend edited. Hi, you must remove all kexts that you don't need for LiluFriend to work. For some reason, it says LiluFriend depends on CoreDisplayFixup. If you install CoreDisplayFixup then it will load. No, it's just an example. LiluFriend does not even depend on Lilu. Only the "com.apple.security" signature prefix tricks kernel to load it at an early stage, and then it indicates its plugins (Lilu and plugins) to be loaded at the same time. 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2448767 Share on other sites More sharing options...
joevt Posted June 24, 2017 Share Posted June 24, 2017 Hi, you must remove all kexts that you don't need for LiluFriend to work. No, it's just an example. LiluFriend does not even depend on Lilu. Only the "com.apple.security" signature prefix tricks kernel to load it at an early stage, and then it indicates its plugins (Lilu and plugins) to be loaded at the same time. I'm sorry, I didn't read the readme carefully enough. In other words, the LiluFriend's info.plist should be modified to include in OSBundleLibraries the OSBundleIdentifier and OSBundleCompatibleVersion of all the kexts that you want to load early with LiluFriend. Here's a script to find all the installed Lilu plugins: echo "# Add the following to OSBundleLibraries of $( find /System/Library/Extensions /Library/Extensions \( -type f -name Info.plist -path '*/LiluFriend.kext/*' \) )" IFS=$'\n' for thefile in $( find /System/Library/Extensions /Library/Extensions \( -type f -name Info.plist -not -path '*/Lilu.kext/*' -not -path '*/LiluFriend.kext/*' -print0 \) | xargs -0 grep -l '<key>as.vit9696.Lilu</key>' ); do plutil -convert json -r "${thefile}" -o /tmp/converted.plist sed -n -E '/^ "CFBundleIdentifier" : "(.*)",?/s// <key>\1<\/key>/p' /tmp/converted.plist version="$(sed -n -E '/^ \"OSBundleCompatibleVersion\" : "(.*)",?/s//\1/p' /tmp/converted.plist)" if [[ -z "${version}" ]]; then version=$(sed -n -E '/^ "CFBundleVersion" : "(.*)",?/s//\1/p' /tmp/converted.plist) fi echo " <string>${version}</string>" done The output looks like this: # Add the following to OSBundleLibraries of /System/Library/Extensions/LiluFriend.kext/Contents/Info.plist <key>as.vit9696.AppleALC</key> <string>1.0</string> <key>org.vanilla.driver.CoreDisplayFixup</key> <string>1.0</string> <key>as.lvs1974.HibernationFixup</key> <string>1.0</string> <key>as.lvs1974.IntelGraphicsFixup</key> <string>1.0</string> <key>as.lvs1974.NvidiaGraphicsFixup</key> <string>1.0</string> But maybe not all of them require to be loaded early? Does it matter for any of those or is only Lilu required to be loaded early? I wonder because you included the org.vanilla.driver.CoreDisplayFixup example in LiluFriend already. 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2450598 Share on other sites More sharing options...
PMheart Posted June 24, 2017 Author Share Posted June 24, 2017 I'm sorry, I didn't read the readme carefully enough. In other words, the LiluFriend's info.plist should be modified to include in OSBundleLibraries the OSBundleIdentifier and OSBundleCompatibleVersion of all the kexts that you want to load early with LiluFriend. Here's a script to find all the installed Lilu plugins: echo "# Add the following to OSBundleLibraries of $( find /System/Library/Extensions /Library/Extensions \( -type f -name Info.plist -path '*/LiluFriend.kext/*' \) )" IFS=$'\n' for thefile in $( find /System/Library/Extensions /Library/Extensions \( -type f -name Info.plist -not -path '*/Lilu.kext/*' -not -path '*/LiluFriend.kext/*' -print0 \) | xargs -0 grep -l '<key>as.vit9696.Lilu</key>' ); do plutil -convert json -r "${thefile}" -o /tmp/converted.plist sed -n -E '/^ "CFBundleIdentifier" : "(.*)",?/s// <key>\1<\/key>/p' /tmp/converted.plist version="$(sed -n -E '/^ \"OSBundleCompatibleVersion\" : "(.*)",?/s//\1/p' /tmp/converted.plist)" if [[ -z "${version}" ]]; then version=$(sed -n -E '/^ "CFBundleVersion" : "(.*)",?/s//\1/p' /tmp/converted.plist) fi echo " <string>${version}</string>" done The output looks like this: # Add the following to OSBundleLibraries of /System/Library/Extensions/LiluFriend.kext/Contents/Info.plist <key>as.vit9696.AppleALC</key> <string>1.0</string> <key>org.vanilla.driver.CoreDisplayFixup</key> <string>1.0</string> <key>as.lvs1974.HibernationFixup</key> <string>1.0</string> <key>as.lvs1974.IntelGraphicsFixup</key> <string>1.0</string> <key>as.lvs1974.NvidiaGraphicsFixup</key> <string>1.0</string> Great script! Really appreciated. But maybe not all of them require to be loaded early? Does it matter for any of those or is only Lilu required to be loaded early? I wonder because you included the org.vanilla.driver.CoreDisplayFixup example in LiluFriend already. According to @vit9696, all plugins need loading early. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2450615 Share on other sites More sharing options...
telepati Posted March 25, 2018 Share Posted March 25, 2018 I am using my kexts on L/E on readme section you are saying add LiluFriend to L/E and S/L/E? Should I add LiLuFriend to S/L/E even I am not using my kexts there? Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2605649 Share on other sites More sharing options...
PMheart Posted March 25, 2018 Author Share Posted March 25, 2018 5 hours ago, telepati said: I am using my kexts on L/E on readme section you are saying add LiluFriend to L/E and S/L/E? Should I add LiLuFriend to S/L/E even I am not using my kexts there? Hi, No. Either of them is enough. (In my opinion you may create LiluFriend.kext/Contents/PlugIns folder and put Lilu + plugins there) 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2605690 Share on other sites More sharing options...
telepati Posted April 13, 2018 Share Posted April 13, 2018 (edited) On 3/26/2018 at 2:22 AM, PMheart said: Hi, No. Either of them is enough. (In my opinion you may create LiluFriend.kext/Contents/PlugIns folder and put Lilu + plugins there) Hi, finally I created my LiluFriend.kext. Could you please check my .kext did I right? Just like you said I create a Plugins folder and put all kexts and the Lilu there. But I am not sure did I set the setting right? LiluFriend.kext.zip Edited April 13, 2018 by telepati Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2609477 Share on other sites More sharing options...
PMheart Posted April 13, 2018 Author Share Posted April 13, 2018 9 hours ago, telepati said: Hi, finally I created my LiluFriend.kext. Could you please check my .kext did I right? Just like you said I create a Plugins folder and put all kexts and the Lilu there. But I am not sure did I set the setting right? LiluFriend.kext.zip Hi, looks like you are! Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2609536 Share on other sites More sharing options...
telepati Posted April 13, 2018 Share Posted April 13, 2018 1 hour ago, PMheart said: Hi, looks like you are! Thank you. I installed now and everything looks working. Thank you again. 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2609552 Share on other sites More sharing options...
123456789323 Posted February 2, 2019 Share Posted February 2, 2019 Good Evening @PMheart Unfortunately I can't find any information about an issue I have so I though I should ask you here. I wanna add a driver to LiluFriend but I don't understand how it should look like in the end. Could you maybe help me in creating it ? I attached the info.plist of the driver which I wanna insert to LiluFriend. How the final LiluFriend kext would look like with this data ? Info.plist Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2662535 Share on other sites More sharing options...
PMheart Posted February 2, 2019 Author Share Posted February 2, 2019 12 minutes ago, DSM2 said: Good Evening @PMheart Unfortunately I can't find any information about an issue I have so I though I should ask you here. I wanna add a driver to LiluFriend but I don't understand how it should look like in the end. Could you maybe help me in creating it ? I attached the info.plist of the driver which I wanna insert to LiluFriend. How the final LiluFriend kext would look like with this data ? Info.plist Hi, Does it have to be installed in /L/E or /S/L/E instead of Clover/kexts/ ? If not, then I'd highly recommend you installing it to Clover and use kext injection for higher priority. Anyway, if you do need it, here you go: <key>OSBundleLibraries</key> <dict> <key>com.apple.kpi.bsd</key> <string>12.0.0</string> <key>com.apple.kpi.iokit</key> <string>12.0.0</string> <key>com.apple.kpi.libkern</key> <string>12.0.0</string> <key>com.apple.kpi.mach</key> <string>12.0.0</string> <key>com.apple.kpi.unsupported</key> <string>12.0.0</string> <key>net.egosys.driver.VRS8Audio</key> <string>1.03</string> </dict> 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2662536 Share on other sites More sharing options...
123456789323 Posted February 2, 2019 Share Posted February 2, 2019 (edited) Thanks! Will test it asap! The kext has to be in L/E but I will also try via Kext Injection. Unfortunatly doesn't fix my issue... hmm... This is my problem: 2019-02-03 00:33:29.252097+0100 0x38d0 Default 0x0 0 0 kernel: (VRS8AudioDriver) AEsiAudioEngine[]::CreateAudioStream() failed to allocate IOBufferMemoryDescriptor 2019-02-03 00:33:29.252099+0100 0x38d0 Default 0x0 0 0 kernel: (VRS8AudioDriver) AEsiAudioEngineIn[]::initHardware(), failed to create all streams. 2019-02-03 00:33:29.252100+0100 0x38d0 Default 0x0 0 0 kernel: (VRS8AudioDriver) AEsiAudioEngineIn: failed to create analogInputStream! 2019-02-03 00:33:29.252103+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) - IOAudioEngine[<private>]::start(<private>, <private>) 2019-02-03 00:33:29.252104+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) - IOAudioEngine[<private>]::start(<private>) returns 0 2019-02-03 00:33:29.252108+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) - IOAudioDevice[<private>]::activateAudioEngine(<private>, 1) returns 0x<private> 2019-02-03 00:33:29.252109+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) + IOAudioEngine[<private>]::free() 2019-02-03 00:33:29.252124+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) - IOAudioEngine[<private>]::free() 2019-02-03 00:33:29.252124+0100 0x38d0 Default 0x0 0 0 kernel: (VRS8AudioDriver) AEsiAudioDevice[<private>]::initHardware: failed! 2019-02-03 00:33:29.256646+0100 0x38d0 Default 0x0 0 0 kernel: (IOAudioFamily) - IOAudioDevice[<private>]::start(<private>) Maybe you have an idea what I could try... Edited February 2, 2019 by DSM2 1 Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2662537 Share on other sites More sharing options...
CoBrA2168 Posted May 21, 2019 Share Posted May 21, 2019 @PMheart do you still recommend using your LiluFriend Kext with the latest versions of Lilu and its plugins with the latest Clover as of today? Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2674520 Share on other sites More sharing options...
PMheart Posted May 21, 2019 Author Share Posted May 21, 2019 7 hours ago, CoBrA2168 said: @PMheart do you still recommend using your LiluFriend Kext with the latest versions of Lilu and its plugins with the latest Clover as of today? Depends on how you install them, if you are still putting them into /L/E, why not... OpenCore has a much decenter way for kext injection, by the way. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2674546 Share on other sites More sharing options...
CoBrA2168 Posted May 21, 2019 Share Posted May 21, 2019 1 hour ago, PMheart said: Depends on how you install them, if you are still putting them into /L/E, why not... OpenCore has a much decenter way for kext injection, by the way. Yes I had read about that project. I think it's too new for me to switch over right now, but I think I will once it garners more support. I put all of my kexts in /L/E (including Lilu) so I suppose I'll add this to ensure Lilu and the plugins are loaded appropriately. Sometimes my AppleALC kext is loaded incorrectly, causing my audio to randomly not work on boot. Usually a sleep cycle fixes it. I think installing to Clover/Kexts (or installing LiluFriend) will fix that. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2674554 Share on other sites More sharing options...
joevt Posted July 29, 2020 Share Posted July 29, 2020 (edited) I don't think this works in Big Sur. I can get Lilu and Whatevergreen to load but LiluFriend cannot be loaded. "kmutil -p" does not return any errors for LiluFriend.kext but it won't get added. Edited July 29, 2020 by joevt Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2732420 Share on other sites More sharing options...
PMheart Posted August 6, 2020 Author Share Posted August 6, 2020 On 7/29/2020 at 3:24 PM, joevt said: I don't think this works in Big Sur. I can get Lilu and Whatevergreen to load but LiluFriend cannot be loaded. "kmutil -p" does not return any errors for LiluFriend.kext but it won't get added. I guess LiluFriend is no longer needed with OpenCore… It is now considered as legacy. Link to comment https://www.insanelymac.com/forum/topic/324146-lilufriend-fixing-lilu-does-not-function-correctly-under-system-locations/#findComment-2733345 Share on other sites More sharing options...
Recommended Posts