m_star

Q: HD4000 graphics problems when using a very big external screen

Hello,

 

 

I just got a new LG 34UM95 (3440x1440) which can get connected via Thunderbolt or DVI. Screen detection and activation is working fine.

However the screen is corrupted when moving the mouse or activating the dock animation or scrolling a window, ...

 

Scenario:

- MacBook Pro Mid 2012 (Intel HD4000),

- MacOS X 10.9.3

- really big external display (3440x1440) connected via Thunderbolt or DVI

- both displays (integrated end external display) active at same time

 

Problem:

- graphic errors (framebuffer corruptions) on both screens ==> it looks like the framebuffer memory size or some DMA transfer addresses are miscalculated

 

- when scaling down the external resolution to something smaller (e.g. 2560x1080) everything is working fine

- when closing the MacBook and using the external display only the big screen works flawlessly

 

 

==> Could you please have a look at this and fix the framebuffer corruption?

==> This might also be a race condition where the HD4000 driver accesses RAM which it should not have access to and could lead to an security attack.

 

 

Thanks,

 

Maik

MacBook Pro, OS X Mavericks (10.9.3)

Posted on May 19, 2014 2:46 AM

Close

Q: HD4000 graphics problems when using a very big external screen

  • All replies
  • Helpful answers

Page 1 of 3 last Next
  • by m_star,

    m_star m_star May 19, 2014 3:42 AM in response to m_star
    Level 1 (1 points)
    May 19, 2014 3:42 AM in response to m_star

    Just checked it on a brand new MBP 13" non retina OS X 10.9.3 (also with Intel HD4000) with exact same results.

     

    ==> So it really looks like a software issue in the HD4000 framebuffer driver.

  • by m_star,

    m_star m_star May 19, 2014 5:37 AM in response to m_star
    Level 1 (1 points)
    May 19, 2014 5:37 AM in response to m_star

    Just managed to capture a screen shot (CMD+SHIFT+3). You can see some patches from second screen inserted into first screen. It looks like the framebuffer (and it's backbuffers) exceeding the limit the programer was expecting. The mouse cursor buffer and the patch buffer are located inside the framebuffer.

     

    ==> looks like the HD4000 driver needs to reserve more Framebuffer memory during bootup since it might happen that an (HUGE) external monitor is attached later.

      

    screenshot.jpg

     

    Please have a look into this.

     

     

    Thanks,

     

    Maik

  • by m_star,Helpful

    m_star m_star May 20, 2014 5:07 AM in response to m_star
    Level 1 (1 points)
    May 20, 2014 5:07 AM in response to m_star

    Update:

     

    Since I could not wait to get this working I changed the framebuffer size myself. With the inspiration and knowledge from the blog post of "Pike's Universum: AppleIntelFramebufferAzul.kext" I was able to indetify the framebuffer setting inside of "AppleIntelFramebufferCapri.kext" which is responsible for the Intel HD4000 framebuffer management.

     

    A verbose boot with full debug output for this kext enabled showed that my MacBook 13" Mid 2012 is using HD4000 setup with sub-id 3 (Pipe:2, Ports: 2, NumFramebuf: 4, StolenMemorySize: 64MB, FramebufferMemorySize: 16MB, FBMemoryCount:2)

    ... of course 16MB framebuffer is not enough to drive the 3440x1440 display

     

    Inside of the kext is a binary encoded list with settings for this parameters based on the sub-id:

     

    ...

    03 00 66 01   ( 0x01660003 ==> Intel HD4000, sub-id: 03 )

    01 02 04 02   ( Ports/Pipes/NumFrameBuf )

    00 00 00 04   ( 0x04000000 ==> 64MB - StolenMemorySize - must match EFI setup ==> don't touch)

    00 00 00 01   ( 0x01000000 ==> 16MB - FramebufferMemory Size !!!!! HERE IS THE MAGIC VALUE !!!! )

    00 00 00 40   ( 0x40000000 ==> 1GB - VRAM Size ==> important for 3D stuff only ==> don't touch)

    ...

     

    After a lot of trial and error I found a working FramebufferMemory Size for my configuration: 20 MB works nice.

     

    After changing:

    "03 00 66 01 01 02 04 02 00 00 00 04 00 00 00 01"

    to

    "03 00 66 01 01 02 04 02 00 00 00 04 00 00 40 01"

     

    and installing the kext + refreshing the cache (don't forget this!) I have a working system with both displays active.

     

    NOTE: ALWAYS USE A SECOND SYSTEM WHICH YOU BOOT FROM EXTERNAL DRIVE WHEN MAKING CHANGES TO THE VIDEO DRIVER. IN CASE YOU MESS SOMETHING UP YOU STILL CAN BOOT YOUR ORIGINAL OS.

  • by Snow User,

    Snow User Snow User Aug 4, 2014 9:06 AM in response to m_star
    Level 1 (0 points)
    Aug 4, 2014 9:06 AM in response to m_star

    Fascinated to find your posts m_star.

    Thank you for elaborating on how you achieved success.

     

    I have a 2012 13" Retina MacBook Pro with the HD4000.

    I am planning to buy the same LG Display when I get back home (have a few more months on the road) and I have been worried about getting that display to work with my 'not the latest' MacBook.

     

    I hope I can figure out how to do what you describe, for I am truly eager to use the 34UM95.

     

    Maybe it is too soon to ask this question of anyone because I don't possess the display yet and since I am not able to work on the problem at the moment because of traveling...

    However, if there is a quick answer to this question and if you have time to give me some additional hope with a response...

    How does someone go about finding the "AppleIntelFramebufferCapri.kext", change it to the numbers you have had success with, and then refresh the cache?

     

    ==> Is this a file I can easily find and edit in a text editor and then drop in a folder to copy over the previous file?

    ==> Is there a command line entry to refresh the cache? (not that I really know anything about command line entries either)

     

    These are all things admittedly a bit over my head as I am not a programmer (designer and writer), but I am competent at following directions and I have been known to dig deep and successfully into various technical and computer challenges in life when I have good guideposts.

     

    Thank you again for putting this info up.
    It was a true joy to find.

  • by gilmorej,

    gilmorej gilmorej Sep 9, 2014 7:22 PM in response to Snow User
    Level 1 (0 points)
    Sep 9, 2014 7:22 PM in response to Snow User

    I was able to use m_star's suggestion to fix this issue with my 2012 13" MBP. This is what I did to get it fixed:

    (1) Get KextBeast

    (2) Get a Hex editor like Hex Fiend

    (3) Using terminal copy AppleIntelFramebufferCapri.kext to the desktop (cp -r ./System/Library/Extensions/AppleIntelFramebufferCapri.kext ~/Desktop/)

    (4) Open ~/Desktop/AppleIntelFramebufferCapri.kext/Contents/MacOS/AppleIntelFramebufferC apri with the Hex Editor

    (5) Search for "03 00 66 01 01 02 04 02 00 00 00 04 00 00 00 01", so you know what to change

    (6) Replace this sequence with "03 00 66 01 01 02 04 02 00 00 00 04 00 00 40 01", which is basically just the second last group

    (7) Save the file and close the hex editor

    (8) Run KextBeast which will install this kext to where it needs to go

    (9) Reboot

  • by yufeng66,

    yufeng66 yufeng66 Oct 17, 2014 5:14 AM in response to m_star
    Level 1 (0 points)
    Oct 17, 2014 5:14 AM in response to m_star

    m_star,

     

    did you upgrade to yosemite? I don't have the 3440x1440 resolution available under yosemite. I guess if you can figure out the frame buffer issue, you can probably figure out the resolution issue too.

  • by bjoern.s,

    bjoern.s bjoern.s Oct 17, 2014 6:29 AM in response to yufeng66
    Level 1 (0 points)
    Oct 17, 2014 6:29 AM in response to yufeng66

    I have a Mac Mini with the Intel HD 4000 and since the Yosemite update I dont have the resolution 3440 x 1440 anymore either. I would also appreciate if someone could check this as I have to work with 2560 x 1080 right now .

  • by m_super_star,

    m_super_star m_super_star Oct 17, 2014 10:02 AM in response to m_star
    Level 1 (0 points)
    Oct 17, 2014 10:02 AM in response to m_star

    GOOOOOD NEWS (temporary quick fix)

     

    I managed to install the OLD patched kext from Mac OS 10.9 and got it working (after disabling the kext signature check !!!)

     

    1) open terminal and type:

     

    sudo nvram boot-args=kext-dev-mode=1

     

    2) install the OLD patched kext from MAC OS 10.9 and recreate the kext cache as described by gilmorej (see above)

     

    3) reboot

     

    4) open monitor settings and select the desired (full) resolution

     

    5) enjoy

     

     

    Maik

  • by Kobe Beef,

    Kobe Beef Kobe Beef Oct 17, 2014 2:02 PM in response to m_super_star
    Level 1 (0 points)
    Oct 17, 2014 2:02 PM in response to m_super_star

    Any chance you'd like to post your kext file?

     

    (to save us all from hacking away at it?)

     

    PS: I too am suffering from OS X 10.10 (Yosemite) downgrading my HD4000 so that my LG 34UM95-P is useless.

  • by fboesch,

    fboesch fboesch Oct 18, 2014 4:53 AM in response to m_super_star
    Level 1 (5 points)
    Oct 18, 2014 4:53 AM in response to m_super_star

    I confirming that using "old" Maverick HD4000 Drivers (kext, bundles) on Yosemite works. 3440x1440 resolution on Yosemite (on MacMini 2012) is choosable again and 34UM95 will also use this resolution. However the "scrambled" lower part issue is now there.

     

    After using instructions above I still have the scrambled lower part, however: just 3440x1440 resolution is active....will try to restore drivers...if meanwhile somebody has a full set - of working & patched drivers to be applied with kext utility or kextbeast - that would be marvelous....

  • by Josh Pike,

    Josh Pike Josh Pike Oct 18, 2014 6:20 AM in response to m_super_star
    Level 1 (146 points)
    Oct 18, 2014 6:20 AM in response to m_super_star

    This worked for me as well.  Disabled kext check, pulled in the 10.9 version of the AppleIntelFramebufferCapri.kext, edited it as per gilmorej, rebooted and it worked!  I actually didn't even have to hold option to see the 3440x1440 resolution as an option.  It was just there.

  • by WildBlue2030,

    WildBlue2030 WildBlue2030 Oct 18, 2014 11:40 PM in response to m_star
    Level 1 (0 points)
    Oct 18, 2014 11:40 PM in response to m_star

    Simpler solution to regain 3440 x 1440 resolution: Go to your Time Capsule backup and restore an earlier version of AppleIntelFramebufferCapri.kext (before upgrading to Yosemite). This worked like a charm for me, restoring full 3440 x 1440 resolution.

     

    Obviously this only works if you are using Time Capsule backups.

     

    If you are using Time Capsule, follow these steps:

    1. From the Finder, select Go > Go to folder...  and enter "/System/Library/Extensions/".  This will get you in the right file location.

    2. Right-click the Time Capsule icon in the menu bar (it looks like a clock with a counter-clockwise arrow), and select Enter Time Machine.

    3. Use the up-arrow, or click on one of the stacked windows, to select an backup from a time prior to your Yosemite upgrade.

    4. Give it a few seconds to load the Extensions folder files, and select AppleIntelFramebufferCapri.kext.

    5. Click Restore and follow the prompts to enter your password.

    6. Restart the computer.

    7. Go to System Preferences > Displays

    8. Select the radio button for Scaled, and you should see the 3440 x 1440 option.

     

    Thank you to m_star and gilmorej for identifying that the culprit is the frame buffer, and that AppleIntelFramebufferCapri.kext was the offending file.

     

    I tried following your instructions, and changed ...01... to ...40..., etc., but that didn't work for me. Not sure why. Then I remembered Time Capsule. Restoring the Mavericks version of AppleIntelFramebufferCapri.kext  from Time Capsule, and restarting, immediately fixed the problem.

     

    For reference: I am running a late 2012 Mac Mini connected to an LG 34UM95-P display via thunderbolt cable. When I first connected the LG to the Mini running Mavericks, I had the screen tearing issue that m_star identified with the screen shot. But that problem fixed itself after a restart. The Mac Mini has never been able to drive the LG at 60hz, but it is fine at 50hz. After upgrading to Yosemite, I had the exact problem that yufeng66 and bjoern.s describe, where the 3440 x 1440 option disappeared, leaving a max resoultion of 2560 x 1080 after upgrading to Yosemite.

  • by satinfo,

    satinfo satinfo Oct 19, 2014 2:32 AM in response to WildBlue2030
    Level 1 (0 points)
    Oct 19, 2014 2:32 AM in response to WildBlue2030

    Could you just add a patched kext here for other users that have same problems

  • by yufeng66,

    yufeng66 yufeng66 Oct 20, 2014 8:16 AM in response to Josh Pike
    Level 1 (0 points)
    Oct 20, 2014 8:16 AM in response to Josh Pike

    The maverick version of the AppleIntelFramebufferCapri.kext worked for me as well. Now I have  3440x1440 working on my mid 2012 Macbook Air.


    The screen still got corrupted some times, even with the patched version. It happens most after I boot up the computer with lid closed but opened it later. It works find as long as keep the lid closed. Also if I boot up the computer with the lid open, it seems to work most of the time too.


Page 1 of 3 last Next