Created
May 7, 2020 17:59
-
-
Save tubaterry/07708b7c6f4640b0ef5d5c9239fbda9a to your computer and use it in GitHub Desktop.
ROG PG27UQ with YUV modes edited out of the EDID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>10144</integer> | |
<key>DisplayProductName</key> | |
<string>ROG PG27U</string> | |
<key>DisplayVendorID</key> | |
<integer>1715</integer> | |
<key>IODisplayEDID</key> | |
<data> | |
AP///////wAGs6AnU4kAACUdAQOAPCJ4Ipuxr04ztSYLUFQhCAABAQEBAQEBAQEBAQEB | |
AQEBCOgAMPJwWoCwWIoAVlAhAAAeAAAA/wAjQVNNVjFCbmFFYkhkAAAA/QAYPB6HPAEK | |
ICAgICAgAAAA/ABST0cgUEcyN1UKICAgASsCAz3BTBAfBBMDEgFdXl9gYSMJBwGDAQAA | |
bQMMABAAMHggEGADAgFn2F3EAXiAAOMFwADiAGrmBgUBj3cDAAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
sA== | |
</data> | |
<key>DisplayIsTV</key> | |
<false/> | |
<key>SwitchResX backuped settings</key> | |
<dict> | |
<key>DisplayProductID</key> | |
<integer>10144</integer> | |
<key>DisplayVendorID</key> | |
<integer>1715</integer> | |
</dict> | |
<key>dspc</key> | |
<array> | |
<data> | |
OtAAoPBwPoAwIDUAAAAAAAAa | |
</data> | |
</array> | |
<key>trng</key> | |
<data> | |
OPqp5P5/AAAA2PZr/38AAHD5qeT+fwAAimcXCwEAAAB9BUgAAAAAAABGwyMAAAAALwBm | |
AHIALgBtAGEAZAByABgAAAB4AAAAMHUAAFgPAgBoAHIAZQBzAHgALgBhAHAAcAAtADYA | |
MQAwADUANQA4ADAAOAAxADYAOQAwAC4AcABsAGkAcwB0AHQAgTX/fwAAZgByAC4AbQBh | |
AGQAcgBhAHUALgBzAHcAaQB0AGMAaAByAGUAcwB4AC4AYQBwAHAALQA2ADEAMAA1ADUA | |
OAAwADgAMQA2ADkAMAAuAHAAbABpAHMAdAAAAM2HgTX/fwAAAAAAAAAANECANBwDAGAA | |
ABtVOnf/fwAA8Le6AABgAACw+Knk/n8AAFwAAAAAAAAAcwDStKAXdcoA4TyL/38AAPC3 | |
ugAAYAAA | |
</data> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to trick MacOS Catalina into stop using YUV (YUV444, YUV222, YUV420?) colorspaces on your fancy new monitor and stick with RGB, because there's no way to pick and I guess they assume you're a video editor?
Purpose:
To stop getting headaches from blurry text.
Non-pissbaby purpose: Get 4k @ 60Hz working on the ASUS ROG PG27UQ, and get MacOS to use RGB colorspace instead of YUV4:4:4
Original references:
https://www.mathewinkson.com/2013/03/force-rgb-mode-in-mac-os-x-to-fix-the-picture-quality-of-an-external-monitor
https://spin.atomicobject.com/2018/08/24/macbook-pro-external-monitor-display-problem/
The ruby script (and others based off it) make some assumptions that don't work for this monitor, so they mangle the shit out of the EDID, preventing you from using the thing. Also none of the instructions tell you what's happening.
Fun info:
Apple has a series of Override files for a bunch of displays that don't quite work as intended when left as defaults. (Either bad EDID info or no EDID info, usually)
You can semi-easily create your own.
Instructions:
Use SwitchResX to get this monitor set up initially, then copy this gist to
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-6b3/DisplayYearManufacture-2019-DisplayWeekManufacture-37
(SwitchResX not strictly necessary, it's just the easiest way to set up custom resolutions)
This sets up a display override file for the monitor in question. You can do it manually:
ioreg -lw0 | grep IODisplayPrefsKey
will spit out some display IDs. You're looking for the last section: "AppleDisplay-[someID]-[someID]". If you've got one display this is easy (or in my case I've got two refurb HPs so it's just a process of elimination for the ASUS monitor lol/System/Library/Displays/Contents/REsources/Overrides/DisplayVendorID-[first ID from above]/DisplayProductID-[second ID value from above]
( Your own DisplayProductID-XXXX override plist needs only the following keys:
DisplayProductID
,DisplayVendorID
, andIODisplayEDID
)To edit the EDID:
** We want to remove the YCrCb capabilities from the standard EDID Header - Byte 24, bits 4 and 3.
** "4:4:4 in deep color modes" is another one, Byte 6, bit 3 of the HDMI Vendor Specific Data Block
*** This is potentially in a variable location, but it's not far after
03 0C 00
(little-endian bytes)pbpaste | base64 -d | pbcopy
then open Hex Fiend and paste lol)add hex prefix
)string_to_checksum is two strings: bytes 0 through 127 and 128 through 255
paste the first half into string_to_checksum
fuck with the last byte until the last output is 0 (A valid EDID checksum is
sum of all 128 bytes % 256 == 0
)repeat for the second half
Throw the results into the EDID Reader web app until you get valid checksums in both the
Header Information
andExtension Header Information
sections.Once your checksums are good, paste the full 256-byte EDID thing back into Hex Fiend and save as a file.
cat edid_hex | base64 | pbcopy
paste that shit back into the IODisplayEDID section, replacing what's there. The differences should be minor and it should stay the same length. (cuz you only changed like 3-5 bytes from the original)
Remount root rw with
sudo mount -uw /
Copy this file to
sudo cp DisplayYearManufacture-2019-DisplayWeekManufacture-37 /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-6b3/DisplayYearManufacture-2019-DisplayWeekManufacture-37
Reboot
Notes:
Additional Modeline notes for PG27UQ in 4k@60hz if it gets lost: