Script that attempts to force M1 macs into RGB mode when used with monitors that are defaulting to YPbPr.
No warranty provided for using this script. Use at your own risk.
- Make sure you are on Mac OS X 11.4 or higher. Upgrade if you haven't.
- Open System Preferences > Displays > Rotate the monitor that's in YPbPr mode in order to force it to write to the relevant plist file. You can unrotate it immediately or allow it to auto-revert.
From your Terminal, run:
# Download the script
curl -o ~/Downloads/fix_m1_rgb.py https://raw.githubusercontent.com/sudowork/fix_m1_rgb/main/fix_m1_rgb.py
# Run the script.
# Note: You may optionally pass the --dry-run flag if you want to validate the script's behavior without actually changing anything.
# Note: You may be prompted for your password in order to backup and modify files under /Library.
python3 ~/Downloads/fix_m1_rgb.py
It is expected to see some "warnings" about some display configurations not having the correct PixelEncoding
or Range
values.
Likewise, some displays may not have a LinkDescription
.
Restart your computer after you're done, and if all worked out well, then your monitor should be in RGB mode.
Note: The script will backup your original plist files. In addition, the script does not try to discriminate between various displays, so it will write the PixelEncoding and Range values for all displays with a LinkDescription field.
Kudos to @GetVladimir for identifying the plist changes that need to be made.