Jump to content
EMlyDinEsH

Guide for enabling VGA, DVI, DP and HDMI in Intel HD4000 GPU

Recommended Posts

Hi everyone, 

 

           This is a guide for enabling the ports VGA and HDMI/audio for Notebooks with Intel HD4000 GPU, which is based on my experience and details found by our hackintosh community making the guide in a way so everyone can understand. I will try to improve this guide and add more details when i find something.

 

Needed:

 

Section - 1:

INFORMATION ABOUT THE CONNECTORS FROM APPLE KEXT "AppleIntelFramebufferCapri":

 

Lets first take a look at the connectors found and used by Apple in "AppleIntelFramebufferCapri" kext. The values which we need to consider and relevant from Apple framebuffer kext are Connectors types and its number for detecting Display ports.

 

Connectors number values:

0503 - LVDS (Laptop built-in display)
0602 - VGA 
0205/0406/0304 - HDMI/DVI/DP

Connectors Type values:

DVI/DP  - 0004
DVI DUAL LINK - 0400
HDMI - 0008 and 06
VGA  - 1000/0010/0001

Section - 2:

CONNECTORS VALUES FOR DISPLAY PORTS DETECTION:

// LVDS, works with any one of the below values

05 03 00 00 02 00 00 00 30 02 00 00

05 03 00 00 02 00 00 00 30 00 00 00

01 00 00 00 02 00 00 00 30 00 00 00

01 00 00 00 02 00 00 00 30 02 00 00

 

Port values XX XX can be any one from '02 05/ 03 04/ 04 06' for DVI/DP/HDMI.

// DVI, works with any one of the below values

XX XX 00 00 00 04 00 00 81 00 00 00

XX XX 00 00 00 04 00 00 07 01 00 00 

XX XX 00 00 00 04 00 00 07 01 00 00 

 

// HDMI

XX XX 00 00 00 08 00 00 06 00 00 00

 

Connector type values XX XX can be any one from '10 00/ 00 10/ 00 01' for VGA.

// VGA, works with any one of the below values

06 02 00 00 02 00 00 00 30 02 00 00

06 02 00 00 02 00 00 00 30 00 00 00

06 02 00 00 XX XX 00 00 07 01 00 00

06 02 00 00 XX XX 00 00 07 00 00 00

06 02 00 00 XX XX 00 00 81 00 00 00

06 02 00 00 XX XX 00 00 06 00 00 00

06 02 00 00 XX XX 00 00 09 00 00 00

 

Section - 3:

EXPLAINING THE PATCH PROCESS OF CONNECTORS TABLE:

 

Below, we have the Connector table from AppleIntelFramebufferCapri kext for platform-id 09 00 66 01. The reason for taking this platform-id as an example is because it has only three connectors so it matches laptops connectors. (Next close match/better platform-id is 03)

 

Original:

09 00 66 01 01 03 03 03 00 00 00 04 
00 00 00 01 00 00 00 20 10 07 00 00 
10 07 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 F0 D9 05 00 00 00 00 00 
01 00 00 00 02 00 00 00 30 00 00 00 
02 05 00 00 00 04 00 00 07 01 00 00 
03 04 00 00 00 04 00 00 07 01 00 00

Let me explain the above table by each line

 

09 00 66 01 01 03 03 03 00 00 00 04

 

In this, we have information regarding platform id of HD4000 (09 00 66 01) and number of Connectors(Ports) which is 03. We can edit this port number to be 3 or less and overriding the respective lines of the port with '0' values which will eventually remove that port from the connectors frame buffer table.

 

Note: 

Each connector table of platform-id has some lines like above which varies for each version of AppleIntelFramebufferCapri kext and I don't know what these are but they are needed, so don't do any changes to this.

00 00 00 01 00 00 00 20 10 07 00 00 

10 07 00 00 00 00 00 00 00 00 00 00 

00 00 00 00 F0 D9 05 00 00 00 00 00 

 

Next

01 00 00 00 02 00 00 00 30 00 00 00

 

Note: Some notebooks may need the value "05 03 00 00 02 00 00 00 30 00 00 00" for the LVDS to work, so you might be using the platform id 03 00 66 01 because of that, so you can still edit the connector with this value and proceed with platform id 09 (or) edit platform id 03 tables using same ideas explained here for platform id 09.

 

The above line represents Laptop display (LVDS) which works fine, so we don't need to change anything here. But, if you find your LVDS is not working then try experiment with other LVDS values I've mentioned above.

 

02 05 00 00 00 04 00 00 07 01 00 00 

03 04 00 00 00 04 00 00 07 01 00 00

 

The above 2 lines represent Display ports DVI and HDMI, but in HDMI only Video will work default so we we need to use modify the connector type values like below for Audio.

 

0205/0304/0406 00 00 00 08 00 00 06 00 00 00
( or )
0205/0304/0406 00 00 00 08 00 00 xx xx 00 00 where xx are default values
 
Here we have edited connectors table for HDMI and VGA:
 
Edited connectors table for GPU for the Platform id 09 00 66 01

09 00 66 01 01 03 03 03 00 00 00 04 
00 00 00 01 00 00 00 20 10 07 00 00 
10 07 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 F0 D9 05 00 00 00 00 00 
01 00 00 00 02 00 00 00 30 00 00 00 
06 02 00 00 00 01 00 00 09 00 00 00 
03 04 00 00 00 08 00 00 06 00 00 00

(or)

09 00 66 01 01 03 03 03 00 00 00 04 
00 00 00 01 00 00 00 20 10 07 00 00 
10 07 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 F0 D9 05 00 00 00 00 00 
01 00 00 00 02 00 00 00 30 00 00 00 
02 05 00 00 00 08 00 00 06 00 00 00 / 02 05 00 00 00 08 00 00 07 01 00 00
06 02 00 00 00 01 00 00 09 00 00 00 

Edited connectors table for the Platform id 03 00 66 01
Original:

03 00 66 01 01 02 04 02 00 00 00 04 
00 00 00 01 00 00 00 20 10 07 00 00 
10 07 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 
05 03 00 00 02 00 00 00 30 00 00 00 
02 05 00 00 00 04 00 00 07 04 00 00 
03 04 00 00 00 04 00 00 81 00 00 00 
04 06 00 00 00 04 00 00 81 00 00 00

Edited:

03 00 66 01 01 02 04 02 00 00 00 04 
00 00 00 01 00 00 00 20 10 07 00 00 
10 07 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 
05 03 00 00 02 00 00 00 30 00 00 00 
06 02 00 00 00 01 00 00 09 00 00 00 
03 04 00 00 00 08 00 00 81 00 00 00 
04 06 00 00 00 08 00 00 81 00 00 00

(or)

03 00 66 01 01 02 04 02 00 00 00 04
00 00 00 01 00 00 00 20 10 07 00 00
10 07 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
05 03 00 00 02 00 00 00 30 00 00 00
02 05 00 00 00 08 00 00 06 00 00 00 / 02 05 00 00 00 08 00 00 07 04 00 00 
06 02 00 00 00 01 00 00 09 00 00 00
04 06 00 00 00 08 00 00 81 00 00 00

NOTE:

For detecting LVDS, HDMI and VGA connectors, you have to try each value from "Connectors values" of Section-2 to find out on which connector your notebook is using what in order to make them work. You can experiment with other connectors tables found in the Apple frame buffer kext as well(which are 12 in number) using the "Connectors values" info of Section-2 to find even better one, because every notebook is not going deal VGA and HDMI similarly.

 

From Mountain Lion 10.8.2 or later, VGA is not working due to the changes made by the Apple in the graphics drivers. I will update the thread when there is info about VGA.

 

 

Section - 4:

STEPS FOR PATCHING THE KEXT:

  1. Get the File "AppleIntelFramebufferCapri" from AppleIntelFramebufferCapri.kext/Contents/MacOS folder and place it in some place(Ex:-Desktop) for patching
  2. Open the above file from the Hex fiend application
  3. Press Command + F for searching
  4. Enter Original Connectors table values in Find Box and edited Connectors table values in replace box then Click on Replace all button
  5. Now save the file and copy back the file to the Folder AppleIntelFramebufferCapri.kext/Contents/MacOS
  6. Install the patched Kext 

 

NOTE:

Display's won't detect automatically, so we have to detect manually by going to the Display preferences and Click on Detect Display button.

 

In Mountain Lion, we don't see Detect Display button at Display preferences. For getting this button, hold the ALT key at Display preferences to display the "Detect" button.

 

For HDMI Audio:

We need a DSDT patch for HDEF and patched AppleHDA (VoodooHDA might also work).

 

For this, follow my guides for patching AppleHDA: AppleHDA Guide

 

 

 

Hope this guide helps for people trying to get VGA and HDMI with audio.

 

 

 

Credit goes to  bcc9, RevoGirl(R.I.P), toldeda and others.

  • Like 2

Share this post


Link to post
Share on other sites

My Dell E6430 laptop is now working with internal display, external HDMI, and DVI through a port replicator!  A couple of comments on the guide:

 

First, I believe the reference made in this guide about "rev 09" is incorrect.  While I do have "rev 09" on my "0166" device (as shown by lspci -nn), my platform ID for Framebuffer is actually "3".  So it may be true that a majority are rev 09 but I don't think that helps with the platform selection - you just have to do trial and error to get it right.  3 is a good start since it supports 4 different ports.  See this post at insanelymac for details on the different platform IDs. 

 

Next, this guide only discusses 3 possible ports, but some platform IDs, including the one for mine, actually support 4 ports.  So in the the guide above, just go one line of Hex further than the examples shown if you are using a 4 port platform. 

 

I was unable to get VGA working alongside the internal display.  I think that they may be internally linked in my laptop.  In fact, using the Fn F8 key combo switches between them.  It's pretty ugly display and then it promptly breaks, though.  So probably not wise to use.  But perhaps not too surprising since I am not aware of any Apple laptops that have HD4000 and a VGA port.  I'd be interested to know if anyone has actually been able to discretely get the VGA and internal displays working independently. 

 

Now for my port replicator, if I boot up in the port replicator, everything works great.  If I try to dock into it with the computer already booted up, the Hacintosh thinks it is going for extended displays instead of switching the internal display off.  Even if I close the lid/display, the display stays lit and extended display is active.  And the worst is if I try to undock after booting up with it docked - no switching to internal display which means I need to force a reboot.  So there's some handoff issues that would be nice to figure out. 

 

And just to confirm, I was able even to get the HDMI audio working using the combination of this post and the one about patching AppleHDA binary.  And while I don't expect to do that often (most of the time either laptop on the road or in the office docked), it is very cool that I can do that. 

 

UPDATE

I forgot to check both DVI on my dock.  I checked today and both work at the same time!  I can't yet tell if either are working with Dual-Link DVI (since I don't have a device that requires dual-link - yet!) but very excited to have both displays working well.  If I could get the docking and undocking actions working well, this would be perfect.

/UPDATE

Share this post


Link to post
Share on other sites

Try to patch VGA with all connectors 10.8.5 but still black screen :(.

 

try different platform id and patch related to that. Also try to patch old version AppleIntelFramebufferCapri.kext and see yourself. Mostly the version from 10.8.1 is working pretty well for the people i know, i don't know about new version and will try to contact them then let you know for the details .

  • Like 1

Share this post


Link to post
Share on other sites

@ktbos

Well, the reason for starting with '09' was matching revision id  which is not mandatory but i thought its best to use matching id, and I know that '03' works for most of them but the difference between '03' and '09' is that they are using different values for LVDS detection other than both works fine for every other values from the people i know. So, if we swap the values of LVDS  from '03' to '09' then it also works fine, that's why i have included two tables of edited values for '09' above where one has default value of '09' and other one has '03' LVDS value.

 

Also i don't have HD4000 hardware with me to understand every value, but i wanted to give some insight about HD4000 connectors for everyone for a start in patching these with my guide which is based on the HD3000 connectors experiment understanding and experience with HD4000 from other users and web. So, I will try to improve this guide when i get my hands on HD4000 and find any details that's related to this.

Share this post


Link to post
Share on other sites

Oh sorry didn't mean to criticize! Yes there's lots of great info here. And amazing you managed to figure it all out even though you don't have the hardware. I just wanted to note where I had been confused so that when others read this post they don't think that the rev number 9 means they should use that as their platform. That killed a lot of time for me. I think the best way to choose platform is match video ram and capabilities. And most people reading this will probably want to start with 3. So I figured contributing this info was my way of giving back for all the great info you had here.

Share this post


Link to post
Share on other sites
I was unable to get VGA working alongside the internal display.  I think that they may be internally linked in my laptop.  In fact, using the Fn F8 key combo switches between them.  It's pretty ugly display and then it promptly breaks, though.  So probably not wise to use.  But perhaps not too surprising since I am not aware of any Apple laptops that have HD4000 and a VGA port.  I'd be interested to know if anyone has actually been able to discretely get the VGA and internal displays working independently.

 

Do you mind posting which VGA connector hex string you used?

Share this post


Link to post
Share on other sites

try different platform id and patch related to that. Also try to patch old version AppleIntelFramebufferCapri.kext and see yourself. Mostly the version from 10.8.1 is working pretty well for the people i know, i don't know about new version and will try to contact them then let you know for the details .

 

Thanks, i will try with 03 platform id on 10.8.5.

  • Like 1

Share this post


Link to post
Share on other sites

Do you mind posting which VGA connector hex string you used?

All of them!! Really, I tried most of them one at a time. Very tedious and frustrating when you don't succeed.

Share this post


Link to post
Share on other sites

From your previous post, I assumed that you have VGA working.

 

If you do, do you mind posting the correct hex string?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×