toleda / audio_CloverHDMI

macOS Intel/AMD/Nvidia HDMI audio with Clover
147 stars 22 forks source link

HD630/ALC1220 in progress #16

Open malhal opened 7 years ago

malhal commented 7 years ago

Used the HD5x0 HDMI guide (found it after posting my original version of this issue sorry) and the Clover steps but used the new hd6x0 config to copy from instead.

After I saved my config and rebooted not only did HDMI audio appear in my Sound prefs and is working (thanks!), but also my display is now 4k@30hz where as was 1080p scaled to 4k before. It had lost my display prefs resolution setting and the desktop was tiny at native res 'most space'. Must be some kind of side affect of the patches but has saved me some time investigating that.

By the way, the Clover setting UseIntelHDMI does hda-gfx=onboard-1 so maybe that could save you an 'Arbitrary' setting. I kept all the settings because was unsure about the pciex field, and I had left UseIntelHDMI checked as figured it wouldn't do any harm.

screen shot 2017-08-18 at 22 17 31
toleda commented 7 years ago

UseIntelHDMI may add injections, however, not sufficient for working HDMI audio. Often, arbitrary settings override/disable other injections; use with caution. cloverHDMI-130 supports Kaby Lake/HD6x0, without arbitrary injection.

malhal commented 7 years ago

Sorry I'm a bit confused by that. I added 2 Arbitrary settings from the config-hdmi_hd6x0-126.plist inside config-hdmi_hd6x0-120.plist.zip. Those were the Devices/Arbitrary/10.8+-Intel-IGPU-HDMI-HDA and Devices/Arbitrary/10.12.6-Intel-HDA-Desktop. Are you saying I don't need those? And do I not need the UseIntelHDMI either?

Oh you said cloverHDMI-130. I haven't seen that, only up to 120 is in the repo.

toleda commented 7 years ago

My mistake, fixed.

malhal commented 7 years ago

Removed all my manual edits, which included the renames HDAS (although I had that previous to attempting to fix HDMI audio but thought would check if this command adds it), GFX, HECI. Those 2 Arbitrarys I mentioned above, and 10.12.6-KBL-5912000-Port_0x5-DP2HDM.

The command didn't output what changes it made but I did a diff and saw that it only made this one change:

        <key>KextsToPatch</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>t2-10.12.6-KBL-5912000-Port_0x6-DP2HDM</string>
                <key>Find</key>
                <data>AgQKAAAEAACHAQAA</data>
                <key>Name</key>
                <string>AppleIntelKBLGraphicsFramebuffer</string>
                <key>Replace</key>
                <data>AgQKAAAIAACHAQAA</data>
            </dict>

Is it correct that it should only make that one change? Also I noticed previously it was using port 5 and now is port 6 is that ok too? I saw some curl output, is it downloading the config-hdmi_hd6x0-120.plist.zip from the repo and then replacing values? That would explain why the number is different from what I took manually out of it the first time.

toleda commented 7 years ago

Kaby Lake/HD630 support only available in cloverALC-130. Sky Lake desktop framebuffer requires a second patch to fix a framebuffer error, Kaby Lake desktop framebuffer is correct with one patch. Attach IOReg for a valid reply to the port question.

malhal commented 7 years ago

Apologies, it might sound strange but I didn't even realise that cloverALC was a pre-requisite for cloverHDMI. I was using a different patch for my audio but I will start over with exclusively your patches and see how that goes.

toleda commented 7 years ago

Apologies, major typo. Meant cloverHDMI-130. cloverALC is not a prerequisite for HDMI audio.

malhal commented 7 years ago

No worries about that. So I cleared out any previous audio patches, including some stuff I found in the config that wasn't even on the Configurator UI (e.g. IOKitPersonalities with about 20 entries mentioning toledaALC maybe came from Unibeast). Applied cloverALC after reboot audio worked. Then applied cloverHDMI but after reboot no additional HDMI audio appeared. Seems I'm missing something else which I did have when I did it manually. I've attached all relevant files, thanks.

malhal.zip

Ack sorry I said cloverALC worked, actually music and videos don't play, will need to look into that but hopefully my files will be useful.

malhal commented 7 years ago

Didn't even know I needed audio_ALCInjection but I applied that and it fixed the non playing music and videos. HDMI audio is still not an option though.

On my 3rd reboot I got HDMI audio to appear. Maybe it's required for the monitor source to be set to the HDMI at boot, where as I sometimes am using a different input on the display when the hack boots and I use remote desktop before switching the display to it later.

toleda commented 7 years ago

HDMI audio, 2 issues:

  1. Remove config.plist/ACPI/DSDT/Patches/Item 0 (Rename HDAS to HDEF)
  2. Port 0x5 patch is correct. Fix, download v0.3 from repo (same link as above) Restart
malhal commented 7 years ago

Syntax error, extra bracket on line 1053.

But with the bracket fixed and the steps followed sorry to report that all audio outputs have gone from sound prefs. malhal config.plist.zip

toleda commented 7 years ago

Apologies, I am traveling and do not haver access to my development machine. config.plist shows the correct framebuffer edit, useless to figure out what changed. Attach cloverHDMI output and IOReg.

malhal commented 7 years ago

No worries, here is a zip with the 2 files requested.

malhal ioreg cloverHDMI output.zip

malhal commented 7 years ago

I thought we would have needed the HDAS to HDEF and the UseIntelHDMI but interested to hear what you think. No rush at all enjoy your travels!

toleda commented 7 years ago

1220: realtelALC.kext is missing. Verify realtekALC.kext is installed in EFI/CLOVER/kexts/10.12 (or Other) or /L/E HDMI audio: What display is connected to what motherboard connector?

cloverHDMI installs EFI/CLOVER/ACPI/patched/SSDT-HDEF-HDAS-1.aml which does what Clover is supposed to do but doesn't.

malhal commented 7 years ago

The aml isn't installed to that dir, will try to debug why, not great at bash tho. I have the aml -1 and -3 files from earlier tho so at least can try this out. Sorry yes I had deleted realtekALC because I thought AppleHDA has support for the 1220 now.

toleda commented 7 years ago

Use aml-1 only Removed 1220 support, run cloverALC to restore realtekALC.kext

malhal commented 7 years ago

Hi even with realtekALC added back I still haven't been able to get it to work so I reverted back to my old technique for the moment. I'll try this again soon though and post the output from each step again.

malhal commented 7 years ago

Ok I have figured it out. After clearing everything out here is why it goes wrong:

  1. Run cloverALC, errors no HDEF
  2. Run cloverHDMI (because this has the ability to install the aml that gives HDEF), errors no HDEF
  3. Manually copy in patch SSDT-HDEF-HDAS-1.aml reboot (I had it saved from yesterday).
  4. Run cloverALC, success, reboot and audio works
  5. Run cloverHDMI, success, reboot and audio is gone!!!
  6. Manually delete ...HDAS-2.aml, reboot and both audio and hdmi audio is working. (I would have never figured this out without your comment because at this stage there are too many variables).

I also had ran ALCInjection audio_200_Series_hda-124_v1.0.command early on and I think maybe it didn't work HDEF error too.

So I think to fix it cloverALC or ALCInjection needs to install the aml-1. And cloverHDMI should not install aml-2.

If you'd like me to run through it again and provide the terminal output from each step I'll happily do that.

edit: final state config attached malhal-config.plist.zip ACPI/patched contains SSDT-HDEF-HDAS-1.aml and SSDT-HDMI-HD630.aml kexts/10.12 contains realtekALC.kext

toleda commented 7 years ago

HD630 HDMI audio requires HDEF ALCInjection audio_200_Series_hda-124_v1.0.command is one of 4 methods to enable Kaby Lake onboard audio, nothing to do with HD630 HDMI audio. Without cloverHDMI output, no idea how SSDT-HDEF-HDAS-2.aml was installed; not applicable to your system.

malhal commented 7 years ago

Here is requested output: cloverHDMI output.txt

toleda commented 7 years ago

Attached config.plist/Devices/Audio/Inject/3 Why is Audio ID: 3?

malhal commented 7 years ago

Almost certain cloverALC asked "Use Audio ID: 3?" Maybe at step 3 I accidentally used SSDT-HDEF-HDAS-3.aml Would that have done it?

toleda commented 7 years ago

Yes, 1220 does not support Audio ID: 3; no 1220 audio. cloverALC does not allow Audio ID: 3 for 1220. SSDT-HDEF-HDAS-1.aml overrides Clover, fix config.plist

malhal commented 7 years ago

Yep I had SSDT-HDEF-HDAS-3.aml in patches by mistake but as you can see it did suggest and allow 3 for ALC1220 maybe it could not do that?

Confirm Realtek ALC1220 (y/n): y
Clover Audio ID Injection (y/n): y
Use Audio ID: 3 (y/n): y

cloverALC audio3.txt

toleda commented 7 years ago

Stand corrected, checks when response is n; fix in process. Every previous attached config.plist had Audio ID: 1.

john-shine commented 7 years ago

The audio_cloverHDMI-130.command generate 3 files: HD630-config.plist HD630-SSDT-HDMI-HD630.aml HD630-SSDT-HDEF-HDAS-3.aml

I know what to with the plist file, but how to install other 2 aml file? just place in COVER->ACPI->patched folder?

toleda commented 7 years ago

Rename HD630-config.plist to config.plist, otherwise Clover ignores the file. Edit onfig.plist/Devices/Audio/Inject/1, save Restart script does not add HD630 to the .aml file name, remove the HD630 ... files. run cloverHDMI Restart

john-shine commented 7 years ago

Follow your guid, but still not work. Here is my ioreg and config.plist, hope for your help. Thanks! johnshine.zip

toleda commented 7 years ago

Disabled ssdts, remove: config.plist/ACPI/DSDT/Patches/

  1. Item 3 (Change GFX0 2 IGPU)
  2. Item 2 (Rename HDAS to HDEF) Restart, reply with new files.
john-shine commented 7 years ago

Remove Item 3 (Change GFX0 2 IGPU), computer cannot startup. So I only Item 2 (Rename HDAS to HDEF) (by disabled), following is new files:

johnshine.zip

toleda commented 7 years ago

What happened to EFI/CLOVER/ACPI/patched/

  1. SSDT-HDEF-HDAS-1.aml ?
  2. SSDT-HDMI-HD630.aml ?

Attach cloverHDMI terminal output and Clover boot log.

john-shine commented 7 years ago

No any aml in patched folder there. Here is my Clover folder at EFI partition & boot log

Clover.zip

john-shine commented 7 years ago

ioreg export by explorer v2.1 with & without Item 2 (Rename HDAS to HDEF) patch ioreg files.zip

toleda commented 7 years ago

Clover.zip shows no ssts, boot log does not show ssdts inserted; user error. Steps:

  1. Mount EFI partition
  2. REMOVE Rename HDAS to HDEF and Change GFX0 2 IGPU patches, save
  3. RUN cloverHDMI
  4. Confirm SSDT-HDEF-HDAS-1.aml and SSDT-HDMI-HD630.aml installed
  5. Restart
  6. Reply with EFI/CLOVER folder, Clover boot log and IOReg.
john-shine commented 7 years ago

Where can I get SSDT-HDEF-HDAS-1.aml and SSDT-HDMI-HD630.aml? RUN audio_cloverHDMI-130.command only get HD630-SSDT-HDEF-HDAS-3.aml and HD630-SSDT-HDMI-HD630.aml. I not quite understand.

toleda commented 7 years ago

cloverHDMI does not install HD630-SSDT-HDEF-HDAS-3.am or HD630-SSDT-HDMI-HD630.aml, remove both The HDAS-3 bug is fixed in the latest cloverHDMI, download latest. Follow Steps 1-6 above.

john-shine commented 7 years ago

latest cloverHDMI has report errors, the file it downloaded as 404 not found in github. Follow is terminal output

terminal output.txt

toleda commented 7 years ago

Is config.plist/Devices/Audio/Inject/4? If yes, why? If no, attach IOReg, config.plist and Clover boot log.

john-shine commented 7 years ago

Yes, because 4 is for desktop according doc

john-shine commented 7 years ago

It Works now, great thanks to you