A script to fix EDID problems on external monitors in macOS.
-
Connect only the problem display.
-
Create this directory structure (if it doesn't already exist):
sudo mkdir -p /Library/Displays/Contents/Resources/Overrides
-
Download this ruby script in that directory:
cd /Library/Displays/Contents/Resources/Overrides sudo curl -O https://gist.githubusercontent.com/ejdyksen/8302862/raw/patch-edid.rb
Note: You may want to use adaugherity's version of the script instead.
-
Run the script we just downloaded (as root again). This creates a new display override plist file.
cd /Library/Displays/Contents/Resources/Overrides sudo ruby patch-edid.rb
-
Unplug and replug in the problem display.
- The original forum thread
- An improved version of the script by adaugherity
- An explaination of the problem from Atomic Object's blog
- Thanks so much to @stackrainbow for pointing out that this can be done without disabling SIP.
- This version appears to work in Catalina and Big Sur. See earlier revisions for what worked (with disabling SIP) in earlier versions of macOS, which require the override plist to be in a different directory.
Okay first attempt didn't work but I'm fairly sure this is because I've got some borked "display state". I had previously been messing around with RDM, BetterDummy, SwitchResX and what not and I have ~1000 lines in my
com.apple.windowserver.displays.plist
file. I did a fresh install of macOS in a VM from Apple's official IPSW and it has.. the single display in itscom.apple.windowserver.displays.plist
; oh boy. UUIDs don't save me here since my displays UUID is repeated multiple times and I am not sure where these definitions are coming from (the other UUIDs) so I can manually remove them.Would you have any idea? I'll keep poking around. The alternative is a re-install but I really don't want to do that currently.
Update 1:
So in addition to deleting
/Library/Preferences/com.apple.windowserver.displays.plist
you also have to delete~/Library/Preferences/ByHost/com.apple.windowserver.displays.UUID.plist
. In place of UUID there will be an actual UUID.That cleaned it up and now I have a single entry, very nice. Let's try again.
Update 2:
I cannot get it to work with an LG 27GL850. The change to the plist is staying in-place but there's no UI scaling nor any option to in System Preferences.