Hacking the Intel HD Graphics frame buffer kext…

There is one thing that I’d like to see fixed, and soon, and that is the problem with the Intel HD Graphics hanging when it sleeps/wakes up.

I had looked at it months ago already, and quickly identified the problematic kext – AppleIntelSKLGraphicsFramebuffer.kext – and yesterday evening I used a good 30 minutes to nop/0x90 out some parts in the binary and the hang is gone.

Not only can I wake it up, but now I can also connect to it with screen-sharing/remote desktop. The latter did not work. Not without the modified bits, so this is good news. This also confirms that I am looking at the right spots.

The crappy part of the good news is that I have to find a good solution, one that works, and I think to have a good idea. Thanks to a not so good night of sleep – I probably kept working on it some time when I tried to sleep, because I woke up with a lightbulb moment. Yeah. Good news. New ideas!

Keep you posted😉

19 thoughts on “Hacking the Intel HD Graphics frame buffer kext…

  1. Good news.

    I use the mac-pixel-clock-patch-V2 to have the Full 4k Resolution on my external Display connectet to the DockingStation my HP 840G3 Skylake Notebook.

    My Problems at cold Start the external Display and internal Display needs 5-10 Min to reorganize (flicker as connect – disconnect)
    After this the Displays work fine.

    My next Problem. Sleep only don’t work with connect USB Device and the Notebook reboot after shutdown.

    Without connected USB Device ( USB Hub or Stick) everything works fine.

    System 10.11.6

    The allocation of all USB Port are right and fine.

  2. Do you think the sleep/wake issues with AMD graphics could be caused by a similar “bug”? At least the symptoms are quite similar…

    I’d gladly help testing anything, and I’m not afraid of using a disassembler or a hex editor either.

  3. Hi Piker, any news?
    Sitting here, with exactly same problem🙂
    Everything else work fine, (h170, i5-6600, hd530)

    My Hack sleeps fine, but the sleep LED doesn’t blink, if I press a key to wake up the system (or the button), the system tries to wake, it takes 10 seconds, and turns completely off.

    Everything else with HD530 (thanks to your GFXtyle etc…) works perfect here.

    Just sitting and waiting till you refresh this blogpost🙂

  4. Piker?
    Can you dig a little bit in multi display support for HD530?
    I mean at boot time, without the need of replug after login…

    Does AAPL,boot-display make any sense in HD530, or is this only needed for Dual-Graphic/Nvidia cards?

    Cheers🙂

    • Did you modify the frame buffer data? This is the data for the 0x19120000:


      0000 0105 0900 0004 0000 8701
      0000 0204 0a00 0004 0000 8701
      0000 0306 0a00 0004 0000 8701

      Two of them are fixed to 0a00 for the pipe/port and 8701 for the connection, which is not going to work.

      • Thanks Piker🙂

        I write down, the 2 options i’ve tryed:

        Original unmodified Framebuffer:
        1219 0000 0000 63F9 0700 0000
        0000 0103 0303 0000 2002 0000
        5001 0000 0060 6C05 0000 6C05
        0000 0000 0000 0000
        0000 FF00 0000 0100 0000 2000 (Internal Display)
        0000 0105 0900 0004 0000 8701 (DP)
        0000 0204 0A00 0004 0000 8701 (DP)
        0000 0306 0A00 0004 0000 8701 (DP)

        First option i’ve tryed:
        1219 0000 0000 63F9 0700 0000
        0000 0103 0303 0000 2002 0000
        5001 0000 0060 6C05 0000 6C05
        0000 0000 0000 0000
        0000 0306 0A00 0008 0000 8701 (Changed to HDMI)
        0000 0105 0900 0004 0000 8701 (DP)
        0000 0204 0A00 0004 0000 8701 (DP)
        0000 0306 0A00 0004 0000 8701 (DP) (Still here, but i think it's not used)

        Second option i’ve tryed:
        1219 0000 0000 63F9 0700 0000
        0000 0103 0403 0000 2002 0000 (Changed to 4 Framebuffers)
        5001 0000 0060 6C05 0000 6C05
        0000 0000 0000 0000
        0000 FF00 0000 0100 0000 2000 (Internal Display)
        0000 0105 0900 0004 0000 8701 (DP)
        0000 0204 0A00 0004 0000 8701 (DP)
        0000 0306 0A00 0008 0000 8701 (Changed to HDMI)

        My Hack has no Internal Display…
        Only 2 DP and 1 HDMI…

        Can post an example with what you mean with fixed pipe/port and connection?
        Sry for beeing stupid, but i don’t get what you mean🙂

        At the moment of now, i’ve thinked that HD530 cant boot with 2 Displays connected…

        Thanks Piker again for your great help🙂
        Cheers🙂

      • Ive posted something before but it isnt applyed here:-)

        Ok, i don’t got how to calculate pipe and connector…

        The other values i know from your previous posts about the framebuffer…

        0000 0204 0a00 0004 0000 8701
        0204 = framebuffer 2 / port 4
        0a00 = pipe (i dont understand)
        0004 = displayport
        0000 =??
        8701 = connector (i dont understand too)

        The only thing I have done before is changing 0004 to 8 for hdmi…

        So im sorry for beeing stupid xD

  5. Hi Pike. This work you are doing on the intel HD Graphics, would it throw any insights into using nvidia dGPUs where Optimus is enabled?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s