As pointed out by ElNono and proteinshake, the critical bit missing to get the HD4000 drivers to load is the AAPL,ig-platform-id device property for the graphics device. Of course, on anything other than Apple hardware, this property wouldn’t exist, and would need to be added.

The AAPL,ig-platform-id property is a 32-bit number that must be one of the values listed in the following table. Thanks to ElNono for figuring it out.

AAPL,ig-platform-id

Memory (MB)

Pipes

Ports

Comment

01660000

96

3

4

01660001

96

3

4

01660002

64

3

1

No DVI

01660003

64

2

2

01660004

32

3

1

No DVI

01620005

32

2

3

01620006

0

0

0

No display

01620007

0

0

0

No display

01660008

64

3

3

01660009

64

3

3

0166000a

32

2

3

0166000b

32

2

3

The value of AAPL,ig-platform-id selects which graphics configuration the driver will use (er, blindly assume). Setting AAPL,ig-platform-id to any of the 12 values will load the HD4000 driver, but there are some other constraints.

First, the setting affects which ports are enabled. Configurations with zero ports should be avoided (no output?). Configurations with just one port should probably be avoided because it’s probably not the port you’re looking for. On my GA-Z77M-D3H, for configurations with one port, the enabled port is not the DVI port. For configurations with two or more ports, DVI was available. The VGA port is not enabled for any of the configurations. I did not test the HDMI port.

Also, the graphics memory size for the configuration must match the setting in BIOS. If they don’t match, the driver may crash (kernel panic at gen7_memory.cpp:721), or the display may be corrupted. For example, using configuration 0x01660000 (96 MB, 3 pipes, 4 ports), set the Graphics Memory Size to 96 MB to match. It appears that OS X doesn’t obey the DVMT Total Memory Size setting (always 512 MB with 8 GB system RAM), so I just left it as MAX to match.

ioreg -l -p IODeviceTree can be used to verify that the device property was correctly added to the list of properties for the graphics device. The end result is that the AAPL,ig-platform-id property shows up in ioreg output. A correct value causes AppleIntelGraphicsHD4000.kext to load.

Setting AAPL,ig-platform-id

The goal is to inject a device property named AAPL,ig-platform-id with a 32-bit value that is one of the table entries (e.g., 01660000). There are many ways to inject a device property, and I know very few of them. The method I used was to modify the Chameleon bootloader’s GraphicsEnabler code to add the property whenever GraphicsEnabler=y (gma.c). Here are a few options I’ve heard of:

Device property injection by the bootloader using “device-properties” in org.chameleon.Boot.plist. I don’t know how to generate such a string, but there are a few examples posted in this thread. Something about gfxutil.

Editing the DSDT to add the property for the graphics device.

Modifying the Chameleon Boot Loader

I chose to modify the GraphicsEnabler code from the Chameleon/Chimera bootloader. The patches below can be applied to the source code from svn (http://forge.voodooprojects.org/svn/chameleon). I’ve also compiled patched versions of Chameleon (rev. 2012) and Chimera (rev. 1999) for convenience.

Settings that don’t matter

It appears that AAPL,ig-platform-id is the only critical setting to enable hardware acceleration. I’ve tried changing a few other things and none of them seem to matter.

device-id and revision. The driver doesn’t care whether this is mobile (0166) or desktop (0162). I suspect it needs to be one of the two in order to load the kext, but it’s not important to match it with the high-order 16 bits of AAPL,ig-platform-id. I left mine unchanged at 0162:0009 using configuration 01660000.

GFX0 vs. IGPU in DSDT. This doesn’t seem to matter either. Both work the same, so I left mine as GFX0 without issues.

SMBios version/productname. I tried a few, and also tried without smbios.plist. The driver loaded fine in all cases. (Mac Pro, iMac, MacBook Pro were all ok)

Settings that do matter

AAPL,ig-platform-id. Yes, it matters.

Graphics memory size in BIOS. This must match the amount of graphics memory for the chosen configuration.

Connectors. Not all output connectors are enabled. Getting a garbled display could be a symptom the connector currently used is disabled. Changing the value of AAPL,ig-platform-id might change which connectors are enabled/disabled.

57 comments to Intel HD4000 QE/CI Acceleration

I did something right but at the same time something is also wrong too. I have Intel HD Graphics 4000 512 MB now but I have to start up in safe mode because I am getting a grey distorted screen after startup without safe mode enabled.

Hi Henry, could you give me a clue as to where I can place the AAPL,ig-platform-id or where I can find this? I am new to running the Mac os and its a bit confusing to a newbie like me so any help would be greatly appreciated.
If this is something I need to add to my org.chameleon.Boot.plist then maybe give me an example of what this should look like so I can just copy and paste it from yours to mine. This is how my org.chameleon.Boot.plist looks now and and I do get a distorted screen after startup If not in Safe Mode. I DON’T USE A dsdt.aml with my setup! Thanks a lot for the information here!

As far as I know, without AAPL,ig-platform-id set, the HD4000 driver wouldn’t even attempt to load. Getting distorted screen suggests the driver is loading. Do you have it set already? (Which boot loader are you using?)

Im using Chameleon r2012 from above. When I start up in safe mode it shows the intel HD 4000 as having 512mb, up from 64mb but I don’t know where to take this from here. I can’t find where I am supposed to change the AAPL,ig-platform-id to a different number. I think thats the only problem right now and thats why the screen is distorted? I feel like an idiot right now for not knowing how to fix this.

Ah 🙂
In the section “Setting AAPL,ig-platform-id”, I listed 3 ways of adding the AAPL,ig-platform-id device property. One of the ways is to modify the bootloader to do it. The bootloader I posted does just that. By default, it sets it to 01660000 (96MB, 4 ports, etc).

Thinking that I was already plugged into the HDMI I decided to try all the video ports in the back and success, I have full acceleration! I can’t believe it was all from not being plugged into the right video port. Thanks for your help!

In that case, you might consider playing with the ID number (maybe 01660001?) to see if you can get the combination of enabled ports you like. Maybe binary-editing some table inside the driver to individually control the ports might be needed if it doesn’t work… (like what’s sometimes done with HD3000)

ok, thanks for this and it was your modified chameleon boot loader installer that really did the work. Whats the easiest way to find where this ID number is so I can play around with the different numbers?

I added yet another parameter to the bootloader. Passing HD4000PlatformId=[0 through 11] changes which value it sets AAPL,ig-platform-id to (HD4000PlatformId=0, for 0x01660000 is the default). You can type this at the boot prompt, or as an entry in org.chameleon.Boot.plist.

ioreg -l -p IODeviceTree will tell you what the property is set to (see “Results”), so you can check if it got set as you wanted.

Henry, the chameleon boot loader is perfect now and both DVI and HDMI working great here! I wasn’t using the computer that much the last few days but today I finally reinstalled your newly modified boot loader and its just awesome. I think your the first person so far to do this. THANKS AGAIN!!!

If its hard to explain then don’t worry about it. I know that very soon Chameleon will be updated with these settings and it will just take a click of the mouse to install the Intel HD 4000. I’m just very happy that its working here now and HDMI to DVI doesn’t bother me as long as its working so I’m completely ok with it! Thanks to you its working!

Thanks so much for the amazing guide!
I’m on an ASRock H77m-itx and using the patched Chimera bootloader provided above. I got the kernal panic mentioned with the bios not being set to 96MB, and of course my BIOS was set to “auto”. I have no bios option to change select 96, just 32, 64, and 128, so I tried 64 and booted with flag HD4000PlateformId=8. No kernal panic, and in my plist I also have the resolution set at 1920x1280x32 (which makes it look so nice), but for some reason the cursor isn’t there. I can open files, and select options, but only by guessing where the cursor is – very weird problem. Any suggestions? Thanks!

Ok so I tried HD4000PlatformId=9 instead and now I have a cursor. Doesn’t seem that QE/CI is working though (solid grey menu bar). Is there another way I check to confirm this, and if it’s not working what else should I try? Thanks

I would check these:
– About This Mac says video memory is ~512 MB (shows that the driver is loaded)
– If not, check ioreg -l for AAPL,ig-platform-id being set (If you’re using a device-properties string, it conflicts with GraphicsEnabler and only the device-properties string is used)
– Check that it didn’t boot up in “safe mode”

I’ve seen a (almost-)missing cursor once when I set BIOS to 64M using a 96M configuration… I can’t say I can be much help here… Good luck!

Not sure at all what you mean with the ioreg -l thing. device-properties string? I’m using the modified chimera bootloader posted above and I’ve tried using a combo of different things (64MB with 8, or 9, now 32 with 5) [I’m running a i5-3570k if that makes any difference], and I’m not booting with safe mode.

It seems mostly as long as the bios memory matches the right HD4000PlatformId I get a cursor, but still never QE/CI.

Side note: sometimes in the about this mac it shows the mac mini picture, and sometimes just what looks like an Apple Display. With both though it shows in system report as a mac mini (although I believe you said smbios shouldn’t matter)

Running ioreg -l -p IODeviceTree gives a list of devices and their properties. The ideas is to verify that GraphicsEnabler actually inserted the device property, so you should see AAPL,ig-platform-id being set for the graphics device (named GFX0, IGPU, or something else).

If you happen to also use a “device-properties” string in org.chameleon.Boot.plist (for other hardware, perhaps), it overrides the device property set by GraphicsEnabler. As long as you see AAPL,ig-platform-id in ioreg, that’s all the patched bootloader does…

I don’t have any more ideas… maybe the kernel logs might have some clues (perhaps boot with -v).

Hi, I received my new GA-Z77-DS3H(F13) together with a i5-3570k CPU recently, and I tried to use the HD4000 too, without success. Is it possible that you provide me with your dsdt file and extra folder? That would be absolutely great for me as beginner!

I seem to be the only person on the planet with the following problem:

i can get the driver loaded, but the screen goes blank. as in off. like its out of range or asleep or something. it does it in safe mode too, but only when the id is injected, and it doesnt matter which one, it always seems to do it. It’s the AppleIntelFrameBufferCapri.kext thats doing it. i can delete HD4000.kext and the same thing still happens.

if i connect via screen sharing, i can see that the menu bar is transparent, and the system is running fine, at the correct resolution. it reports as being connected via displayport, which is correct.

looking through the verbose startup, i see that HD4000 fails due to dependancies on IOGraphicsFamily, and that it couldn’t alloc class Gen7Accellerator. i dont know if this is related, like i sai, if i remove the kext, the same thing happens. how does one diagnose a dependancy failure?

i’ve tried switchrex and tried dropped the resolution, which doesnt fix it, everything looks okay, so i’m stumped as to whats going on and why, and it seems that no-one around is able or willing to try, i dont blame them i guess.

but i could really do with some sample DSDT and IOREG files to try and work out whats going on.

I don’t use a custom DSDT (I use a GA-Z77M-D3H). I’m using the DVI port using 01660000. Have you tried all the different values of AAPL,ig-platform-id to see if it’s just an issue with which displays are enabled?

thanks for the ioreg, i tried to open it in that ioreg viewer but it says its corrupt, so i’m trying to work out the text.

i’ve tried every single plaltform id. on id9 i get 3 framebuffers, no display detected. on 5 i get 3 framebuffers and my display detected on @2. on another id, i cant remember which, might be 0, or 3, i get 4 framebuffers and the display is detected on @3.

the only one that seems to show up is 0, 3 and 5 by the looks of things, maybe 8. suffice to say NONE of them fix the actual issue.

even weirder, is that if i put the pc to sleep, then wake it up when i press the input button to switch form pc to hdmi input, just for a fraction of a second i get to see the mac display!

as i turn the input button on and off, i can see ioreg terminating the display and adding a new one again (red and green) but in each case the screen itself is off, no backlight.

i was thinking it may be some backlight issue where it needs a backlight driver but is getting a non-backlight one. however when i installed windows 8 on the pc, the software brightness controls show as unavailable. so iguess its not that. there is a hardware brightness/backlight on/of button, but it doesnt make any difference when the mac framebuffer is loaded.

another interesting thing, is on windows 8 it says secondary display, when i switch to that, the display goes off, and it goes to the VGA output on the back.

if i plug a VGA monitor into this, while the display is blank on the mac side of things, it is trying to output to the VGA and its garbed. so it looks like its outputting the desktop to the wrong framebuffer? i was looking for a utilty to swap screens, but since VGA isnt supported, this doesnt seem to show up either.

i really dont want to give up on this, its a very nice all-in-one chassis i have, and on paper it should be vanilla compatible.

i notice on sandy bridge framebuffer you can edit the outputs, i guess this type of hack isnt known yet on the HD4000 side of things.

a utilty to cycle output between framebuffers would be useful, if anyone knows of such a thing.

Came to this party a bit late, but I also had a hell of a time getting HD4000 graphics to run. The newer version of Chameleon and the patched version listed here wouldn’t work for me so I looked through the forum Henry linked on how to do this using the device strings in /Extra/org.chameleon.Boot.plist and figured out how the gfxutil stuff worked.

Long story short, if you need to fix this and Henry’s solution doesn’t work you can try adding this to your /Extra/org.chameleon.Boot.plist after setting your video memory to 32MB.

Hmm… were you already using a device-properties string for some other hardware? “Graphics Enabler” and device-properties are mutually exclusive: The bootloader builds a device-properties string at runtime, but then uses the one in org.chameleon.Boot.plist instead, if it exists.

On most laptops it is not possible to manually set the video RAM for Intel HD Graphics. Both laptops I have it is not possible to change this setting in the BIOS, it is luck of the draw that my first laptop has 64MB set by the manufacturer and has full QE/CI. On the second however, it is set at 128MB and none of the above device strings list that high an amount. So I can never get the second laptop to run Mountain Lion :(. On my desktop, it is entirely possible and works with ML beautifully…

Is there a way around this? my laptop doesn’t have an option to set the video RAM. I don’t know exactly how much was set by the manufacturer by default, but I’m guessing it’s 128, since I can’t seem to be able to get it to work.

FYI, regarding the VGA port not being available, this is NOT true. I have my VGA, HDMI, and internal laptop display all working simultaneously right now. I have a modified DSDT and AppleCapriFrameBuffer.kext. The VGA must be connected during start up, and a lot of times the laptop will not recognize if the VGA is “hot”-unplugged. HDMI switching seems fine.

my system has two display outputs, internal displayport and external VGA.

the system detects the displays and allocates the display pipe, but its using the wrong pipe.

i was able to test this by hacking the VGA enabled and running that by itself, which resulted in garbled display in the built in screen, the OS reports the VGA monitor details, but that’s not where it sends the picture.
right now port 04 06 uses AAPL,DisplayPipe 00 00 00 00, but it should use AAPL,DisplayPipe 01 00 00 00, and vice versa for 06 02.
unfortunately, I don’t (yet!) know how to change this, but that’s the problem, and that should solve it.

anyone got any pointers in how to change the AAPL,DisplayPipe property, or re-allocate the pipe numbers? are they done in BIOS?

I don’t know, I suppose you could try all of them and see which works.

From your motherboard manual, it looks like the reserved graphics memory size isn’t configurable. The BIOS setting (“Allows you to select the amount of system memory allocated to DVMT 5.0 used by the iGPU.”) seems to set the DVMT memory size, rather than the reserved size…(?)