HD4000 driver hack for custom VRAM size

Discussion in 'OS X Mountain Lion (10.8)' started by kpkp, Apr 21, 2013.

  1. kpkp, Apr 21, 2013
    Last edited: Jun 30, 2013

    macrumors member

    I found a way to choose how much of VRAM you want your HD4000 to use under ML:
    I also made a script if you want to try it:
    sudo perl -pi -e 's|\x00.{1}\x10\x07\x00\x00\x10\x07|\x00\x[COLOR="Red"]??[/COLOR]\x10\x07\x00\x00\x10\x07|g' ~/Desktop/AppleIntelFramebufferCapri.kext/Contents/MacOS/AppleIntelFramebufferCapri
    Change the red ?? with the red number bellow to set the desired amount of VRAM:
    10 = 256MB of RAM
    18 = 384MB of RAM
    20 = 512MB of RAM
    30 = 768MB of RAM
    40 = 1024MB of RAM
    80 = 2048MB of RAM

    1. copy AppleIntelFramebufferCapri.kext to the desktop and make a backup of it
    2. run the script in the terminal (dont forget to fill in the ??)
    3. install the kext, rebuild caches (i would suggest kext wizard)
    4. restart pray and let me know how it went

    Disclaimer: this was not yet tested on a real mac (just a few hacks), so if you want to be the first to try, here is all the info you need.
  2. macrumors regular

    With a grand total of four posts, you seriously can't expect someone to just try this without verification...
  3. kpkp, Apr 22, 2013
    Last edited: Apr 22, 2013

    macrumors member

    Digg in if you are to scared of changing 1 number in your graphic driver... But yes, if you don't know how to recover your Mac from a missing or bad graphic driver, then I guess you should just wait for someone who does... Be sure I would not be asking here if i had a Ivy Mac at hand.

    I just posted here in hope there is someone willing to try it, even from a backup partition or something, I tried all the VRAMs mentioned above on my hack and that is all i can do for now... from here on is up to you.
  4. macrumors 6502

    Just tried it on my rMBP 15" and upped my HD4000 VRAM from 512 MB to 1024 MB (at least that's what System Info shows).

    Thanks for the tip!
  5. macrumors 601

    Michael Goff

    And the performance on your system changed in what way?

    It might be nice to throw more RAM at my graphics. My MBA has 8GB of RAM, this would be a good use.
  6. macrumors member

    Thx for the feedback, yes i was also looking for a effective way of testing it, I checked in IORegistryExplorer under IGPU-IntelAccelerator-PerformenceStatisticsAccum you can see the ram allocation and if you check the "Wired" ram in Activity Monitor it increases also... And photoshop recognises the higher available VRAM too... All positive signs so far, but if someone has a better method to suggest...
  7. macrumors newbie

    Works on my Mid 2012 13in Macbook Pro also. Have only tested the game Civ 5 and I can't say it helped. Certainly didn't hurt though either. Wonder if upping to 2 or 3 megs of VRam would be possible and help. Thanks for the hack. I'll have to try it on my other laptop thats a hackinosh.
  8. macrumors 68020

    Does anyone here know what the HD4000 does with more RAM? Is there a limit to the amount of RAM that it might usefully use? What is the advantage of more RAM, other than "more is better"?
  9. macrumors member

    If you do not know why you need it is most likely you do not... The most obvious answers in video and advanced photo editing, games.... And this flexibility makes it a bit more future proof.
  10. benwiggy, Apr 22, 2013
    Last edited: Apr 22, 2013

    macrumors 68020

    What, obviously, does more RAM do for video, advanced photo editing, games?
    What flexibility does it bring? I say again: what does the HD4000 do with more RAM?

    Does it make it faster? Does it mean it can handle more polygons? What? If you gave the HD4000 4 GIGAbytes of RAM, or 8, -- would it match a discrete GPU in some regard? Or not?
    Is there no limit to the amount of RAM that the GPU can effectively use?

    Or put it another way: if the GPU has LESS RAM, what feature of the GPU is inhibited by that? (Don't just say "speed" -- why is it slower?)

    If you don't know what it actually achieves, then why are you doing this?
  11. macrumors 601

    Michael Goff

    Stupid question... where is the AppleIntelFramebufferCapri.kext?


    I generally don't try to touch the internal files, so I have no idea where they'd be.
  12. macrumors member

    What the HD4000 does with Vram is no different from what other GPUs would, it all depends on software. Now a practical example, you load a huge NASA image in photoshop if you have enough VRAM you scrolling, zooming... will work smoothly if you run out of VRAM things will slow down.

    And if you want to know why i do that... Is just a side product of me making my notebook work with OSX, so if you or someone else can benefit from that cool, otherwise was still fun. And as i said, i am not selling this to you, with your attitude i would actuality prefer you wouldn't use it, because if i have to tell you all this you do not need it.
  13. macrumors newbie

    Would this work on HD3000 too?
  14. macrumors member

    No, different driver.
  15. benwiggy, Apr 22, 2013
    Last edited: Apr 22, 2013

    macrumors 68020

    There is no attitude, I'm just asking for some technical information. I assumed that if you were dabbling at this level, you would know a lot about it.
    What sort of usage brings a need for more than 768Mb of RAM? What size image from NASA fills up that amount of memory -- a 768Mb image?

    Is the limited frame rate in the latest game a direct result of not enough memory, or of not enough processing power in the GPU itself?

    Is there a limit to amount of RAM that the GPU can effectively use? While too little RAM may impede performance, I'm wondering if you are sure that more RAM will always produce improved performance.

    Just idly curious. I'm sure the data is out there somewhere.
  16. macrumors member

    Not everyone has 768MB, I had just 384MB and yes using photoshop and some NASA images it used up to 450MB (after mod). I don't play games and if I would it wouldn't be on a notebook with a hd4000.

    I am not sure of anything, that's why I share what I know so people can help me test it...
  17. macrumors newbie

    Ok, thanks. I run two screens and parallels on my mini with HD3000 and I have all kinds of problems. Skippy mouse pointer, crashes, flickering when using certain tools in photoshop.

    Any suggestions?

  18. macrumors 6502


  19. macrumors 601

    Michael Goff

  20. macrumors member

    Paste to terminal:
    sudo cp -r /System/Library/Extensions/AppleIntelFramebufferCapri.kext ~/Desktop/
  21. macrumors 6502


    That's odd, there should be like 200 files. But I see you have a MBA - careful with that, this hack doesn't seem to work on mine: This is how it messed up my system (see attached), I'm glad I backed that kext up...

    Attached Files:

  22. macrumors member

    Are you sure you patched it right?
    Idk how are the rules on this forum but i would like to see you patched kext, PM me if attaching a kext is against the rules or something.
  23. macrumors 6502


    This is what I did:

    1) Copied the kext over to the desktop
    2) Pasted your script into Terminal and replaced ?? with 40
    3) Executed the command
    4) Moved the patched kext to /System/Library/Extensions
    5) Used KextWizard to rebuild the cache (and repair disk permissions, just for good measure)
    6) Rebooted

    It took longer to boot and the temperature of colours changed. Now they're a bit cooler, IMHO, and changing a display profile won't change a thing. Take a look at my modified kext to see if it was me who messed up, or if it just doesn't work with Airs. Thanks

    Attached Files:

  24. macrumors 601

    Michael Goff

    Do you have to check/uncheck something to see all the files or is it just a curious case of me not being able to do it?
  25. macrumors 6502a

    Why bother at all?

    The HD4000 uses system RAM as VRAM. Having the kernel extension reserve more RAM for the GPU isn't going to magically give your computer new capabilities. In fact, the more RAM you reserve for the HD4000, the more slower your system is going to become when that RAM is fully utilized.

    The only thing I can think of where this might be useful is if you're running some sort of 3D package that requires more VRAM (and refuses to run otherwise), but even with this hack- if it did run afterwards, it would still be unbearably slow.

    Real VRAM exists for a reason. The HD4000 has none. Apple didn't lock this down "just because they can". A decision was made, and that decision was that the default setting was enough given the fact that the GPU is integrated. If you need more computational resources then that, you'll have to buy a bigger computer.


Share This Page