Jump to content

HDMI Audio on HP Envy 17-ae100


mnfesq
 Share

10 posts in this topic

Recommended Posts

My laptop has the Intel UHD 620 IGPU and an Nvidia MX150 DGPU that is disabled in my DSDT in order to get macOS to boot.  The BIOS does not allow me to select my GPU.  I have to use the Intel.  However, my HDMI port is physically connected to to my Nvidia gpu (at least I believe it is.). Initially, I could not get HDMi video or audio to work.  I installed the NvidiaGraphicsFixup.kext because I learned that recent beta versions of Mojave allow dual graphics cards.  I could not get my Nvidia gpu to load but, to my surprise, HDMI video works.  HDMI audio, however, does not work and I really don't know what, if anything, I can do unless I can get the Nvidia gpu to load.  Any ideas?

 

Edited by mnfesq
Link to comment
Share on other sites

HDMI audio usually requires to patch the graphics layout used in order to inject HDMI connector-type 0008 0000 into the relevant display output port.

 

If you can post a zipped saved output of, say, IORegistryExplorer app when your HDMI is connected, we can look this up.

Link to comment
Share on other sites

5 hours ago, Hervé said:

HDMI audio usually requires to patch the graphics layout used in order to inject HDMI connector-type 0008 0000 into the relevant display output port.

 

If you can post a zipped saved output of, say, IORegistryExplorer app when your HDMI is connected, we can look this up.

 

Here you are.  Thanks for taking a look.  Let me know if you need me to post anything else.

 

mnfesq's HP Envy 17.zip

Link to comment
Share on other sites

Ok, so your IOReg shows UHD620 (id 0x5917) graphics with layout-id 0x59160000 which is one of the recommended layouts for KBL mobile HD620.

HD620_layout-id.png.60593a29c491a01a102a5272742c9f0e.png

KBL_layouts.png.f9c77f18451bdb5bf50c6976a04775b7.png

 

Your IOReg also shows your built-in LCD on framebuffer@0, port #0 with LVDS connector-type 0200 0000, as expected:

built-in_LCD.png.cbd12464dd389ae1178776c86cab6a27.png

 

We also see that your external display is connected to framebuffer@1, port #5 with DP connector-type 0004 0000:

HDMI_port.png.c8626a2ba248115ae3d76b45bc6107e4.png

 

In order to gain HDMI audio, I reckon you'd need to patch that layout 0x59160000 in order to modify FB@1/port #5 to from DP connector-type to HDMI connector-type. Let's look at that layout in the KBL framebuffer kext:

00001659 00000000 8DD10800 00000000
01030303 00002002 00000000 00000060
6C050000 6C050000 00000000 00000000
00000800 02000000 98000000 01050900
00040000 87010000 02040A00 00080000
87010000 FF000000 01000000 20000000
0B0B0000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
C0CB0E00 00000000 B0CC0E00 00000000
00CD0E00 00000000 01000000 08000000
01000000 00000000

It's High Sierra's layout but I reckon Mojave Beta #8 carries just the same...

 

That layout defines 3 x display ports:

00000800 02000000 98000000     // FB@0, port #0, LVDS connector-type 02000000
01050900 00040000 87010000     // FB@1, port #5, DP connector-type 00040000
02040A00 00080000 87010000     // FB@2, port #6, HDMI connector-type 00080000

So, if you change:

01050900 00040000 87010000

to:

01050900 00080000 87010000

you should hopefully be able to get HDMI audio output.

 

You can either apply the binary modification to the kext through tools such as 0xED or HexFiend or through the Clover on-the-fly patching facility with:

kext: com.apple.driver.AppleIntelKBLGraphicsFramebuffer
                                                                                                                                           \/
Find:    00001659000000008DD1080000000000010303030000200200000000000000606C0500006C0500000000000000000000000008000200000098000000010509000004000087010000
Replace: 00001659000000008DD1080000000000010303030000200200000000000000606C0500006C0500000000000000000000000008000200000098000000010509000008000087010000
                                                                                                                                           /\

 

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

So I tried this out last night without success.  Your explanation is excellent and I see no reason why it wouldn't work.  However, I have some observations:  

 

I  have been trying to use Whatevergreen and, initially, I lost QE/CI.  I was able to get it to load after a few more attempts and it worked in some ways but not in others.  It seemed to be an adequate substitute for IntelGraphicsFixup and CoreDisplay, but not for NvidiaGraphicsFixup.  Using Whatevergreen instead of NvidiaGraphicsFixup, I lost HDMI video.  HDMI video returned when I restored NvidiaGraphicsFixup along with Whatevergreen.  Whatevergreen also broke sleep on my laptop for some reason so I am back to using IntelGraphicsFixup, NvidiaGraphicsFixup and CoreDisplay without Whatevergreen.

 

Also, based on your analysis that HDMI is coming from my UHD 620, I changed my config.plist and removed Inject Nvidia in Graphics.  That prevented my laptop from booting with NvidiaGraphicsFixup.  Restoring Nvidia injection with NvidiaGraphicsFixup resolved that issue.

 

I am using VoodooHDA rather than AppleHDA and I have started experimenting with a switch to the Apple driver.  I have not been successful yet but, I tried some different configs in VoodooHDA and, while normally when I select HDMI audio, the audio indicator in the menu bar is grayed out, once I got it so that it remained black but the volume indicators were gone (which might be normal since HDMI audio is controlled by the device's volume control.). It didn't really matter, however, because I had not sound coming from the HDMI audio device with that configuration.

 

One last thing, when I run IOReg Explorer, it still says that my connector type is 0004, not 0008.  

 

EDIT:  I've been working on this for a while today and, using some patches Toleda has on his Github, I have been able to change the connector type for FB@1 to 0008.  Here's a new IOReg file. Still, no HDMI audio. Still, I get no HDMI at all unless I use NvidiaGraphicsFixup.

 

mnfesq's HP Envy 17.zip

Edited by mnfesq
Link to comment
Share on other sites

Well, lack of HDMI audio now probably results from using VoodooHDA rather than patched AppleHDA or AppleALC with the appropriate codec layout injection. You could post us a screenshot of DPCIManager app since that should display the audio codec now that you run on VoodooHDA.

 

Edited by Hervé
Link to comment
Share on other sites

14 hours ago, Hervé said:

Well, lack of HDMI audio now probably results from using VoodooHDA rather than patched AppleHDA or AppleALC with the appropriate codec layout injection. You could post us a screenshot of DPCIManager app since that should display the audio codec now that you run on VoodooHDA.

 

 

I don't know if VoodooHDA is a problem but most people are not as familiar with it as I am. I am willing to use AppleHDA but so far, I have been unsuccessful with it using layout-id 3, 13, and 28 along with AppleALC.kext.  My codec is Realtek ALC295.  Here's the screenshot you suggested:

 

Untitled.thumb.png.39339b481020e6434d342c39fbaa00e8.pngThanks.

 

Edited by mnfesq
Link to comment
Share on other sites

1 hour ago, Hervé said:

According to the AppleALC wiki, the layouts you can try for ALC295 are: 1, 3, 13, 14, 15, 28.

 

No go on any of those or id 12, which is brand new for the HP Envy.  However, I tried a patched version of AppleHDA and attempted to backup the original but it didn't back up so now, I don't have a clean copy of AppleHDA for Mojave Beta 8.  Could you please upload yours so I can try these with the correct kext?  Thanks.

Link to comment
Share on other sites

 Share

×
×
  • Create New...