[Fix] Dual displays of same model with different EDID

I just wanted to post here because I had to figure this one out on my own, and hopefully this can help others.

TL;DR at the end

Background

I have had a BenQ PD3200U for a while. I got it second hand, and it was manufactured in week 38 of 2017. My only issue was the USB ports losing power/connection whenever the monitor went to sleep. This was fixed when I sent it back to BenQ for the latest firmware. At the same time I got my second PD3200U, manufactured week 29 of 2018, and it has no problems whatsoever. Once I got the older one back with the firmware fix, I noticed I didn't support Night Shift any more. And I wasn't really looking forward to sending it back for that reason.

Diagnosis

I figured out that Night Shift was disabled due to macOS detecting the old monitor as a Television (in System Information). This was also apparent from the Overscan slider in the Displays pane in System Preferences. After using DarwinDumper to get the EDID data for both displays I found out this was due to a difference in EDID between the two. The old one had a resolution of 1920x1080@60Hz set as native in the CEA extension block. The new model didn't have any resolution set as native in its CEA block. This might also help people who are trying to get their "televisions" to be detected as monitors.

Attempts

I tried various things, like trying to inject the EDID from the new monitor via Clover and using FixEDID.app to generate a .kext that would make the display appear as an Apple monitor. This either failed to fix the issue or made things worse.

I discovered the proper way of overriding EDID in macOS was using the files in /System/Library/Displays/Contents/Resources/Overrides. I installed AWEDIDEditor and opened the EDID.bin of the old display to remove the checkbox for the native resolution. I converted the resulting EDID to base64 to add it to the <data> block in my new /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-9d1/DisplayProductID-8025. I should have known this might not work because the EDID would be applied to both displays, and the new one was already fine. And indeed, this override messed up the default resolution of both displays. I'm not sure why though. But I quickly realised what the easiest fix would be.

The fix

All I needed to do was convert the EDID binary of the newer display into base64 using the command base64 -i EDID.bin. Then I just put the resulting string in the <data> field of the override file for my display(s). Now both my displays which are technically identical are also identical for macOS. So in the end I didn't need to do any actual patching of the "broken" EDID.

My override file at /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-9d1/DisplayProductID-8025 now reads:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>DisplayProductID</key> <integer>45061</integer> <key>DisplayVendorID</key> <integer>1552</integer> <key>IODisplayEDID</key> <data> AP///////wAJ0SWARVQAAB0cAQS1Rih4PofRqFVNnyUOUFSla4CBgIHAgQCpwLMA0cAB AQEBTdAAoPBwPoAwIDUAxI8hAAAaAAAA/wBKN0owMTA5ODAxOQogAAAA/QAyTB6MPAAK ICAgICAgAAAA/ABCZW5RIFBEMzIwMFUKAdcCAyTxUWFgX15dEB8iISAFFAQTEgMBIwkH B4MBAABlAwwAEACjZgCg8HAfgDAgNQDEjyEAABpWXgCgoKApUC8gNQDEjyEAABoAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA xg== </data> </dict> </plist> 

Make sure to change the Product and Vendor IDs both inside the override file and in the file and directory names.

Author: @pieter91