TV : LG CX.
Mac : Hackintosh with 6800 XT.
Cable : DP 1.4 -> HDMI 2.1.(Plenty of adapter cables out there now. pick a good one).
MacOS : Ventura 13.1
1. Make sure you get the display working first with the cable used.
2. Extract the TV/Monitor EDID by running the following command :-
> ioreg -l | grep IODisplayEDID
3. Copy the IODisplay value into a text file and save it.The text file SHOULD contain only the hex encoded values
and nothing else. let say the saved file is edid_hex.txt.
4. Convert the hex encoded value to binary using following command and write to .bin file :-
> cat edid_hex.txt | xxd -r -p > edid_bin.bin
5. go to analogway.com and download the AW EDID Editor.
6. Open the edid_bin.bin in the AW EDID Editor and go through the CEA extensions and remove any references to RGB.Since i wanted YCBCR444 and not RGB. I removed all references to RGB.
This requires some explorations and experimentation for what you need. for e.g if you need only RGB, remove
all references to YCBCR. There are many options here, understand them and enable/disable them as per your
requirement. I will not go through them.
7. Once all required changes are made save the edid bin file. call it edid_bin_modified.bin.
8. Next , we need to get the Display vendor id and Product id of your Display. Run the below command :-
> ioreg -l | grep IODisplayPrefsKey | grep display
Output : "IODisplayPrefsKeyOld" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@0/
display0/AppleBacklightDisplay-
9e5-
792".
9. The numbers after the AppleBacklightDisplay are the Display vendor id and Product id respectively. In this case 9e5 is the Vendor id and 792 is the Product id. make a note of it.
10. Next , make a back up of current edid mac os is using. This is at location
/Library/Displays/Contents/Resources/Overrides
11. In this folder you will find the DisplayVendorId folder and in that folder you will find the product id PLIST XML file.
12. Edit the Product Id file.You will need to do sudo and edit. In this case the file will be
/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-9e5/DisplayProductID-792
13. Next, add a new key/value pair. The key will be "IODisplayEDID"
<key>IODisplayEDID</key>
14. Now, we need to convert the contents of edid_bin_modified.bin to hex and then to base64 encoding.
15. To do this , first convert bin -> hex using following command :-
> xxd -ps edid_bin.bin > edid_hex_modified.txt
16. Next, we convert the hex -> base64 , using following command :-
> cat edid_hex_modified.txt | xxd -r -p | base64
Output: AP///////wAJ5ZIHAAAAACwbAQSlIhN4AhuwplhVnSYOUFQAAAABAQEBAQEBAQEBAQEBAQEBnDuANnE4PEAwIDYAWMIQAAAaqC+ANnE4PEAwIDYAWMIQAAAaAAAA/gBCT0UgQ1EKICAgICAgAAAA/gBOVjE1NkZITS1ONjEKAO0=
17. Copy the output to <data> </data> like so :-
<data>AP///////wAJ5ZIHAAAAACwbAQSlIhN4AhuwplhVnSYOUFQAAAABAQEBAQEBAQEBAQEBAQEBnDuANnE4PEAwIDYAWMIQAAAaqC+ANnE4PEAwIDYAWMIQAAAaAAAA/gBCT0UgQ1EKICAgICAgAAAA/gBOVjE1NkZITS1ONjEKAO0=</data>
18.
Make sure you DON'T mess the <key> and <data> values. This is very important. If the data is empty of messed up. you may not get the display on reboot.
19. Once the changes are made to the ProductId file.
Reboot and if edid is modified correctly, the changes should take effect.
20.
Make sure to back up the ProductId file and you will have to sudo and edit the ProductId file as only root has access to this file.
Note: In case you mess up something. Always keep some way of editing the ProductId file. For me , i have windows as dual boot with Paragon APFS which allows me write access to macos file system. if display does not work , go to windows and restore the ProductId file.
Also note, you cannot restore the file in recovery mode. If safe mode is bootable after a mess. you are in luck.
I really wish apple made a utility to modify edid safely for external monitors, but this will never happen because they want you to buy their expensive Displays and so we have resort to this circus.
Warning: Please make sure you know what you are doing before attempting this or else your mac will not have a display.
Also DP 1.4 bandwidth is limited to 25Gbps. In this bandwidth you can fit in 4k/60hz/YCBCR444/10bit which requires roughly 20 Gbps. We can sacrifice on the refresh rate, but cannot downgrade bit color and chroma sampling as it gives worst result. For another 60Hz we need another 20 Gbps which only HDMI 2.1 or DP2.0 allows. until then this is the best we can do.