Chriskuei Keep calm and code on

Enable HiDPI Mode in macOS

macOS regards a 2k monitor as a TV, and is using the YCbCr color space rather than RGB. You need follow instructions below if you want to enable HiDPI Mode in macOS.


  • MacBook Pro
  • a 2k monitor (e.g. AOC Q2790PQ)

Disable SIP (System Integrity Protection)

  • Restart Mac
  • Hold down Command-R until you see an Apple icon and enter Recovery
  • Select Terminal from the Utilities menu, then type
$ csrutil disable
  • Restart

Force RGB in macOS

  • Download patch-edid.rb

  • Run patch-edid.rb in termimal. A new folder will be created in your home directory. You will find a file named ‘DisplayProductID-xxxx’

  • Open the file and edit like this

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
      <string>Q2790 - forced RGB mode (EDID override)</string>
  • You can also use the tool to generate scaled resolutions
  • Save the file and move the entire directory into the ‘/System/Library/Displays/Contents/Resources/Overrides’ folder
  • Restart your computer

Set resolution

  • Download RDM

  • [Option] Turn on HighDPI

    $ sudo defaults write /Library/Preferences/ DisplayResolutionEnabled -bool true

    [Option] Turn on font smoothing

    $ defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
    # To undo it, try
    # defaults -currentHost delete -globalDomain AppleFontSmoothing
  • Enable SIP

    $ csrutil enable
  • Enjoy



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

[2] 请教一下如何在 Mac OS X 10.11 下开启自定义 HiDPI?