Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Reply
39 replies

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.

User uploaded file


Please have a look into this.



Thanks,


Maik

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.

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.

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

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

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....

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.

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.

Oct 20, 2014 10:58 AM in response to m_star

Related question: My Mac Mini is connected via Thunderbolt cable to the LG 34UM95-P. It is having repeated "failure to wake from sleep" errors requiring a hard reboot of the Mini (hold down power button for +/- 8 seconds to shut down, then power back on). Still need to do some testing to be sure, but I don't seem to have this problem when it is connected via HDMI cable. Anybody else having this issue?


More info: I had the Mini connected via Thunderbolt to the LG under Mavericks, and it was having this wake-from-sleep failure. I swapping to the HDMI cable and that seemed to fix the issue, but I can't be sure since I only had it set up that way for a short time before upgrading to Yosemite. After switching to Yosemite, I had the issue with 3440 x 1440 resolution not being available (see earlier post) and I tried swapping back to the Thunderbolt cable to fix the problem. Swapping cables wasn't a fix for the resolution issue, but after resolving the resolution issue (see above for the fix that did work, i.e. restoring the AppleIntelFramebufferCapri.kext file from Mavericks) I left left the Thunderbolt cable connected, and the wake-from-sleep failures recurred. I just swapped back to HDMI cable to see if that fixes it. Stay tuned...

HD4000 graphics problems when using a very big external screen

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.