Jump to content

Clover Audio & Kext Injection


K3Rl
 Share

10 posts in this topic

Recommended Posts

Hi everyone,

 

After a long time of trial and error and numerous Google-searches I decided to give this a try.

 

I installed a completely vanilla Mavericks with clover bootloader, no Kexts in S/L/E. Clover (v2k_r2577) has FakeSMC.kext and RealtekRTL81xx.kext in kexts/10.9.

 

I used cloverconfigurator to set AudioInjection to 1 (The OS X hardware browser shows all of the available Audio Ports, Settings App however shows no output ports). Also, I set KextsInjection to Automatic (and Yes previously, with the same result [following error log]).

 

It seems to me that clover loads the RTL Kext too early - system.log says the following:

[...]

Kext com.lnx2mac.[...] - library kext com.apple.iokit.IONetworkingFamily not found.

Can't load kext com.lnx2mac.[...] – failed to resolve library dependencies.

Kext com.lnx2mac.[...] failed to load (0xdc00800e). mcache: 4 CPU(s), 46 bytes CPU cache line size

[...]

 

I loaded the RTL kext manually once, and now it seems to be in kernelcache - so I do know that the kext works. However, I'd also like to know how i can reset the kernel cache - I tried http://seo-michael.co.uk/slow-shutdown-startup-macbook-mavericks-10-9/ (1st method) but it didn't reset. I think I need to reset it so I can work the problem again.

 

Regarding the audio problem, I tried everything I could find:

1. tried https://github.com/Piker-Alpha/AppleHDA8Series.sh with clover audio ("1") injection - no audio output devices (AppleHDA892.kext in S/L/E or clover-injected; i checked the layout and device ids, everything should be ok)

2. i also tried, like descibed above and in my latest build - doing nothing but injecting "1" in clover - with the apparent same result

3. injecting AppleHDA.kext and HDAEnabler1.kext in clover - no result.

4. What's working though is installing the latter kexts in S/L/E - but i really don't see why to use clover then?!

 

Thanks in advance - help would be appreciated a lot!

 

[EDIT]

 

This thread regards to the following Configuration:

 

Gigabyte H87-HD3

Intel i3-4130

4GB Kingston Hyper-X Blu

MSI Radeon HD6450 1GB Noiseless

OS X Mavericks

Link to comment
Share on other sites

To me I just put the kext in clover's folder for emergencies.

If it doesn't find FakeSMC.kext in your actual install then it will load the kext folder in clover's directory.

 

The benefit of this that you do not need to modify a maverick/ML/L installer because clover will see, "oh you don't have the fakesmc.kext, let me add all that's necessary"

 

This means my recovery partition works without modifications. It also means that I could create a standard usb installer of Mac OS and it works without any modifications.

Link to comment
Share on other sites

You should try Mieze's Realtek kext instead. And kext installation and resetting can be done with some 3rd party tools like "Kext Wizard" or "Kext Utility" (they're in this forum).

 

Regarding your audio issues, if things work in point 4, why do you want it some other way? If it's to avoid re-patching then Clover can do so automatically with a shutdown service while keeping the AppleHDA kext up-to-date. Besides it is very hard to diagnose things without any information. Upload your working DSDT, IOReg and boot log for each case.

 

And also consider that some kexts will only work from /S/L/E due to specific dependencies, so I would recommend you to install essential kexts to S/L/E and only use kext injection in special cases (installation and recovery). It is not meant to replace nor extend the original extensions folder.

  • Like 1
Link to comment
Share on other sites

You should try Mieze's Realtek kext instead. And kext installation and resetting can be done with some 3rd party tools like "Kext Wizard" or "Kext Utility" (they're in this forum).

Great! Thanks a lot, works great, even when injected.

 

Regarding your audio issues, if things work in point 4, why do you want it some other way? If it's to avoid re-patching then Clover can do so automatically with a shutdown service while keeping the AppleHDA kext up-to-date. Besides it is very hard to diagnose things without any information. Upload your working DSDT, IOReg and boot log for each case.

 

And also consider that some kexts will only work from /S/L/E due to specific dependencies, so I would recommend you to install essential kexts to S/L/E and only use kext injection in special cases (installation and recovery). It is not meant to replace nor extend the original extensions folder.

Well, I'd love that stuff to be a little independent from what's on disk, mainly because of issues with system updates. Now of course I'm not ignorant and know that updates should only be applied if proven to be o.k....however, the Machine is gonna be with my parents, who are used to OS X (but still use an old G4 that almost dissolves - so I thought using some spare parts and buying a mobo would be a good idea) and I really don't know if there's not an accident going to happen - I just don't wanna take too many chances and expect this to be a more failsafe solution for now. Just tell me if this is a stupid approach...I'm not too experienced, and willing to learn :)

 

I don't use any DSDT as of now though. The system runs great just with FakeSMC and Ethernet. So maybe that's a starting point.

 

Could you maybe provide me with a starting point for shutdown service patching? I don't really get the connection between shutdown and bootloader...

 

Regarding audio, there is no way to load compressed xml files from the EFI partition at this time.  Not clear if you ran Pike's script correctly, see toleda/audio_CloverALC.

I strongly assume that I did run it correctly. It gave me an Error (something like "Config File not found") - but that error also occurs in his demo output (see github page). However, I did get a Kext (AppleHDA892.kext if I remember correctly) which was loaded, but I dont see the loading to be the problem - the problem is the missing output devices (even without the use of the script AppleHDA.kext is being loaded without errors).

 

However, I'll provide you with more detailed information as soon as I can get back to trying later today, if there are no more ideas.

Link to comment
Share on other sites

Could you maybe provide me with a starting point for shutdown service patching? I don't really get the connection between shutdown and bootloader...

 

Clover can attach some scripts (titled: "Install RC scripts on target volume") to the startup and shutdown processes to do some specific tasks such as saving nvram for non UEFI motherboards and mounting the EFI partition at boot. So you can use those services for other purposes like patching system kexts and the like.

 

 

Here attached is the script I use to patch my 889, you just need to customize the perl script to suit your audio chip and edit the path to the files to replace (I place them in /Volumes/EFI/EFI/CLOVER/kexts/Patches so it requires a mounted EFI partition for that but you can place them wherever you want).

81.applehda_shutdown_patch.local.zip

 

Sections to edit:

if [[ `perl -le "print scalar grep /\x8b\x19\xd4\x11/ . . .

Checks if the binary is already patched, else proceeds with the patching. Replace the perl script with yours.

perl -pi -e 's|\x8b\x19\xd4\x11|\x89\x08\xec\x10|g' . . .

Applies the patch. Replace the perl script with yours.

cp "/Volumes/EFI/EFI/CLOVER/kexts/Patches/ . . .

Copies all the customized plists/zlib into the AppleHDA kext. Replace the files and paths with yours.

 

 

Once you do that then you need to copy the script to "/etc/rc.shutdown.d/" and then give it proper permissions in a Terminal:

sudo cp "path_to_edited_script" /etc/rc.shutdown.d/
sudo chmod 755 /etc/rc.shutdown.d/81.applehda_shutdown_patch.local
sudo chown root:wheel /etc/rc.shutdown.d/81.applehda_shutdown_patch.local

Good luck!

  • Like 1
Link to comment
Share on other sites

@Maniac10

 

Thanks a lot for your help and patience! It's appreciated a lot, I'm gonna summarize the steps I took towards a fully working Hackintosh.

 

So just to conclude this thread: I tried the original version (https://github.com/toleda/audio_ALC892) of the aforementioned script on my S/L/E and it worked beautifully. And because I really liked the idea of hacking OS X, I went to the retailer today and bought some nice components for my own machine...so I'm gonna try your scripting technique on my new GA-Z87M-H3D based Hackintosh :).

Link to comment
Share on other sites

 Share

×
×
  • Create New...