Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

4 hours ago, AGuyWhoIsBored said:

Hey all!

 

I have upgraded my laptop (Dell Inspiron 15 7567) to macOS Mojave, and everything has worked flawlessly from my High Sierra installation except audio!

My audio codec (Realtek ALC256) is one of the codecs where the layouts provided with AppleALC are removed in the updated AppleHDA (layout 13 and layout 56).

 

Is there any way I can get around this? Or does the latest version of AppleALC (1.2.8) make this fact irrelevant (due to how AppleALC now injects the layout-id)?

 

I have gotten my Realtek ALC256 to work with AppleALC in High Sierra using layout 13, but now this is not working in Mojave ... :blink:

 

Both AppleALC and Lilu are running via the "-lilubetaall" flag, and I have layout ID 13 injected via Clover (checked in IOReg).

Does anyone have any ideas? I would greatly appreciate them!

 

 Thank you!

 

-Duncan

As a workaround, you can make a backup of your current AppleHDA.kext and replace it with the one from High Sierra. However, you might need to do it again on the next system update.

Edited by arsradu
Link to comment
Share on other sites

34 minutes ago, vandroiy2012 said:

Just build latest AppleALC.kext.

 

Quick question: should the latest AppleALC.kext be used with the latest Lilu.kext? Or can you use the lastest AppleALC and the official Lilu 1.2.3? Cause...I tried using the latest of both (since you need them both updated in order to build AppleALC anyway), and...the results were kinda not good. Meaning, as you probably read before, the icon on the status bar was enabled, so in theory we should have sound, and we have options in System Preferences -> Sound -> Output...but no actual sound into the speakers. Not sure what could be the issue here.

 

Truth be told, I tried that with Beta 1... Haven't tried it with Beta 2. But I will, and report back.

 

I mean, for now, I'm using AppleALC 1.2.8(v2) and the official Lilu 1.2.3. And it works perfectly fine (well...not really. It looses sound from time to time with no apparent reason, but that's another story). Anyway, we'll see. :)

Edited by arsradu
Link to comment
Share on other sites

19 hours ago, vandroiy2012 said:

Sure! And you must build AppleALC with latest Lilu...

 

Yep. :) But...that's exactly what I'm trying to say. I already tried latest AppleALC 1.2.8 (built from latest sources) with latest Lilu 1.2.4 (also built from latest sources). And...the initial results were not really good. :)))

 

Anyway, I rebuilt both from fresh downloaded sources, no problems building. But..let's see how they perform.

 

So, AppleALC 1.2.8v3 and Lilu 1.2.4. attached.

 

Update: initial test results look good.

Tested them with HS and Mojave Beta 2, ALC1150. Will test ALC892 tonight.


Update2: so far so good on the ALC892, as well. Will continue testing and update this post if anything changes in the meantime.

 

For anyone willing to try them out: MAKE A BACKUP of your current kexts and keep in mind these are EXPERIMENTAL/TEST builds. So they could have bugs.

AppleALC1.2.8v3.kext.zip

Lilu1.2.4.kext.zip

Edited by arsradu
  • Like 4
Link to comment
Share on other sites

On 6/26/2018 at 11:06 AM, vusun123 said:

I have asked people around which has the same codec, and none say anything about CPU high usage. Maybe there is something wrong with your setup ?

I did a reinstall macOS HS on my Dell, and seems like its the same issue. I only have fakepciid, FakePCIID_Intel_HD_Graphics, and VoodooPS2Controller at initial to boot up and use keyboard. For AppleALC, I installed the latest AppleALC and Lilu kext and changed the inject id to the correct one without setting ResetHDA option in config plist. However, the cpu high usage issue is still there. Is there anything I can try to solve this? Thanks

Link to comment
Share on other sites

24 minutes ago, vusun123 said:

I did find the recent AppleALC commit a bit weird as it will fail to build with Lilu v1.2.3 but will build with 1.2.4, but 1.2.4 is not released on Lilu page

You can compile Lilu 1.2.4 with Xcode and use Lilu debug for ALC.

 

Or try ALC 1.2.8v2: ALC 1.2.8 v2

Link to comment
Share on other sites

Hi all,

I'm trying to activate my audio, and after erasing totally my EFI folder and re install clover, I modified my config.plist and changed the layouts and in layout 2, I can't boot ... prohibited sign appears, the only way to boot is without kexts injected...

Wha it means? That I am close to activate my sound or what? 

Link to comment
Share on other sites

On 6/29/2018 at 4:03 AM, arsradu said:

 

Yep. :) But...that's exactly what I'm trying to say. I already tried latest AppleALC 1.2.8 (built from latest sources) with latest Lilu 1.2.4 (also built from latest sources). And...the initial results were not really good. :)))

 

Anyway, I rebuilt both from fresh downloaded sources, no problems building. But..let's see how they perform.

 

So, AppleALC 1.2.8v3 and Lilu 1.2.4. attached.

 

Update: initial test results look good.

Tested them with HS and Mojave Beta 2, ALC1150. Will test ALC892 tonight.


Update2: so far so good on the ALC892, as well. Will continue testing and update this post if anything changes in the meantime.

 

For anyone willing to try them out: MAKE A BACKUP of your current kexts and keep in mind these are EXPERIMENTAL/TEST builds. So they could have bugs.

AppleALC1.2.8v3.kext.zip

Lilu1.2.4.kext.zip

 

Thank you for building those kexts!

 

I am running both of them now, and my audio is still not working! Any ideas on seeing why it's not working? It was working flawlessly in High Sierra ... :blink:

 

Thank you!

 

-Duncan

  • Like 1
Link to comment
Share on other sites

1 hour ago, AGuyWhoIsBored said:
 
Thank you for building those kexts!
 
I am running both of them now, and my audio is still not working! Any ideas on seeing why it's not working? It was working flawlessly in High Sierra ... :blink:
 
Thank you!
 
-Duncan


The reason why it’s not working in Mojave but working in High Sierra is obvious. Apple.
The reason why the latest AppleALC & Lilu kexts don’t work for you is unknown (assuming they should work in your case).

I would suggest uploading your Clover folder and ioreg for analysis. Remove serials from clover config -> SMBIOS and Rt Variables.

Edited by arsradu
Link to comment
Share on other sites

11 hours ago, MorenoAv said:

Hi all,

I'm trying to activate my audio, and after erasing totally my EFI folder and re install clover, I modified my config.plist and changed the layouts and in layout 2, I can't boot ... prohibited sign appears, the only way to boot is without kexts injected...

Wha it means? That I am close to activate my sound or what? 

 

Hello,

 

Upload your Clover folder for analysis. Please, make sure it's the one you're currently using to boot (or at least trying to..). :) 

Edited by arsradu
Link to comment
Share on other sites

6 hours ago, MorenoAv said:

Hi @arsradu,

Here it is, my clover, and ioreg, and it is from the drive I'm trying to boot from...

CLOVER.zip

iMac de AC.zip

Thanks to taking a look again... :)

You have no apfs.efi or ApfsDriverLoader.efi in Drivers64UEFI.

 

That, is most likely the reason for the inability to boot. Also, not sure why did you add CsmVideoDxe...but you probably don't need it. Anyway, apfs.efi is necessary for this case.

  • Like 1
Link to comment
Share on other sites

Hi @arsradu

Thanks for looking into it, but right now I can't boot, with or without usb, in none of my drives... something very strange is happening to my pc, what I don't know probably noobiss extreme of my part...

At this moment I'm in my real Mac trying to repair one of my usb installers to be able to boot my hack... 

Thanks for your help as always...

Ps: Right now reading again your answer I realized that I didn't address the questions totally, in relation to CsmVideoDxe, in high Sierra I din't have text in apfs because of it... and I have apfs.efi in drivers 64, I don't have is ApfsDriverLoader.efi in drivers 64, but if I have apfs.efi in drivers the apfsdriverloader is necessary too?

 

Edited by MorenoAv
Link to comment
Share on other sites

17 hours ago, arsradu said:


The reason why it’s not working in Mojave but working in High Sierra is obvious. Apple.
The reason why the latest AppleALC & Lilu kexts don’t work for you is unknown (assuming they should work in your case).

I would suggest uploading your Clover folder and ioreg for analysis. Remove serials from clover config -> SMBIOS and Rt Variables.

Here are the requested files!

Thank you for your help!

 

-Duncan

analysis2.zip

Link to comment
Share on other sites

On 6/25/2018 at 4:10 PM, vandroiy2012 said:

 

Hi. 

High CPU usage mean problems in resources. Try to contact authors. Layout 3 - @Mirone (he is retired), layout 13 -  @daliansky, and layout 28 - @vusun123

I tried with the latest lilu 1.2.4 kext, but high cpu usage still exists. I also tried with clean install without any patch or settings and it still appears to be the same problem. 

I would like to try anything to solve this issue. Thanks

Link to comment
Share on other sites

7 hours ago, MorenoAv said:

Hi @arsradu

Thanks for looking into it, but right now I can't boot, with or without usb, in none of my drives... something very strange is happening to my pc, what I don't know probably noobiss extreme of my part...

At this moment I'm in my real Mac trying to repair one of my usb installers to be able to boot my hack... 

Thanks for your help as always...

Ps: Right now reading again your answer I realized that I didn't address the questions totally, in relation to CsmVideoDxe, in high Sierra I din't have text in apfs because of it... and I have apfs.efi in drivers 64, I don't have is ApfsDriverLoader.efi in drivers 64, but if I have apfs.efi in drivers the apfsdriverloader is necessary too?

 

As @arsradu say: you can use apfs.efi OR apfsDriverLoader, not both?

 

In config.pist, replace -lilubeta by -lilubetaall in  boot-args

 

Try Lilu 1.2.4 attached files

Lilu.kext.zip

Link to comment
Share on other sites

I tried with the latest lilu 1.2.4 kext, but high cpu usage still exists. I also tried with clean install without any patch or settings and it still appears to be the same problem. 

I would like to try anything to solve this issue. Thanks

Could you post a screenshot from intel power widget to see where is the high cpu usage?

 

 

 

 

  • Like 1
Link to comment
Share on other sites

8 hours ago, MorenoAv said:

Hi @arsradu

Thanks for looking into it, but right now I can't boot, with or without usb, in none of my drives... something very strange is happening to my pc, what I don't know probably noobiss extreme of my part...

At this moment I'm in my real Mac trying to repair one of my usb installers to be able to boot my hack... 

Thanks for your help as always...

Ps: Right now reading again your answer I realized that I didn't address the questions totally, in relation to CsmVideoDxe, in high Sierra I din't have text in apfs because of it... and I have apfs.efi in drivers 64, I don't have is ApfsDriverLoader.efi in drivers 64, but if I have apfs.efi in drivers the apfsdriverloader is necessary too?

 

 

Ok, so:

1. apfs.efi or ApfsDriverLoader is necessary in Clover/drivers64UEFI. Right now, you have none. And although I did have both ApfsDriverLoader and apfs.efi in Drivers64UEFI without any issues, yes, they are meant to be used separately, not together.

1478496381_Screenshot2018-07-02at09_41_09.png.cb91dfea7d45e8f22468ee61f3094dfd.png

 

 

2. if you selected Inject Intel (I'm guessing you're planning on using the Integrated GPU then), you need to add ig-platform-id, as well. For Intel Graphics HD 4600 which is what you have, you need to add ig-platform-id 0x0d220003

3. you might wanna add a kext for LAN in Clover/kexts/Other, as well. Otherwise no internet for you.

4. you might also need IntelGraphicsFixup kext in Clover/kexts/Other

5. Layout ID 8...? Not sure why. But...ok. If you want to manually select one, maybe take a look here for one of the supported ones for ALC892.

6. you don't need EmuVariableUefi, since you have: 1) AptioMemoryFix already, and 2) hardware NVRAM on your motherboard. Please, remove EmuVariable.

7. what do you mean you don't have text in apfs because of CsmVideoDxe? What kind of text? Where?

 

 

Edited by arsradu
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, AGuyWhoIsBored said:

Here are the requested files!

Thank you for your help!

 

-Duncan

analysis2.zip

 

Hi Duncan.

 

So, here are the things that caught my eye:

 

1.You need vanilla AppleHDA.kext for AppleALC to work.  If you patched it with something before, you can use the attached one to replace the patched one.

2. No patches necessary in Kext To Patch.

3. System Parameters -> Inject Kexts needs to be set to YES instead of Detect.

4. Please, remove the patched DSDT/SSDT files from ACPI/patched. Try without them. I'm pretty sure there's nothing you can't do directly from config.

As I keep saying around here: start small. Start with the minimum necessary and build from there.

5. Do you need to inject BOTH Intel AND Nvidia? Does it work for you? :)) Cause...if I do that on my system, it will automatically reboot before even reaching the Desktop. :))

 

The way I would proceed here is this:

1. replace the AppleHDA ket in S/L/E with the one I provided here. Just to be sure I'm using the vanilla/untouched kext. It is important.

2. clean up my config, removing anything related to AppleHDA from Kexts to Patch.

3. set Inject Kexts to YES

4. remove patched SSDT/DSDT files from ACPI/patched. If you don't wanna lose them (although, again, I doubt there's anything in those that you can't already do from config, assuming you even need THAT in the first place) you can copy them somewhere on your computer.

 

Anyway, just to be clear, which of the systems in your signature are you having issues with? Cause they are all different generations. And although some of the things might be common to all of them (such as Inject Kexts YES), there might be some specific things that are necessary only to some of them. 

AppleHDA.kext.zip

Link to comment
Share on other sites

11 hours ago, MorenoAv said:

Hi @arsradu

Thanks for looking into it, but right now I can't boot, with or without usb, in none of my drives... something very strange is happening to my pc, what I don't know probably noobiss extreme of my part...

At this moment I'm in my real Mac trying to repair one of my usb installers to be able to boot my hack... 

Thanks for your help as always...

Ps: Right now reading again your answer I realized that I didn't address the questions totally, in relation to CsmVideoDxe, in high Sierra I din't have text in apfs because of it... and I have apfs.efi in drivers 64, I don't have is ApfsDriverLoader.efi in drivers 64, but if I have apfs.efi in drivers the apfsdriverloader is necessary too?

 

If you use ApfsDriverLoader.efi or a patched (log free) version of the apfs.efi you won't be needing CmsVideoDxe and using ApfsDriverLoader.efi has the benefit of getting the latest updated version of the driver with each clover update/build instead of extracting the apfs.efi from the macOS installer and/or patching it to have a log free boot process.

You only need to use one of those drivers you don't need them both.

Edited by Cyberdevs
  • Like 1
Link to comment
Share on other sites

 
If you use Apfs.DriverLoader.efi or a patched (log free) version of the apfs.efi you won't be needing CmsVideoDxe and using ApfsDriverLoader.efi has the benefit of getting the latest updated version of the driver with each clover update/build instead of extracting the apfs.efi from the macOS installer and/or patching it to have a log free boot process.
You only need to use one of those drivers you don't need them both.

Yep. Thanks man.:)@MorenoAv, If that’s what you meant by text, the apfs.efi I posted above should be already verbose patched. Which means you won’t have any verbose text when loading that driver. So if that’s what you meant, you can use that apfs.efi file I posted above.
  • Like 1
Link to comment
Share on other sites

Finally, I can get my sound output and input working on Mojave using AppleALC1.2.8v2.:)

My Laptop's codec is ALC271x, I use alc-layout-id 27 and apple-layout-id 5 on DSDT.

 

My PC's codec is ALC891/867, I use alc-layout-id 13 and apple-layout-id 10 on DSDT.

 

So, use alc-layout-id value based on supported codec by AppleALC, and use apple-layout-id value based on vanilla Mojave's AppleHDA (have to test apple-layout-id value one by one til I get sound working).

  • Like 1
Link to comment
Share on other sites

Hi @arsradu, @Cyberdevs,

Thanks for you answers, and I mean, logs on apfs... and I'm going to follow your suggestions, when I'm able to boot again in my hack...

I'm not intending to use 8, I was experimenting with layouts one by one to see if any of them worked, and stoped in 8. It was then that I made that ioreg.

Link to comment
Share on other sites

×
×
  • Create New...