Force RGB mode in Mac OS X to fix the picture quality of an external monitor

I recently bought a MacBook Pro (with ‘Retina’ screen), but when I hooked it up to my Dell U2410 monitor via HDMI cable I was shocked by the poor picture quality. The contrast was all wrong and text was misshapen. No amount of calibration in the monitor or software would fix it.

Short answer: OS X thinks my monitor is a TV, and is using the YCbCr colour space rather than RGB. I had to override an EDID setting to force the RGB colour space, and it is now working correctly.

Long answer: I haven’t owned a Mac for a while and had forgotten how difficult much of the “Apple community” can be when it comes to anything that can’t be adjusted in System Preferences. Googling for problems with external monitors on MacBooks found dozens of threads on official and unofficial Apple forums, all full of people with the same problem. The most common response was to blame the monitor, despite assurances from the stricken users that the monitor worked beautifully in Linux and Windows, even on the same machine under Boot Camp.

“You just haven’t calibrated it!”, “You are just too used to Retina now!”, “You just need to buy a Thunderbolt display!” Apple people also like to solve problems by throwing more money at it. (I realise that owning a Mac makes me an Apple person, too. Hypocritical self-loather?)

My lucky break was reading that the current colour space was “YCbCr” when I was browsing the monitor’s settings menu. I was sure that it was using RGB when hooked up to my PC, so I started searching instead for forcing RGB mode in OS X. It didn’t appear to be available out-of-the-box, but I have had some experience in overriding EDID settings for similar purposes so I searched instead for that.

I found this thread on the EmbDev.net forums. Mr Schwarz, thanks very much. Your thread and script was incredibly helpful and informative. It was written to fix problems connecting an external monitor via DisplayPort, but it fixed my HDMI issue just the same. I’ve summarised the required steps below.

My last word is to wonder what Apple is playing at. It seems that this problem has been reported by a lot of people for a long time, and I expect it would require a fairly simple software update. Do they just not care about those using third-party components, or are they actively attempting to force people on to Thunderbolt displays?

How to force RGB in Mac OS X

These steps have been updated for Mac OS version 10.11, “El Capitan”. See below for differences for previous versions of the system.

  1. Download the patch-edid.rb script from the forums thread above, or download Andrew Daugherity’s improved patch-edid.rb script from his github page. Put the script in your home directory.
  2. Disable “rootless” mode, you can follow these instructions: How to modify System Integrity Protection in El Capitan.
  3. Reboot.
  4. Connect only the external monitor(s) in question, if you can (I closed my MacBook lid, for example). The script will make override files for any connected monitor.
  5. Type “ruby patch-edid.rb” in Terminal.
  6. A new folder will be created in your home directory. Move it into the “/System/Library/Displays/Contents/Resources/Overrides” folder. If Finder tells you that you are overwriting an existing folder, consider backing it up first.
  7. Restart your computer. The picture quality should be fixed from this point.
  8. Re-enable “rootless” mode, the instructions are available on the same guide: How to modify System Integrity Protection in El Capitan.
  9. Reboot. Enjoy your monitor.

To undo the changes, either delete the folder you had copied to the Overrides folder (if it didn’t already exist) or replace it with the folder you had backed up. You will need to re-enable rootless mode to do this.

Earlier versions of Mac OS X

The process is a little more straightforward. There are two differences to the steps above:

  1. You do not need to disable/re-enable rootless mode and perform the subsequent reboots.
  2. The overrides folder location is “/System/Library/Displays/Overrides”.

Updates

I no longer own a Macbook Pro, but if you’re having trouble with any of these steps, please have a look through the comments below (and note that there are multiple pages). Many questions have been answered with helpful tips from others.

Update, 8 Feb 2016: A comment from nos1609 below, warns about a bootloop that can occur when running other patches (like the pixel-clock patch) simultaneously, and how to get around it.

Update, 23 Nov 2015: According to Peter’s post, you don’t need to disable SIP if you use recovery mode. If others have similar success with this method I’ll update the process.

Update, 3 Oct 2015: I have amended this post to target El Capitan. I have taken the steps from bigmcguire’s process, posted in the comments. Although some are still having issues, it appears to be working for people. Thanks!

Update, 29 May 2015: Mac OS 10.11 El Capitan does things a little differently. You must first disable the new ‘rootless’ mode and then use a different overrides folder: /System/Library/Displays/Contents/Resources/Overrides. Rootless can then be re-enabled if desired, as confirmed by nos1609 in the comments below. El Capitan is still in beta, I’ll update this post if the issue is still apparent afterwards.

Update, 26 May 2014: If you have had trouble with limited resolutions being available after the fix, check out Ibrahim’s comments here.

Update, 28 Nov 2013: If the process appears to work but doesn’t seem to make a difference, consider Tom’s comments below. Depending on your monitor an extra tweak may be required.

Update, 13 Nov 2013: Andrew comments below that he has modified the script to add some useful new features, and provides a link to his GitHub for those wishing to use it instead.

Update, 27 Oct 2013: If you’ve applied this fix before, the OS X Mavericks update will overwrite it. I’ve successfully re-applied the fix by following exactly the same steps, and other commenters below have done so, too.

772 thoughts on “Force RGB mode in Mac OS X to fix the picture quality of an external monitor

  1. If anybody is planning using this patch in combination with pixel-clock patch one has to keep in mind, that prior using pixel-clock there is the need to remove any previous RGB patches. So every custom folder added to Overrides directory should be removed, then apply the pixel-clock patch, and finally the patch-ede one.

    Otherwise, you’ll face a bootloop like this one https://cloud.githubusercontent.com/assets/11856987/12868039/b7be90a4-cd0e-11e5-9ef6-9ee97c671bf4.jpg

    PS Confirmed working on mac mini 2012 MD388 with two dell u2913wm over HDMI and USB with freed up thunderbolt port for any other use at their full res on El Capitan 10.11.4 Beta 2 (15E33e), so the code of improved script remains still up to date. Many thanks!

  2. I have a BenQ XL2720Z monitor hooked up via displayport to my 2015 Macbook Pro with AMD graphics running El Capitan. When I patch the EDID I lose the 144hz refresh rate and get only 60hz.

  3. Hello,
    Many thanks for your detailed instructions.
    I have copied the executed file into the Overrides folder, renaming the folder to be the same as one of the original ones as suggested in the comments. Despite restarting this does not appear to have improved the blurriness of the text. Is there anything else I can do?

  4. I’m extremely grateful for your detailed email! I just upgraded to a newer MacBook Pro and was fighting grainy text and dull colors. This worked like a charm!

  5. It wasn’t working for me so after some intense digging around I found out that you might need to disconnect and reconnect the monitor. Worked for me!

  6. Unbelievable how much this changes the clarity! Thank you so much, I would’ve never figured this out.

    Monitor: HP 27xw Display

    regards!

  7. I can say that although it is much better with RGB now. Text is still not as good as neither on mb pro retina display nor on my monitor connected to windows pc.

  8. I confirm this solution worked for my setup: late 2013 mbp retina with El Capitan + U2715H connected via hdmi. Now my monitor shows the input as RGB and there is a significant improvement in image quality. Although it is now ok quality I am not sure if it is still as good as connecting my windows pc though. Maybe I should play with font smoothing.

    Btw, I did not try Peter’s method because I did not see it until I complete the fix :) Maybe you can put an information about that up in the instructions.

    Thanks a lot!

  9. A million thanks, was about to order a way overpriced cable from the applestore but now i can finally code for real with my Dell U2913WM THANKS!

  10. Hello! I am so frustrated. I did it once before El Captain… I got El Capitain now, and i am back to the pink/green philips screen every couple of minutes.

    I tried it again, but it doesn’t work this time. Here is whats not working:

    Type “ruby patch-edid.rb” in Terminal. – causes:

    ruby: No such file or directory — patch-edid.rb (LoadError)

    so i can’t find a new folder. :-(

    Besides i am not sure about the script writing thing. how to do it with my macbook.

    Please, anyone can help me?

    Thank you, Jana

    • Still hoping for anyone to help me out. I tried anything… Please anyone help me. :-( already thinking about being an old macbook to use with the Philips.

        • Dmitry -> thank you!!! I went to finder and typed ~/ … Or what do you mean by “get”? I am just a stupid user. ;-)

          On Thursday I planned on bying an old mac book :-( to be able to use the Philips again…

  11. Hello there. I have made severalattempts and the image quality is still nowhere near how it shows on windows via virtualbox.

    Using: macmini end 2012
    Screen: ASUS VX248 24”

    Does anyone have any tips?

Leave a Reply