Skip to content

Instantly share code, notes, and snippets.

@GetVladimir
Last active April 18, 2024 02:33
Show Gist options
  • Save GetVladimir/c89a26df1806001543bef4c8d90cc2f8 to your computer and use it in GitHub Desktop.
Save GetVladimir/c89a26df1806001543bef4c8d90cc2f8 to your computer and use it in GitHub Desktop.
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.



Please note that you're doing any changes on your own risk.

Terminal commands used in the video

Here are each of the Terminal commands mentioned in the tutorial, so that you can just copy and paste them:

open /Library/Preferences

plutil -convert xml1

plutil -convert binary1

plutil -lint



The step-by-step procedure on how to force RGB Color Output on M1 and M2 based Macs with Terminal commands

  1. Open Terminal and use this command to make Finder select the displays plist file:
    open -R /Library/Preferences/com.apple.windowserver.displays.plist

  2. Drag and drop the com.apple.windowserver.displays.plist file to Desktop manually. Don't use the cp command, as it won't add your current user with writing privileges.

  3. Convert the file to XML:
    plutil -convert xml1 ~/Desktop/com.apple.windowserver.displays.plist

  4. Open the converted file with the default plain text editor (avoid using the built-in TextEdit app if possible, since it might modify the file and make it unreadable by the system)
    open -t ~/Desktop/com.apple.windowserver.displays.plist
    or
    open -a CotEditor.app ~/Desktop/com.apple.windowserver.displays.plist

  5. Copy and paste the missing LinkDesription Key under the current display (check the screenshot below for an example of how it should look like):

				<key>LinkDescription</key>
				<dict>
					<key>BitDepth</key>
					<integer>8</integer>
					<key>EOTF</key>
					<integer>0</integer>
					<key>PixelEncoding</key>
					<integer>0</integer>
					<key>Range</key>
					<integer>1</integer>
				</dict>
  1. Save the file and then convert it to binary again:
    plutil -convert binary1 ~/Desktop/com.apple.windowserver.displays.plist

  2. Check if the plist file is valid:
    plutil -lint ~/Desktop/com.apple.windowserver.displays.plist

  3. Open the /Library/Preferences/ folder again:
    open /Library/Preferences/

  4. Drag and drop the updated com.apple.windowserver.displays.plist file from Desktop to the Library folder manually. Don't use the cp command, as it won't add your current user with writing privileges.

  5. Right Click on the com.apple.windowserver.displays.plist file in the Library folder and click on Get Info

  6. Check the boxes for Stationery and Locked.

  7. Reboot the Mac.

That's it!



(Alternative) Terminal commands to force RGB Color Output on M1 and M2 based Macs and workaround for losing RGB color after waking up from sleep

  1. Open Terminal

  2. Paste the following commands to edit the User's displays plist file com.apple.windowserver.displays.[UUID].plist using the built-in PlistBuddy function in macOS:

/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth 8" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:EOTF integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:PixelEncoding integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:Range integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
  1. Reboot your Mac

(Workaround) If your Mac loses RGB color after waking up from sleep mode, either Reboot your Mac (recommended) or use this Terminal command to stop the WindowServer and login again (not recommended):

sudo killall -HUP WindowServer



End result

The end result is having your M1 mac output RGB color to your external monitor instead of YPbPr, potentially making the colors more accurate and the text a bit more crisp, even on older 1080p monitors.

Hopefully this tutorial would be useful to someone.

Please feel free to ask in the comment section if you have any questions regarding this procedure.



Background

While doing a lot of testing on how the Dual-Cable workaround makes RGB to work on M1, I've discovered what changes it makes to macOS, and managed to create a more streamlined workaround without the need to use a second cable.

To make things easier, I've created a step-by-step video tutorial of the whole procedure that should force RGB color output on your M1 Mac connected to an external monitor, and works on an HDMI-to-HDMI cable connection.

Credits

Big thanks goes to the amazing community and all their help over the years to solve issues like this:
https://gist.github.com/ejdyksen/8302862
https://gist.github.com/adaugherity/7435890

Useful Sources

Apple Open Source Project Files for Displays and Graphics
https://opensource.apple.com/source/IOKitUser/IOKitUser-1445.60.1/graphics.subproj/IODisplayLib.c
https://opensource.apple.com/source/IOGraphics/IOGraphics-517.17/IOGraphicsFamily/IOFramebuffer.cpp.auto.html

How to Edit and Convert binary plist files
http://hints.macworld.com/article.php?story=20050803111126899
https://apple.stackexchange.com/questions/155393/how-to-beautify-binary-dict-files
https://discussions.apple.com/thread/1768480

How to Edit plist files using defaults and PlistBuddy
https://ss64.com/osx/defaults.html
https://github.com/mathiasbynens/dotfiles/blob/master/.macos

Apps based on this method

@sudowork has created an awesome script written in Phyton that automates the steps and checks for duplicate files.
You can find more info about it here: https://github.com/sudowork/fix_m1_rgb

@dangh has created an alernative script for fishshell.
You can find more info about it here: https://github.com/dangh/force-rgb.fish

@GetVladimir I've also created a Shortcut to Force RGB Color Output using the built-in Shortcuts app.
You can find how to create the Shortcut here: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8?permalink_comment_id=4531552#gistcomment-4531552

@entropyconquers has created a script based on this method written in Phyton that automates the steps, makes a backup and checks for duplicate files.
You can find more info about it here: https://github.com/entropyconquers/Force-RGB-Color-on-M1-M2-Mac-Script

Additional notes

Multiple PixelEncoding and Range keys in the same plist file
Note that there might be multiple instances of the PixelEncoding and Range keys in the same file, one for each output of your monitor and for different AirPlay devices. You might need to update the integer on each one to get RGB color output on all displays.

Getting RGB color only before login
There might be multiple duplicate plist files with the same name in different locations.

Make sure that you only have the main modified file in:
/Library/Preferences

Then make a backup and remove duplicate displays plist files from these locations (if any):
~/Library/Preferences
or
/Users/username/Library/Preferences
and
/Users/username/Library/Preferences/ByHost


Please note that you'll need to have administrator privileges in order to modify the file in /Library/Preferences. Thanks goes to @keegandent and @StrategicalIT for pointing this out.

Updates regarding macOS Monterey

USB-C to DisplayPort
From what I've seen, it seems that macOS Monterey 12.0.1 finally outputs RGB color by default on some monitors when using USB-C to DisplayPort cable on M1 Apple Silicone Macs.

You might need to make a backup and delete these 2 files:
/Library/Preferences/com.apple.windowserver.displays.plist
and
/Users/yourname/Library/Preferences/ByHost/com.apple.windowserver.displays.[UDID].plist

Restart your Mac and it should properly output RGB color on the monitor on the next boot.

HDMI to HDMI
The situation with HDMI seems to got a bit more complicated. Now the whole section for the LinkDescription might be missing from the com.apple.windowserver.displays.plist on a clean install and doesn't seem to be recreated when rotating the screen either.

Luckily, the solution still works, but you might need to manually add this whole section in the displays plist file:

					<key>LinkDescription</key>
					<dict>
						<key>BitDepth</key>
						<integer>8</integer>
						<key>EOTF</key>
						<integer>0</integer>
						<key>PixelEncoding</key>
						<integer>0</integer>
						<key>Range</key>
						<integer>1</integer>
					</dict>



The section usually goes right under the CurrentInfo key, and it should look something like this:

pixelencoding

This should get your RGB color output working on M1 Mac mini, even when connected with HDMI to HDMI cable.

Multiple monitors when one them is using HDMI to HDMI
Additional thanks goes to @somogyi-ede who tested this with multiple monitors and confirmed that the LinkDescription key needs to be added under each monitor instance in order for all of them to receive RGB color output. Link to the comment

Updates regarding macOS 13 Ventura

USB-C to DisplayPort
The macOS 13 Ventura beta seems to outputs RGB color by default on some monitors when using USB-C to DisplayPort cable on M1 Apple Silicone Macs.

You might need to make a backup and delete these 2 files:
/Library/Preferences/com.apple.windowserver.displays.plist
and
/Users/yourname/Library/Preferences/ByHost/com.apple.windowserver.displays.[UDID].plist

Restart your Mac and it should properly output RGB color on the monitor on the next boot.

HDMI to HDMI
Similar as macOS Monterey, the situation with HDMI on macOS Venturs seems a bit more complicated. Usually the whole section for the LinkDescription might be missing from the com.apple.windowserver.displays.plist on a clean install and doesn't seem to be recreated when rotating the screen either.

Luckily, the solution still works, and you still need to manually add this whole section in the displays plist file:

					<key>LinkDescription</key>
					<dict>
						<key>BitDepth</key>
						<integer>8</integer>
						<key>EOTF</key>
						<integer>0</integer>
						<key>PixelEncoding</key>
						<integer>0</integer>
						<key>Range</key>
						<integer>1</integer>
					</dict>



The section usually goes right under the CurrentInfo key, and it should look something like this:

pixelencoding

This should get your RGB color output working on M1 Mac mini, even when connected with HDMI to HDMI cable.

(Optional) Lock the plist file and set it as stationary
After the macOS Ventura 13.3 update, the plist file seems to get overwritten on reboot.

After you make the edits in the file, you can try setting the file /Library/Preferences/com.apple.windowserver.displays.plist as Stationery pad and Locked, so that it doesn't get overwritten on every reboot

Stationery Pad Locked

To do this, right click on the plist file, click on Get Info and check the boxes next to Stationery pad and Locked

This requires further testing and might cause some issues, like not being able to remember new resolutions or display settings. Please note that you're making any changes at your own risk.

Updates regarding macOS 14 Sonoma Beta

USB-C to DisplayPort
The macOS 14 Sonoma seems to outputs RGB color by default when using USB-C to DisplayPort cable.

HDMI to HDMI
The macOS 14 Sonoma seems to outputs YCbCr color by default when using HDMI to HDMI cable.

  • Forcing RGB Color Output still seems to work with the original procedure of modifying the plist files

  • Modifying the display plist files still works with the alternative version

  • After the plist files are modified, putting the Mac to sleep and waking it, it seem to keep the RGB Color output (this seems to be fixed at least on a M1 Mac mini)

If you have any additional questions, please feel free to contact me.

@GetVladimir
Copy link
Author

GetVladimir commented Apr 9, 2023

In case this is helpful, I've also created a version to force RGB Color Output on M1 and M2 based Macs with the built-in Shortcuts app, for users that prefer not to use Terminal or to edit the plist manually:

How to Force RGB Color Output on Apple Silicon M1 or M2 based Mac using the Shortcuts app

Force RGB Color Output on Apple Silicon M1 or M2 Mac

  1. Open the built-in Shortcuts app and create a new shortcut by clicking on + from the Top Bar
  2. In the Search field on the right, type shell and drag and drop "Run Shell Script" to the left
  3. (Optional) Click on Open Preferences and check "Allow Running Scripts" if this is the first time you setup a script in the Shortcuts app
  4. Select the text echo "Hello World" and replace it with this code (copy and paste over it):
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth 8" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:EOTF integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:PixelEncoding integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:Range integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist
  1. Name the Shortcut "Force RGB Color Output" or however you like
  2. Click on ▶ Run from the Top Bar
  3. Reboot your Mac

That's it!

If done correctly, this should modify the User's displays plist file com.apple.windowserver.displays.[UUID].plist and force RGB color output to the monitor.

Please note that you're doing any changes at your own risk.

As there is now a saved Shortcut for it, it's easier to apply the fix if the RGB color output is lost when updating macOS or changing the display settings.

Source to the post on the Shortcut app subreddit:
https://www.reddit.com/r/shortcuts/comments/12gx1o1/how_to_force_rgb_color_output_on_apple_silicon_m1/

@490398290
Copy link

@GetVladimir This bug is so nasty, your new method is good but still not persistant. After a while it reverts to Ycbcr when I shut down TV. In combination with EDID patch and plist editing it persists.

@GetVladimir
Copy link
Author

@490398290 Thank you for the update, I appreciate that a lot!

At this point, I'm not sure if it's going to be fixed with a future update of macOS.

Either way, I'm glad to hear that you got it working

@GetVladimir
Copy link
Author

GetVladimir commented Apr 11, 2023

Prototype Color Profile for Reducing Temporal Dithering

I was looking into how to reduce Temporal Dithering on newer Apple Silicon M1 and M2 Macs, since there doesn't seem to be a way to disable it completely.

On my older Mac mini late 2014, there doesn't seem to be any temporal dithering when connecting to my TV or the monitor. I went ahead and extracted the color profile used on it and applied it to the M1 Mac mini connected to a Dell U2415 monitor with HDMI-to-HDMI cable.

From what I can notice on my specific setup, the temporal dithering is reduced, the colors are solid and the gradients are smoother.
Prototype Color Profile

I'm not sure how good is the color accuracy on it, as this is specifically aimed toward reducing the temporal dithering.

If someone else want to test the color profile, you can download it from here:
https://www.getvladimir.com/uploads/1/8/8/4/18841988/reduce_temporal_dithering.icc

To use the color profile:

  1. Copy the Reduce Temporal Dithering.icc file to /Library/ColorSync/Profiles/Displays
  2. Go to System Settings > Displays > Color Profile and select the Sony TV *00 - Forced RGB Mode color profile from the list
  3. Check the colors where you usually notice temporal dithering on your monitor and write a comment if they are reduced or if you have any issues and questions

Update: There doesn't seem to be enough confirmation that the color profile to reduce temporal dithering works for other systems or configurations, so I can't recommend using it

@traderdude123
Copy link

@GetVladimir
Is this temporal dithering required to do if you TV is calibrated using colorimeter?

@GetVladimir
Copy link
Author

GetVladimir commented Apr 12, 2023

@traderdude123 not sure. Easiest way to check would be to try the color profile without changing anything on the monitor/TV itself and see how it works on your specific setup.

The color accuracy will probably not be the same.

You can always switch back to your old color profile if needed though.

@traderdude123
Copy link

@GetVladimir

I tested the temporal dithering icc.

What is observed is that compared to my calibrated icc, the colors are slightly more saturated as a result i m losing detail in images. other than that i don't see much difference.

may i ask how/where you obtained this temporal dithering icc? in colorSync utility it says Apple and mine says X-Rite.

@GetVladimir
Copy link
Author

@traderdude123 thank you so much for testing this and for the info!

Yes, the end result is to reduce temporal dithering on some color gradients. It basically reduces the number of colors in order to reduce temporal dithering.

I've extracted the profile from my old Mac mini late 2014 connected to a TV with RGB color output.

@traderdude123
Copy link

traderdude123 commented Apr 13, 2023

@GetVladimir

Few more important observations.

I just got a kabeldirect USB-C to HDMI 2.1 Adapter cable with the VM700 Chipset. I flashed a firmware(v112) i got on the mac rumors thread and guess what i am now getting RGB mode if i connect usb-c to hdmi 2.1 cable and if i connect the hdmi-hdmi cable i get ycbcr444.

I then compared both outputs to see if there was any difference. Note that macOS creates a new profile if you connect or make new connection via hdmi or usb-c port. I made sure both outputs had my calibrated icc profile. I did a lot of comparison test with colors , images and text.

I could NOT find any difference between RGB and YCBCR444.

What this means that is people need to color calibrate their monitors irrespective of connecting mac to TV/monitor using usb-c or hdmi. The issues in color accuracy came from improper calibration and NOT because of RGB or YCBCR444. Because both signals are digitally same , so the TV or monitor should produce the same output. This is what i m concluding from my observations.

However, do correct me if my methods or observations are wrong. Below the RGB connection WITHOUT EDID modifications using BD.
Also i check the window server plist. No changes whatsoever. The same 7 bitdepth and all other parameters remain same if use both usbc or hdmi connection.

RGB_4k_120hz_downsizsed

@GetVladimir
Copy link
Author

@traderdude123 thanks for the update.

Are you suspicious that the TV doesn't really receive true RGB color and there is no discernible difference with YCbCr because of the adapter in-between?

While it's true that you can calibrate any type of color output in order to improve it, it won't really match as the calibrated RGB colors when accuracy is a must

@traderdude123
Copy link

@GetVladimir

The TV is receiving RGB since i can see that TV shows RGB as in the screenshot above.

What i m saying is even if there is a difference between RGB and YCBCR444, the human eye cannot make out the difference. if there was a difference it would show in some tests. But i have tested color gradients / images and texts and i cannot find any difference. I even tested the grays and blacks. There is no difference.

if you think there is a difference, let me know how i can test the difference. Because now i have both cables which can do RGB and YCBCR444. But the USB-C adapter does get hot after a while. so i prefer using direct hdmi-hdmi connection with YCBCR444.

@GetVladimir
Copy link
Author

@traderdude123 that is a pretty cool setup if you can test both of them.

My suggestion would be to check with these tests from Lagom if you haven't done already: http://www.lagom.nl/lcd-test/

Check them first with YCbCr and then with RGB to see if you can notice any difference on your setup on any of the tests, colors and texts.

Make sure to use native screen resolutions (without scaling) and be aware of browsers like Safari that do color profiles.

@traderdude123
Copy link

@GetVladimir

Which browser do you recommend?

@GetVladimir
Copy link
Author

@traderdude123 They should all work. Safari uses the color profile selected in the System Preferences and it might give a different results for images that have color profiles set to them.

Google Chrome and Edge usually default to sRGB, but newer versions might also read the System Color Profile. It's just something to be aware about.

On the main page of the Lagom tests, there are also images that can be downloaded without the color profiles, so you don't need to depend on the browser.

@traderdude123
Copy link

@GetVladimir

OK , so i set native resolution (default) in display settings and native icc profile(as assigned to TV by macOS). No Calibration done.

I used chrome and set full screen with contrast gradient images.

I capture photos of YCBCR and RGB Blue contrast gradient images. I could not find any difference. I even looked as closes as possible and still could not find any difference.

I check all the test, still could not find any difference. may be my eyes are not so good.

Is there any objective way to find the difference between RGB and YCBCR444?

Here attached gradient test from 1 to 6 captured on phone.

YCBCR444:
IMG_0181_YCBCR

RGB:
IMG_0180_RGB

@GetVladimir
Copy link
Author

@traderdude123 thank you for the details.

I trust you, if you compared everything and there are no noticeable differences, that means there aren't any differences on your setup.

I do appreciate that you checked this and for all the informations.

@traderdude123
Copy link

traderdude123 commented Apr 14, 2023

@GetVladimir

I found the issue with RGB and YCBCR outputs.

The reason they were matching is because on a OLED TV, the black level setting was set to Auto. What this does is it sets low for YCBCR and high for RGB. and as a result no difference.

I then changed to RGB low, the image color contrast improved compared to YCBCR low. But now when i view text or any videos in browser ,text is looking washed out on white background, and i m losing a lot of shadow detail in videos.

But yes, now there is a difference between RGB low and YCBCR low.

In windows , i can control the RGB full and limited signal , is there any way to set RGB Full or limited in macos?

Note i have the option to set RGB Low or High i.e Limited or full in my Apple TV device. But there is no such option in macOS.

@GetVladimir
Copy link
Author

@traderdude123 good question. There doesn't seems to be an option in macOS to set RGB low or high (Full or limited range).

This option is available on tvOS and needs to be added in macOS

@traderdude123
Copy link

@GetVladimir

Anyway to get RGB on hdmi-hdmi? because the usbc-hdmi Adapter is getting very hot.

I did get RGB on hdmi-hdmi but then i tested sleep with it and now its gone. I have no idea what i did to get RGB on hdmi-hdmi. LOL.

@GetVladimir
Copy link
Author

@traderdude123
Copy link

@GetVladimir

The method worked after i removed both the window server plist file and then ran the commands.

Thanks for that.

But i m now getting RGB 8b, I was getting RGB 10b earlier.

I tried changing the bitdepth to 10 in the command , but its still stuck at 8b.

@GetVladimir
Copy link
Author

@traderdude123 Awesome! Glad to hear that you got RGB color output working.

I'm not sure if you can get 10 bit and RGB on the HDMI-to-HDMI connection at the same time.

You can try editing the plist manually and change both depth and bit depth to 10 bit (needs to be changed on two places).

@traderdude123
Copy link

@GetVladimir

I tried setting 10-bit to both depth and bit depth. No luck.

Few more observations.

The commands work only if you remove both com.window.server.plist file i.e from /Library/Preferences and ~/Library/Preferences/ByHost.
Then reboot so they get generated again.
Then run the commands
Then reboot again.

Another caveat is if you change refresh rate , then it switches back to YCBCR.

@traderdude123
Copy link

@GetVladimir

Another observation , on hdmi-hdmi connection on RGB is taking low on auto. but with usb-c-hdmi connection the RGB is taking high on auto. There is some observable color difference between hdmi-hdmi 8b RGB and usb-c-hdmi 10b RGB.

This could be due to color depth , but i can't seem to get 10b on hdmi-hdmi connection.

@GetVladimir
Copy link
Author

@traderdude123 thanks for the info.

Yes, that might make sense, since the HDMI on the Mac might not have the bandwidth required for 10 bit RGB

@traderdude123
Copy link

@GetVladimir

But the hdmi-hdmi cable had bandwidth for 10b YCBCR444, isnt that enough bandwidth for 10b RGB?

@GetVladimir
Copy link
Author

@traderdude123 No, that's actually one of the differences between RGB and YCbCr.

RGB carries the full info for each channel (Red, Green and Blue) and requires more bandwidth, while YCbCr is usually compressed

@traderdude123
Copy link

@GetVladimir

So you are saying YCBCR444 is compressed?

@GetVladimir
Copy link
Author

@traderdude123 Yes, at least on macOS.

That's why the Pixel Encoding key in the plist is set to 1 when using YCbCr.

When using RGB, the Pixel Encoding is set to 0

@traderdude123
Copy link

@GetVladimir

Hmm, thats interesting. This is first time i heard that YCBCR444 is compressed.

I thought YCBCR422 or 420 was compressed and 444 was uncompressed. But in macOS even ycbcr444 is compressed.

But is this the case in windows also?

@GetVladimir
Copy link
Author

@traderdude123 Do you think perhaps macOS uses 4:2:2 instead of 4:4:4 YCbCr when the Pixel Encoding is set to 1?

How does it show on the On Screen Display menu of the TV/Monitor when you set it to 1?

@traderdude123
Copy link

@GetVladimir

Also , i was able to get 10b RGB on hdmi-hdmi with BetterDisplay when i had the trial.

So i m sure the hdmi cable can do 10b RGB.

@GetVladimir
Copy link
Author

GetVladimir commented Apr 14, 2023

@traderdude123 does your Mac have HDMI 2.1 or 2.0 port?

As far as I know, there isn't a way to realistically get 10-bit RGB 4K over HDMI 2.0 connection.

@traderdude123
Copy link

@GetVladimir

M2 Mac mini with hdmi 2.1

@GetVladimir
Copy link
Author

@traderdude123 Then the bandwidth limitations doesn't apply to you.

HDMI 2.1 theoretically has 48Gbps in bandwidth (compared to 18Gbps of HDMI 2.0), so it can handle 10-bit RGB at 4K.

I haven't tested this myself though, since my M1 Mac mini has HDMI 2.0.

@traderdude123
Copy link

@GetVladimir

ahh ic.

Ok , so let me know what i need to test to get 10b RGB over hdmi-hdmi.

I was playing around with both the cables yesterday and i somehow got 10b RGB 4k over hdmi-hdmi.

But now what i suspect is RGB colors are different from hdmi 2.1 port and usb-c port. Because even if we run at 8b RGB over hdmi, the auto black level should set it to high, but its setting it to low. which means there is a signal difference between hdmi 2.1 port and usb-c port

Also there is color differences coming for the same RGB signal coming from hdmi 2.1 port and usb-c.

Why couldn't apple just provide a simple switch for RGB and YCBCR, i will never know. when they clearly know they are selling mac mini and till today no way to configure external displays correctly like in windows.

@GetVladimir
Copy link
Author

@traderdude123 Maybe the USB-C adapter that you have does some kind of active conversion to HDMI, that might be the reason why it gets hot as well.

At the moment, I don't know of any other way to activate the 10 bit RGB color except with the plist files.

And you're right, all this would be so much easier if the setting to choose RGB color and range was added by Apple in the System Settings.

@traderdude123
Copy link

@GetVladimir

Can you test on your monitor or TV if RGB either 8b or 10b coming from hdmi and usb-c port are same or different?

Try testing some random images.

Let me know , because now this is another new issue i think we will face.

I just want to know if its just my particular TV or this issue is in general affecting all m1/m2 mac minis.

@GetVladimir
Copy link
Author

@traderdude123 Yes, of course. I have an USB-C to DisplayPort connection and also HDMI-to-HDMI connection.

I can confirm that both of these connections output the same when using RGB color output on my monitor.

On my TV, I can test only HDMI-to-HDMI, but I don't have any USB-C to HDMI adapters, and the TV only accepts HDMI.

My guess is the adapter might be causing the discrepancy.

At the moment, I can't test 10-bit on my Monitor, as neither the Monitor or the M1 Mac mini HDMI port supports it.

@traderdude123
Copy link

traderdude123 commented Apr 15, 2023

@GetVladimir

I got RGB 10b 4k over hdmi-hdmi.

This is another alternate way of getting there. Below are the steps. I almost feel bad for dev of BD.Below method is for users whos trial has expired for BD and do not want to pay for the license.

  1. Create a new user ( this is going to be temporary)
  2. Install BetterDisplay, you should now get 14-day trial.
  3. Extract EDID using BD.
  4. Install AW Editor to modify EDID.
  5. Edit the EDID using AW Editor and remove all references to YCBCR and make EDID version 4.
  6. Upload the EDID using BetterDisplay. Steps 3-6 can be skipped if you already have a modified EDID and ready to upload.
  7. Now you should get RGB 10b for all users on your system.
  8. Switch to Original user, it should now have RGB. Reboot and login to original user to verify you have RGB 10b.
  9. Delete the temporary created user.
  10. Done.

Note: Do not go into sleep , you might lose RGB.

Coming back to RGB vs YCBCR differences.

The macOS is sending RGB Full(high) by default to the TV. if the TV is set to Auto black level it will set black level to high.This confirms that macOS is sending RGB Full and not Limited. Which is correct and this can be verified on lagom test Black levels page. I will refer to RGB Full as RGB High and RGB Limited as RGB Low.

In the lagom Black level test ,if RGB Low is set on TV, you can see that 1-15 Blacks will be too dark to see and that is correct. if you are seeing greys or even visible dark , then your monitor needs calibration.if RGB full is set on TV, you can and should see all blacks from 1-15.

However , Limited RGB(low) can give deeper blacks and better contrast and some users may prefer this.One use case for this is Coding on OLED Monitors/TV. for e.g. i do coding on Xcode and RGB limited(low) is much better as everything is deep dark on OLEDs. Also images looks better due to better contrast.

But when consuming videos , Limited RGB will make dark scenes very dark and Full RGB or better yet YCBCR444 is the best. you can compare this by running a video on your browser and check all three options 1. RGB High 2.RGB Low 3. YCBCR444. You can then choose your preference.

Edit: In summary , the weird thing is with Full RGB as source(macOS) and TV set to RGB Low, we lose the black and white details as they get crushed, but what we lose in some black/white details , we gain in color vibrancy and deeper blacks which some may enjoy for certain use cases. This is more so suitable for an OLED display. Please test and let me know what you all prefer. Another benefit is the text clarity is somewhat improved on RGB Low compared to RGB high/Full.

@domscr2
Copy link

domscr2 commented Apr 17, 2023

@GetVladimir just wanted to say thanks again for your support and engagement. Been subscribed to the gist in the event of changes such as the ones we've been having for the past month, been expecting issues and finally had them. Updated my 2020 M1 MacBook Pro to 13.3.1 and implemented the new manual fix and it's worked. Hopefully no more issues for a couple more months

@Strate
Copy link

Strate commented Apr 17, 2023

I realized, that RGB set only after I restart my monitor (power off and then power on).

@GetVladimir
Copy link
Author

@domscr2 thank you so much! I appreciate that and I'm glad to hear that the new manual fix works

@andreilica
Copy link

andreilica commented Apr 21, 2023

Hello @GetVladimir ! I have tried all of the methods suggested here (edit /Library/Preferences/ file, also ran those commands using the plist tool) and also in the comments (including EDID editing using BetterDisplay) and I cannot get my monitor to receive RGB signal at all (only YCbCr). System: MacBook Air M1 13", Display: Dell U2722D, connected the display to the laptop through HDMI using the Anker 555 (8 in 1) hub which supports 4k@60Hz on the HDMI Port. Am I missing something? What should I try to do next?

@GetVladimir
Copy link
Author

@andreilica thank you for your comment and I'm sorry to hear that.

Please try it with a direct connection between the MacBook and the monitor, with USB-C to DisplayPort cable if possible.

If that works, it might mean that the HDMI on the hub is not capable of outputting RGB color

@Strate
Copy link

Strate commented Apr 21, 2023

@andreilica hello, i've ran into same issues. Restarting monitor with power button helped. I use WavLink thunderbolt docking station

@andreilica
Copy link

@GetVladimir I currently don't have that type of cable available. The HUB is outputting RGB color to this monitor when hooked up to a Windows PC with USB-C Thunderbolt, so I don't think it's a hub issue. @Strate I have tried that multiple times after running the plist commands or editing the /Library/Preferences/ file with no success.

@GetVladimir
Copy link
Author

GetVladimir commented Apr 21, 2023

@andreilica thank you for the info that it works on a Windows PC. That means there might be a chance yet to make it work.

Please try again one more time by deleting both plist files and removing any other changes that you've done.

Then only apply the steps here: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8#alternative-terminal-commands-to-force-rgb-color-output-on-m1-and-m2-based-macs-and-workaround-for-losing-rgb-color-after-waking-up-from-sleep

There is one catch though. In macOS 13.3.1, the plist files seem to be ignored when waking up from sleep. It only works after reboot.

If the hub does something similar to the connection like waking up from sleep every time is connected, macOS will not recognize it properly and output YCbCr color, even if you did everything correctly.

A temporary workaround might be to reboot the Mac after connecting the hub.

A more permanent solution would be either to use a separate USB-C to DisplayPort cable only for the monitor, or a future macOS update to fix the issue.

@andreilica
Copy link

andreilica commented Apr 21, 2023

After deleting the files, the commands won't work anymore as it doesn't find any file inside ByHost:
image

If I make any changes to the display settings the file appears and the commands can run. But after I run them and I restart, still no change. My display still shows YCbCr :(.

@GetVladimir
Copy link
Author

@andreilica thank you for the update.

It seems that the M1 just doesn't play nice with this hub, at least on this version of macOS.

The other suggestion I can make is to try with the USB-C to DisplayPort cable if possible

@csergiu
Copy link

csergiu commented Apr 25, 2023

So currently on Ventura 13.3.1 there is no way to get the monitor to stay in RGB after resuming from sleep? 😞

My setup: MBP 14" M1 w/ Dell P3421W w/ USB-C <-> USB-C

@GetVladimir
Copy link
Author

GetVladimir commented Apr 25, 2023

@csergiu yes, you'll need to reboot to fix it or prevent it to go to sleep.

Although, from the details of your specific setup, you can try using an USB-C to DisplayPort instead of USB-C to USB-C cable. That might fix the issue

@zhxst
Copy link

zhxst commented May 6, 2023

My MacBook is M1 and my external display was fine on Monterey. Updated to Ventura 13.3.1(a) yesterday and the display was ruined. The black turned into purple and the white turned into some kind of yellow. After some dig I found here.
So here is the result, the solution partially worked, but only in the login screen. After logged in, the external screen go black for half second, and it's purple and yellow again.
I use a hub and HDMI cable. Does things goes worse with the (a) patch? I don't know.
I don't know if it is because my display doesn't support YPbPr or Ventura changed something.

Thank you for your kindness and this article. At least I can confirm it's a YPbPr issue, and there is still hope to solve it.


BetterDisplay to force RGB works. Thanks to @traderdude123
Finally the screen not purple and yellow any more!

  • The options to get and set EDID is in the bottom of the menu with the gear button. Find your monitor under the Display tab.
  • Retrieve EDID Data and Export EDID binary.
  • Do edit the EDID binary with AW EDID Editor. It's free.
  • In the Version & Revision page, change Revision to 4.
  • Then you can turn off any YCrCb option in Feature Support page.
  • Check CEA Extension sector and turn off any YCrCb option.
  • Save the file.
  • Upload EDID Binary and Apply EDID.
  • remember to uncheck the Restore factory EDID on quit.

Does anybody know what does BetterDisplay do when upload and apply the EDID? Maybe there is a way to make it automatic.

@GetVladimir
Copy link
Author

@zhxst thank you for your comment.

You can try the new alternative method to fix RGB color output after login: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8#alternative-terminal-commands-to-force-rgb-color-output-on-m1-and-m2-based-macs-and-workaround-for-losing-rgb-color-after-waking-up-from-sleep

The issues usually started with the later Ventura updates, but the (a) doesn't seem to make any difference.

@zhxst
Copy link

zhxst commented May 6, 2023

@zhxst thank you for your comment.

You can try the new alternative method to fix RGB color output after login: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8#alternative-terminal-commands-to-force-rgb-color-output-on-m1-and-m2-based-macs-and-workaround-for-losing-rgb-color-after-waking-up-from-sleep

The issues usually started with the later Ventura updates, but the (a) doesn't seem to make any difference.

The alternative method doesn't work on MacBook, because the first display is the internal one.
Manually modified files under ~/Library/Preferences, and it worked. Thank you @GetVladimir

@GetVladimir
Copy link
Author

@zhxst Awesome! Thank you for the update and I'm glad to hear that you got RGB color output working

@traderdude123
Copy link

@zhxst

you don't need to keep running the BD to force RGB. To make sure that RGB change is permanent.Do the below steps.

  1. Make sure the interface is DisplayPort, even if you connecting using hdmi-hdmi or usbc-hdmi. It does not matter.

image

  1. After making all the EDID changes. Enable and then disable HDR in the macOS display settings. This will add the required entries in windowserver plist file to keep the RGB change permanent.

You can then uninstall BD if you don't use it.

These two steps make sure that RGB change is permanent with out BD requiring it apply the EDID every time you reboot.

Let me know how it goes.

@LetrixZ
Copy link

LetrixZ commented May 7, 2023

I have a strange problem on my G27Q with DP through a dock.
Using ForceRGB works always fine for 60 Hz.
But when using 120 Hz, I lose RGB (SD 170M-A appears on the top list) after disconnecting the display. If I switch back to 60 Hz, it outputs RGB again but to use 120 Hz again, I have to re-apply ForceRGB (or just restart, probably).
Is there any solution to this? I would like to use 120 Hz on macOS.

I bought a USB-C to DP cable to try. It should arrive on monday.

@GetVladimir
Copy link
Author

@LetrixZ Thank you for your comment and the details. Glad to hear that you got RGB color output working at 60 Hz.

You can try modifying the display plist file and set it to 120 Hz there, so that you don't need to reconnect the display and lose the RGB.

The DisplayPort cable that you ordered is very likely to work without any further modifications needed

@LetrixZ
Copy link

LetrixZ commented May 8, 2023

It works great!
1440p 120 Hz with RGB output always. 144 Hz not though.

It also now shows a variable (48-144 Hz) refresh rate option but is doesn't ouput RGB anymore with it.
image

The only problem now is that I have used the two ports :S. More to connect and disconnect.

@GetVladimir
Copy link
Author

@LetrixZ thank you so much for the update and I'm glad that it works!

If you like, you can write the specific cable model that you used as a reference

@LetrixZ
Copy link

LetrixZ commented May 8, 2023

It's a generic cable.
Here is a photo of the bag it came in and the pictures in the product listing: https://imgur.com/a/HaaKLU0

@GetVladimir
Copy link
Author

@LetrixZ great, thanks for posting it. Good to know

@LetrixZ
Copy link

LetrixZ commented May 9, 2023

@GetVladimir, out of curiosity, would a DP to HDMI adapter affect any of this? I would like to free my only DP port.

@GetVladimir
Copy link
Author

GetVladimir commented May 9, 2023

@LetrixZ I'm not sure how well that would work, as it might require an active conversion of the signal. This could introduce latency and other issues, so I can't really recommend it unless you really just want to test it

@lb2112
Copy link

lb2112 commented May 18, 2023

Has anyone been able to get RGB mode working with an M1 MacBook Air (2020) and the newer range of Dell Ultrasharp monitors, e.g. the U2723QE or U3223QE over USB-C (DP-alt/PD) with USB-C Prioritization set to High Data Speed? I am using Ventura 13.3.1 (a).

The .plist editing solution here does not seem to work. Setting the USB-C Prioritization to High Resolution does give RGB, but then all USB peripherals and the integrated GbE input all drop back USB 2.0 speeds. No good.

A USB-C to DP cable does give RGB also, but the whole point was to use the single USB-C cable with PD/DP-alt/USB hub features. I am using this cable - https://www.officeworks.com.au/shop/officeworks/p/comsol-100w-usb-c-thunderbolt-3-cable-20gbps-2m-black-coctb3200 - so there should be no bandwidth issues. I have tried other USB-C cable (Dell supplied ones) and they give the same result.

I recently sold my 14" M1 Pro MBP and it just worked in RGB mode with the same monitor, cable and USB-C Prioritization set to High Data Speed. I did start with that MBP from Monterey 12 with a Dell U2720Q and had to do the .plist editing solution mentioned here to force RGB from YPbPr and it did work for me and seemed to stick eventually. Once I sold the U2720Q to upgrade to the Dell U3223QE, the 14" M1 Pro just worked in RGB straight away, no .plist workaround needed.

Now I've switched to an M1 MacBook Air, I am back to square one. Any got any ideas?

@GetVladimir
Copy link
Author

@lb2112 thank you for your comment. That is interesting to know.

So basically the M1 Pro had RGB color output when selecting High Data Speed prioritization, but the standard M1 doesn't, all else being the same?

@GetVladimir
Copy link
Author

GetVladimir commented May 18, 2023

Update: 2023-05-18 and macOS Ventura 13.4

Just wanted to update regarding macOS Ventura 13.4. I've tested the update and the RGB color output issue is not fixed.

Also, the issue with reverting from RGB color to YCbCr after sleep/wake is not fixed either.

At this point in the Ventura cycle, it doesn't seem like Apple will address or fix any of the issues.

The procedure to Force RGB Color Output and the Alternative methods in the original post still work.

@traderdude123
Copy link

@GetVladimir

I finally got fed up with rebooting to force RGB every time and bought the Betterdisplay and now even after sleep/wake , I get RGB. Also I m able to fine tune the EDID settings like audio, resolutions..etc.

How is it that BetterDisplay is able to fix these issues while apple can't. I have now given up hope with Apple and just get the BD utilitlty for 17$ and move on with our lives.

I m on the latest 13.4.

@GetVladimir
Copy link
Author

@traderdude123 thank you for the info.

It seems there are a lot of bugs that haven't been fixed in macOS, iOS and tvOS for years now. RGB color output is just one of them

@lb2112
Copy link

lb2112 commented May 20, 2023

@lb2112 thank you for your comment. That is interesting to know.

So basically the M1 Pro had RGB color output when selecting High Data Speed prioritization, but the standard M1 doesn't, all else being the same?

Hi Vlad, thanks for your response. Yes, the M1 Pro would give RGB output on the same Dell U3223QE monitor and cable as the standard M1 would not, all else being "mostly" the same. The M1 Pro (14" MBP) started with Monterey 12 and a Dell U2720Q. With that combo, the .plist editing trick did work and got it switched from YPbPr to RGB. When I swapped to the Dell U3223QE and upgraded the M1 Pro to Ventura 13, RGB stayed so I didn't need to do .plist edit again.

Now I've started from scratch with an M1 MacBook Air and Ventura 13 out of the box, the .plist edit doesn't work.

@lb2112
Copy link

lb2112 commented May 20, 2023

@GetVladimir

I finally got fed up with rebooting to force RGB every time and bought the Betterdisplay and now even after sleep/wake , I get RGB. Also I m able to fine tune the EDID settings like audio, resolutions..etc.

How is it that BetterDisplay is able to fix these issues while apple can't. I have now given up hope with Apple and just get the BD utilitlty for 17$ and move on with our lives.

I m on the latest 13.4.

@traderdude123 - how do you edit the EDID to force RGB with BetterDisplay? I tried the free version but could't find it. Is it only on the Pro version?

@traderdude123
Copy link

@lb2112

you will need BetterDisplay Utility and AW EDID Editor. Download these two utilities and install. Once installed.

  1. Extract the EDID of you current connected monitor using the BetterDisplay Tool. How to extract is quite simple. Extract the EDID file with .bin extension. let's call this file : Monitor.bin.
  2. Open AW EDID Editor and open the Monitor.bin file. Once opened, you should find references to RGB and YCBCR options. The references will be different for different monitors/TV. Switch off/Turn off all references to YCBCR and Keep on RGB.
  3. Note only remove or turn off references to YCBCR and do not delete any sections of the EDID. Once modification of EDID is done. Save to a separate file. Lets call this file: Modified_EDID_Monitor.bin.
  4. Open BetterDisplay Utility again, there is an option to upload the EDID. Upload the Modified_EDID_Monitor.bin and hit apply. No need to reboot.
  5. your monitor should now switch to RGB.
  6. Make sure to run BetterDisplay at startup. It will apply the EDID on startups/reboots/sleep/wakeups.

I suggest you buy the Better Display utility, because there is no free way to force the RGB as of now. There is an alternate free way to do all the above , but it's too much hassle to just switch and force RGB. Hence the recommendation to just buy the utility.

Apple is too busy doing important things like making new emojis and if they find sometime they will give options/feature to control our external monitors. but I wouldn't hold my breath as providing such a feature or options is a conflict of interest for them. As a result of this, we will need to depend on third party developers if we intend to use non-Apple external monitors with Macs.

Also , don't bother contacting apple regarding this issue. They are completely clueless that people use non Apple external monitors. They somehow believe people only buy Apple Monitors with Mac minis. I don't know which world they are living in.

@lb2112
Copy link

lb2112 commented May 20, 2023

@lb2112

you will need BetterDisplay Utility and AW EDID Editor. Download these two utilities and install. Once installed.

@traderdude123 - Got it, thanks for the detailed steps. I have done all of them now and uploaded a modified EDID. I get RGB, but am limited 30Hz 👎

My Dell U3223QE is a native 4K 60Hz monitor, but it seems that when setting the USB-C Prioritization to High Data Speed, then RGB 4:4:4 at 3840 x 2160 @ 60Hz and full USB3 data hub speeds is too much for the M1 MacBook Air. Setting USB-C Prioritization to High Resolution does give RGB 4:4:4 at 3840 x 2160 @ 60Hz without any EDID editing, but then all USB peripherals and the integrated GbE input all drop back USB 2.0 speeds. :-1:

I am sure the M1 MacBook Air is DisplayPort HBR3 over USB-C compatible (second paragraph of this post explains it - https://www.dell.com/community/Monitors/U2720Q-MacBook-Pro-29Hz/m-p/7532963/highlight/true#M124822) but maybe I am wrong...? Or maybe the YPbPr mode does looks good enough... 🤔 getting sick of all messing around.

@traderdude123
Copy link

@lb2112

Can you share your unmodified original EDID file?

@lb2112
Copy link

lb2112 commented May 20, 2023

@lb2112

Can you share your unmodified original EDID file?

Here's the Base64 bin file content (didn't have a handy spot to attach/drop the .bin file) <<- Nope, that's a bad idea. Will share a file.

@traderdude123
Copy link

@lb2112

I m unable to load it in AW EDID editor. says invalid EDID.

can you share the .bin via some file sharing site and provide a link?

@lb2112
Copy link

lb2112 commented May 20, 2023

@lb2112

I m unable to load it in AW EDID editor. says invalid EDID.

can you share the .bin via some file sharing site and provide a link?

Sure thing - here it is: https://we.tl/t-FTLvqatrhV

@traderdude123
Copy link

@lb2112

Don't know if this will help. https://we.tl/t-wsTUrloRMb

but try this modified edid. If this does not work. you may have to remove some unused sections in EDID and try again.

@lb2112
Copy link

lb2112 commented May 20, 2023

Don't know if this will help. https://we.tl/t-wsTUrloRMb

but try this modified edid. If this does not work. you may have to remove some unused sections in EDID and try again.

@traderdude123 Will give it a go. Thanks. Can I ask what you changed in it? My modified one already removed the 3 references to YPbPr using AW EDID editor.

@lb2112
Copy link

lb2112 commented May 21, 2023

https://we.tl/t-wsTUrloRMb

Don't know if this will help. https://we.tl/t-wsTUrloRMb
but try this modified edid. If this does not work. you may have to remove some unused sections in EDID and try again.

@traderdude123 Will give it a go. Thanks. Can I ask what you changed in it? My modified one already removed the 3 references to YPbPr using AW EDID editor.

@traderdude123 just gave your modded EDID a go. BD applied it correctly, so it was all good. It was mostly same as my mod attempt (I also dropped to 8bit colour depth) but it again dropped the monitor to 30Hz for 4K resolutions. I don't think the little M1 MacBook Air can handle the USB3 data transfer speeds and 4K @ 60Hz, RGB 4:4:4 colour space. Looks like I might have to go with two cables - one USB-C > USB-C for USB data, and USB-C to DisplayPort for video.

Thanks again for your help.

@lb2112
Copy link

lb2112 commented May 21, 2023

OK, was actually happy to leave it YPbPr mode as it looked good enough, but am now noticing that certain shades of grey (e.g. some website backgrounds) are creating a flickering effect in this mode, when covering a certain percentage of the screen (around 75% or more). RGB doesn't have the same issue. Other M1 users have reported this as a problem with some other Dell monitors, like the S2722QC. Not sure where to head with this other than the dual cable solution.

@traderdude123
Copy link

@lb2112

But M1 Macs can do 6k @ 60 hz connected to an external monitor(from apple website specs). So 4k@60hz shouldn't be a problem. yes the RGB requires full bandwidth compared to YPbPr. In YPbPR mode , I m not sure if it does full chroma or does it to chroma sub sampling. In either case, a monitor like that should be able to do 4k@60hz easy with the M1 Macs. Even prior intel Macs could do 6k @ 60hz.

I would also suggest to check connecting your M1 Mac with any other 4k 60hz monitor or TV. Just to make sure Monitor is not the issue.
Does your monitor require a firmware update?

@law94air1976
Copy link

will this work on intel macs? I have a MacPro 5,1 running Monterey 12.3 - LG C1 OLED and RX 6600XT with HDMI 2.1 - getting 4k@120 ybr420 but would like RGB for better text quality.

@GetVladimir
Copy link
Author

@law94air1976 no, this procedure only works for M1 and M2 based Macs.

However, there are other scripts that already work great for x86 based Macs. You can try:
https://gist.github.com/ejdyksen/8302862
or
https://gist.github.com/adaugherity/7435890

@traderdude123
Copy link

@law94air1976 ,

you will not get 4k 120hz RGB 444 on intel Macs either with a MacPro or a e-gpu. Apple has deliberately limited it to 4k 60hz RGB 444 on the AMD 6000 Cards.

I even tried with a DP 1.4 to hdmi 2.1 adapter with VM700 chipset with the firmware that gives 4k 120hz RGB 444 using USB-C to hdmi 2.1 adapter. The same adapter(USBC-HDMI2.1) gives 4k 120hz RGB 444 with Apple silicon Macs. So intel is a no go.

@marekdvorak81
Copy link

Hi, I'm on Ventura 13.3, my DELL U3014 switched to RGB after modifying the files in /Library/Preferences and ~/Library/Preferences/ByHost.
After restart the files were overwritten removing the "LinkDescription" section. I locked the file in /Library/Preferences, the file is not being modified and I get RGB after restart, however it still resets to YPbPr when going back from sleep, even though the files are not overwritten. Any hints here?

@GetVladimir
Copy link
Author

@marekdvorak81 Thank you for your comment.

You did everything correctly. There is an issue in newer versions in macOS which will switch to YCbCr after waking up from sleep.

At the moment, the workaround is to reboot the Mac or prevent it going to sleep

@traderdude123
Copy link

@marekdvorak81 and @GetVladimir

As a paid alternative , might I suggest Better Display. with Better Display , you don't need to reboot after going to sleep. It retains the RGB Settings without even a screen refresh.

Please note I m not in any way affiliated with Better Display. This recommendation is purely based on my experience as a paid users of Better Display.

As of now this is the only working solution that meets the users requirements. The rebooting just to keep the RGB settings is a real pain in practice. That's why I bought BD.

Don't get me wrong @GetVladimir , but this plist modification method is a hit or a miss. but BD Utility is a sure way.

@taylor325
Copy link

taylor325 commented May 28, 2023

Ok guys! I figured how to get always working RGB for ALL SCREENS with GetVladimir method + BetterDisplay.
YESSS!!!!! No more reboot needed! 😎
I followed @GetVladimir + @traderdude123 methods + added more instructions.

You need BetterDisplay and AW EDID Editor apps. (BetterDisplay is free for 14 days, AW EDID Editor is free. 🤩)
Open BetterDisplay.
Go to: Settings -> Displays -> Retrieve display EDID (Extended Display Identification Data)
Retrieve EDID Data -> Export EDID Binary -> Save EDID.bin file to desktop (Use OS Managed method)

screen 1

Open AW EDID Editor and file -> Open your saved EDID.bin file from desktop.
Go to: Header -> Monitor suport and turn off YCrCb 4:4:4 + YCrCb 4:2:2 options. Don't touch for other options!
Save as your modded EDID for desktop with EDID modded.bin file name.

screen 2

Open BetterDisplay again.
Go to: Settings -> Displays -> Custom display EDID (Extended Display Identification Data)
-> Upload custom EDID for this display -> Upload EDID Binary -> Load your saved EDID modded.bin file.
Click Apply EDID Now and your monitor instantly get RGB! 😎
Click EDID override options -> Automatically apply custom EDID upon detection of this display.
Click Preserve continuity in case of an EDID display identity change.
Click Restore factory EDID on quit.
Use my settings for safe!

screen 3

Make sure to run BetterDisplay at startup!

screen 4

Reboot and enjoy RGB screen! 😎

Additional information: If you need RGB screen on login screen you still need this and this procedures for perfect work!

@GetVladimir
Copy link
Author

@taylor325 Thank you so much for the info and for the detailed instructions! I'm glad to hear that you got RGB color output working fully

@Anatharias
Copy link

@taylor325 You're the best !!! Thanks for sharing with the community ! Shame on Apple for not allowing this out of the box

@LetrixZ
Copy link

LetrixZ commented Jun 5, 2023

@taylor325 @GetVladimir do you think this could be done without BetterDisplay?
I would like to try first but my trial already expired a few months ago.
I would like to keep using my USB-C Hub for display output instead of the adapter.

EDIT: Seems like it's working fine after applying this workaround. RGB with 120Hz. Even with HDMI through the same dock :)

@GetVladimir
Copy link
Author

GetVladimir commented Jun 6, 2023

@LetrixZ Thank you so much for your comment!

Yes, the alternative procedure still works without the need to use any 3rd party apps, as you've mentioned.

It's interesting to see if the new macOS 14 Sonoma Beta released today addresses any of the issues.

@Averyy
Copy link

Averyy commented Jun 13, 2023

@GetVladimir I had to get an RMA replacement for my dell ultrasharp that died and since then I haven't been able to get it to set to RGB. On latest 13.4 one monitor connected by USB-C and one via HDMI (both 4k dell ultrasharps).

Tried everything here and nothing is working. I previously had it working fine via editing the plist file but since the new one I can't get it to go to RGB. I also tried stationary+locking it and no luck.

Any tips or has anything changed?

@GetVladimir
Copy link
Author

@Averyy thank you for your comment.

The procedure still works on 13.4. My suggestion would be to try and switch the monitor cables (connect the new one to USB-C and the other to HDMI) and try to modify the plist file again.

@Averyy
Copy link

Averyy commented Jun 13, 2023

And it should work on HDMI as well as USB-C?

Inside the plist file do I only put it in the 2 places at the top of the file? or every where?

@GetVladimir
Copy link
Author

@Averyy yes, it should work for both connections.

For USB-C to DisplayPort cable, you don't even need to modify the plist file.

However, since it's hard to determine which monitor is which, you need to add the LinkDescription key to each UUID, since each one is representing a different connected monitor

@Averyy
Copy link

Averyy commented Jun 13, 2023

@GetVladimir ok thanks for the help. I'll order new monitor cables and try again. Will get a usbc-dp to make the one monitor easy, and then for the hdmi one hopefully a new cable does the trick.

@GetVladimir
Copy link
Author

@Averyy not a problem, I'm glad if it helps.

Let us know how it goes

@taylor325
Copy link

taylor325 commented Jun 14, 2023

@taylor325 @GetVladimir do you think this could be done without BetterDisplay? I would like to try first but my trial already expired a few months ago. I would like to keep using my USB-C Hub for display output instead of the adapter.

EDIT: Seems like it's working fine after applying this workaround. RGB with 120Hz. Even with HDMI through the same dock :)

Hello @LetrixZ Maybe they will fix the bug in macOS Sonoma. BetterDisplay is first aid for me for every day life with M1 Mac.

@entropyconquers
Copy link

Automating RGB Color Force on M1/M2 Macs

Hello @LetrixZ @taylor325 @Averyy @Anatharias @traderdude123 @marekdvorak81

I have created a script that automates the steps mentioned by @GetVladimir to force RGB color mode on external monitors for M1/M2 Macs. I have tested it on a Mac Air with M1 chip.

You can find the script and its instructions in the following repository: Force-RGB-Color-on-M1-M2-Mac-Script

Feel free to try it out and update this README if it works for you as well. Cheers!

@GetVladimir
Copy link
Author

GetVladimir commented Jun 18, 2023

@entropyconquers awesome work, thank you so much for creating the script and for sharing it!

I will check it out and update the post as soon as I'm in front of a computer.

Update: I've added a link to the script in the original post: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8#apps-based-on-this-method

@traderdude123
Copy link

@entropyconquers

you could write the entire script in python. why write half in bash? any particular reason?

In any case , good effort. Appreciate it.

@mafeko
Copy link

mafeko commented Jun 19, 2023

Thanks a ton @GetVladimir and @entropyconquers for your efforts. struggled a long time with my M1 you made my day 🎊 🚀

@entropyconquers
Copy link

@entropyconquers

you could write the entire script in python. why write half in bash? any particular reason?

In any case , good effort. Appreciate it.

@traderdude123 for some reason running python with sudo was not enough to copy and move/rename the plist file from /Library/Preferences.

I tried writing the whole thing with bash but modifying JSON/XML is a nightmare in bash without any external dependency.

@GetVladimir
Copy link
Author

@mafeko thank you so much for your comment and I'm glad to hear that you got RGB color output working

@traderdude123
Copy link

traderdude123 commented Jun 19, 2023

@entropyconquers
can you try this.

Write entire thing in python
then

  1. chmod +x pythonscript.py
  2. sudo -E pythonscript.py

@carlosvigil
Copy link

Thanks @taylor325 @GetVladimir ! It's been years and I can finally calibrate my monitors with some reasonable confidence.

@GetVladimir
Copy link
Author

@carlosvigil Awesome! Thank you so much for your comment and I'm glad to hear that you got RGB color output working

@Kimbo0o
Copy link

Kimbo0o commented Jun 23, 2023

For some reason these methods only work if I keep my MacBook Air M1 opened. If I close the lid or connect my Monitor with the lid closed it uses YPbPr. I would prefer to run my Macbook in Clamshell mode but I can't.
The only way to get RGB working with a closed lid is right after a reboot. But then the USB Hub in my Monitor (Dell P3421W) won't work.

@GetVladimir
Copy link
Author

@Kimbo0o yes, you're right. The more recent versions of macOS Ventura reset the RGB color when waking the MacBook from sleep.

One workaround is to reboot it or prevent it from going to sleep.

I'm not sure how that will work with your USB hub though. It might be better to connect your monitor directly to the MacBook in that case

@asipirn
Copy link

asipirn commented Jun 27, 2023

@marekdvorak81 and @GetVladimir

As a paid alternative , might I suggest Better Display. with Better Display , you don't need to reboot after going to sleep. It retains the RGB Settings without even a screen refresh.

Please note I m not in any way affiliated with Better Display. This recommendation is purely based on my experience as a paid users of Better Display.

As of now this is the only working solution that meets the users requirements. The rebooting just to keep the RGB settings is a real pain in practice. That's why I bought BD.

Don't get me wrong @GetVladimir , but this plist modification method is a hit or a miss. but BD Utility is a sure way.

Thank you for all your suggestions. The color issue with the external monitor can be quite frustrating, and I'm interested in trying the troubleshooting methods you provided. However, I have some questions now. Can I get help from you regarding the implementation of using the BD to modify EDID and upload it? Is this implementation done at the software level or does it directly modify the firmware of the display? If it modifies the firmware of the display, will it lead to any missing features when other devices are connected to this display? I would greatly appreciate it if you could find some time to answer my questions!

@traderdude123
Copy link

@asipirn

Modifying and uploading of EDID is done at a software level. There is no modification of firmware of the display.

To modify the firmware of the display , only the manufacturer of the display can provide the utility to do so. not a 3rd party utility like BD.

BD allows you to reset the EDID to original at any time. you can check the BD GitHub page for more details.

@JamieRosenberg
Copy link

@GetVladimir Any advice on how to do the almost opposite, I want to force YCBCR444 (for whatever reason looks far better on my projector). Any idea what the values should be for this?

@GetVladimir
Copy link
Author

@JamieRosenberg thank you for your question. Yes, the Pixel Encoding should be set to 1 and this would usually give you YCbCr color output.

Not sure whether it will be 4:4:4 though.

@vittau
Copy link

vittau commented Jul 3, 2023

I updated my work Mac to Ventura 13.4.1 last Friday, and today I plugged it on my monitor via HDMI and suddenly the colors were fixed!
Not sure if they changed something, or if it's just temporary luck on my side. Anyone else had a similar experience?

@GetVladimir
Copy link
Author

@vittau thank you for the comment.

That is awesome! I haven't heard more reports about it, but it would be great if they fixed it

@mafeko
Copy link

mafeko commented Jul 3, 2023

Confirmed on my end as well @vittau . 🎊 😍 finally !

@GetVladimir
Copy link
Author

@mafeko thank you for the confirmation! That is awesome

@jacek-jablonski
Copy link

I updated my work Mac to Ventura 13.4.1 last Friday, and today I plugged it on my monitor via HDMI and suddenly the colors were fixed! Not sure if they changed something, or if it's just temporary luck on my side. Anyone else had a similar experience?

does it mean it should output RGB on HDMI by default? For me, the output is still YPbPr. MacOS 13.4.1.

@vittau
Copy link

vittau commented Jul 6, 2023

It's not consistent apparently, sometimes it's fixed, and sometimes it's not...
EDIT: It appears to break after sleeping, and then fixes itself again after restarting.

@zhxst
Copy link

zhxst commented Jul 7, 2023

It's not consistent apparently, sometimes it's fixed, and sometimes it's not...
EDIT: It appears to break after sleeping, and then fixes itself again after restarting.

It definitely not fixed the problem after sleeping.

@esmorun
Copy link

esmorun commented Jul 8, 2023

I have found that as soon as the screen goes to sleep or I unplug it, the fix no longer works. A reboot solves the problem but only as long as you keep the screen awake. Any solution for this?

@traderdude123
Copy link

@esmorun

Paid - Yes.
Free - No.

Best bet would be Sonoma. But its still in beta so not recommended.

@jacek-jablonski
Copy link

@traderdude123 does Sonoma beta fix the problem or just a guess?

@esmorun
Copy link

esmorun commented Jul 8, 2023

@traderdude123 Has it been confirmed fixed in Sonoma? The bug has been around for as long as I have had my M1 air so I wouldn't count on Apple ever fixing the bug.

By the way you should all make sure to send a report to Apple: https://www.apple.com/feedback

@traderdude123
Copy link

traderdude123 commented Jul 9, 2023

@jacek-jablonski
@esmorun

I have not tested on Sonoma. waiting for public release.

But i have read reports from other users who are using beta. They are even getting 4k 120hz RGB 10 bit with AMD 6000 Series cards on hackintosh's as well. This was not possible on Ventura. So its high likely that the sleep issue could be fixed on Sonoma.

if anyone is brave enough to test it on beta. It would be great. If anyone does test it. please let us know.

@GetVladimir
Copy link
Author

I've just tested it on Sonoma Developer Beta 3. I've deleted all the display plist preferences files and started fresh.

Here are the results:

  • The HDMI to HDMI connection still defaults to YCbCr Color Output (as usual)
  • The USB-C to DisplayPort connection defaults to RGB Color Output (as usual)
  • Forcing RGB Color output still seems to work with the original procedure of modifying the plist files
  • Modifying the display plist files still works with the alternative version
  • After the plist files are modified, putting the Mac to sleep and waking it, it seem to keep the RGB Color output (so this one seems to be fixed, at least on a M1 Mac mini)
  • There was a strange issue with the Magic Mouse connecting and disconnecting every few seconds after restarting Sonoma a few times. Turning off the Magic Mouse and turning it on seems to fix this for the moment.

@traderdude123
Copy link

traderdude123 commented Jul 9, 2023

@GetVladimir

Thanks for the confirmations. Finally, some progress.

Also the HDMI-HDMI defaulting to YCBCR is actually correct since HDMI is predominantly used by TVs and YCBCR gives the best picture quality. However if you want to use it as a Monitor we need RGB. But normally its not expected that people use TV as monitors.

For monitors , USB-C/DP is primary connection and hence defaults to RGB , which is also the correct thing to do.

But what apple needs to provide is a user selectable option in the Display section of settings for YCBCR or RGB.

@GetVladimir
Copy link
Author

@traderdude123 not a problem, thanks for the reply.

Yes, indeed. It seems that Sonoma is getting more optimized than Ventura ever was

@DeepSubMicronMusic
Copy link

Hi @GetVladimir , many thanks for this info, I have just fixed a new M2 mac mini connected to an Acer widescreen monitor via HDMI (for the moment, usb->DP is the next step) using it.

However I am wondering why your examples have the Range key set to 1, which appears to give limited range colour; surely for any computer monitor, and to be honest any modern TV really, you want full range colour, which appears (visually at least, the monitor doesn't report the full format details in its OSD unfortunately) to be the case when the range key is set to 0.

@GetVladimir
Copy link
Author

@DeepSubMicronMusic Thank you for the reply and I'm glad that you got RGB color output working.

That's a good question. I don't really have confirmation that the Range key affects full and limited color (even though initially that might make sense).

The reason why I set the Range to 1 in the original tutorial is because macOS ignored the display plist file if you set it to 0.

If you can set it to 0 and macOS still accepts the plist file in the newer versions, you might want to try using that instead

@DeepSubMicronMusic
Copy link

@GetVladimir OK, so although it is a data point of one, I can say that on the latest OS release changing this value to zero for me has the effect that I would expect switching to full range, i.e. blacks are now properly black, and whites are properly white. I wish I still had access to a HDMI analyser to see what was really happening both with the signal format and the infoframes, but sadly that was a former life.

I would suggest giving it another go, for me it made a big difference to the contrast on the UI in dark mode, but more importantly shadow detail on images now looks correct rather than washed out and posterized (which is the problem that actually led me to find this post, because I recognised that it probably meant the output the format was wrong).

@GetVladimir
Copy link
Author

@DeepSubMicronMusic thank you for the info, I appreciate it. Those are good points.

I think we might need to test it connected to a TV, since those usually have options in the settings to show when they are receiving limited or full range.

Technically, they should adjust automatically on the receiving and to match the output source, but it's nicer to have full range when possible

@cooltig
Copy link

cooltig commented Jul 13, 2023

Hi Vladimir,

thank you for all your work and detailed instructions but I tried that from your Youtube video but it doesn't work. I still get fuzzy colors wenn switching my Dell monitor to RGB mode.
I have a MacBook Pro 14 (M1 Pro) and MacOS 13.4.1 (c).
Any ideas?

@GetVladimir
Copy link
Author

@cooltig thank you so much for the comment and for the details.

I'm guessing this might be the same question posted on the Reddit topic, so I'm going to post the answer here too for future reference.

If your monitor is Dell and uses USB-C to USB-C connection, please make sure to turn off High Data Speed and choose High Resolution instead in the Monitor menu.

As you've mentioned, you might also need to turn off MST and DDC/CI

@dainiusm07
Copy link

@GetVladimir Thank you very very much!

@GetVladimir
Copy link
Author

@dainiusm07 you're very welcome.

Thank you so much for your comment and I’m glad if you found the guide useful

@DeepSubMicronMusic
Copy link

@GetVladimir A quick update from my playing about. While setting up more things on the new mac I did something (possibly related to using the rectangle window manager or tinkertool to change some dock settings) which caused the display output format to reset again for my login, i.e. it was still fine for the login screen on reboot but as soon as I logged in I was back to the wrong output format.

Having backed out the changes I had been making to the dock settings and uninstalling bits of software running at login that might have been effecting it to no avail and finding that it wasn't something simple like a new display plist file appearing in my local library, I was a bit concerned that I wasn't going to be able to get the output format back to what I wanted. So I had a step back and a bit of a think about what was going on.

I came to the conclusion that the advice to delete the user specific display plist in ByHost was probably mistaken and that the better advice would be to make the same plist property changes to both the system file and the local user version of the file. As I had saved the original before deleting it (I hope everyone has taken that advice) I put it back with the change made and it is now working again. As a side note, this doesn't solve the problem of the screen sleeping breaking it again until reboot, but I think it is a more robust change than simply deleting the user version of the file.

@GetVladimir
Copy link
Author

@DeepSubMicronMusic thank you for the update and for the details.

Yes, the alternative method modifies the ByHost display plist file, same as you've suggested: https://gist.github.com/GetVladimir/c89a26df1806001543bef4c8d90cc2f8#alternative-terminal-commands-to-force-rgb-color-output-on-m1-and-m2-based-macs-and-workaround-for-losing-rgb-color-after-waking-up-from-sleep

Losing the RGB color output when waking from sleep was a bug in macOS, and it seems to be fixed in macOS Sonoma Beta

@dainiusm07
Copy link

It seems that when RGB output is lost after waking up from sleep it could be restored without restarting the Mac. Manual Log Out is enough to get back the RGB

@GetVladimir
Copy link
Author

@dainiusm07 yes, you're right. As long as the ByHost display plist file is modified, it should be re-read on login again.

It should technically be read on wake from sleep, but there seems to be a bug in the later versions of Ventura.

In macOS Sonoma beta, the waking up from sleep seems to be fixed already

@dainiusm07
Copy link

I managed to resolve RGB loss on wake up bug by accident on my macbook. For folks using macbooks:

  1. Unplug your monitor
  2. Restart macos
  3. Login
  4. Plug your monitor
  5. Put macbook to sleep manually & verify that after waking it up RGB is in place

I'm on Macbook Pro M1 with Ventura 13.4.1 (c), plugged via HDMI-HDMI. Also I have edited both plist files in /Library/Preferences and in $HOME/Library/Preferences/ByHost and both files are configured to support RGB on both variants (macbook screen + external monitor & only external monitor)

@GetVladimir
Copy link
Author

@dainiusm07 thank you for the details and for the step-by-step guide for the solution.

Let's see if other users can replicate it too.

I'm currently on the Sonoma beta, and it seems to work by default

@zdenek-jonas
Copy link

zdenek-jonas commented Jul 17, 2023

I can confirm that the procedure from @dainiusm07 worked on my M2 14 mackbook pro too.

@GetVladimir
Copy link
Author

@zdenek-jonas thank you so much for checking this and for the confirmation

@zdenek-jonas
Copy link

zdenek-jonas commented Jul 18, 2023

Unfortunately, the next day to wake up the PC it's flipped again. I am going to try Sonoma Beta

@dainiusm07
Copy link

@zdenek-jonas Have you edited both files in /Library/Preferences and $HOME/Library/Preferences/ByHost ? Make sure that your external monitor refresh rate is set to the same value on all variants of monitors combinations & it is the same in both files. Different refresh rates causes external monitor to flash on closing/opening macbook screen and I guess it could cause some kind of issues

@zdenek-jonas
Copy link

@zdenek-jonas Have you edited both files in /Library/Preferences and $HOME/Library/Preferences/ByHost ? Make sure that your external monitor refresh rate is set to the same value on all variants of monitors combinations & it is the same in both files. Different refresh rates causes external monitor to flash on closing/opening macbook screen and I guess it could cause some kind of issues

I have already installed Sonoma Beta. Now it stands RGB. Before that everything worked fine until I closed the laptop once, connected to the monitor. Since then, I've tried absolutely everything but it never worked like it used to. Let's see now.

@dangh
Copy link

dangh commented Jul 19, 2023

If anyone willing to pay for an easier solution, buy BetterDisplay app and follow this instruction. There're some great improvement over the plist manipulation method:

  • The EDID get re-applied when you turn the monitor on/off automatically, so you don't have to restart your Mac.
  • If some other apps mess up your display (Dota 2 in my case), it won't anymore because the display now has a fixed config. Even if it does, you can just re-apply the EDID manually.

@BermudaBen
Copy link

BermudaBen commented Jul 30, 2023

This method doesn't work on my M1 MacBook (Monterey). The lines of code to be changed didn't exist in my displays plist file, so I just added them. What I found confusing was that my plist file seemed to contain much more code than Vladimirs. It contains around 650 lines of code with a repeating structure of "Current Info", "Rotation" and "UnmirrorInfo". I inserted the additional code just below the first "Current Info" block, exactly as in Vladimirs screenshot.

I have a Dell U2720Q monitor connected via USB-C. It seems that whenever I first launch the MacBook and then switch on the monitor, the color is set to YPbPr. If I want RGB color I need to reset the monitor to RGB (which results in a pink-green display), then unplug the USB-C cable and plug it in again. Modifying the displays plist file hasn't changed this behavior. I also tried deleting both plist files (including the on in the ByHost folder) and then modifying the one that has been newly created.

@GetVladimir
Copy link
Author

@BermudaBen thank you for your comment.

Please check in your monitor setting for an option where you can choose between "High Data Speed" and "High Resolution" and set it to "High Resolution".

If that doesn't work or if you need the faster data on the USB ports of the monitor, please connect the M1 MacBook to the Dell U2720Q with USB-C to DisplayPort cable instead

@BermudaBen
Copy link

@GetVladimir Thank you for your reply. The monitor is set to "High Resolution". As for the connection: This would mean I won't be able to charge the MacBook from the Dell monitor, right? Why would it make a difference to use the monitors DP port instead of the UBS-C port? The video signal is DP in both cases. And: Do you know if this is a Dell-specific issue?

@GetVladimir
Copy link
Author

@BermudaBen not a problem, thank you for the reply.

When you mentioned that you have over 650 lines of repeating instances of Current Info in the plist file, this usually points to having a dock in the middle of the connection.

It seems that the USB-C to USB-C connection is considered as connected through a dock inside the monitor and then being converted.

The M1 MacBook doesn't seem to see it same as having an actual USB-C to DisplayPort connection.

This might depend on what type of conversion happens in the monitor and it's not isolated to only Dell monitors.

@satori-mitora
Copy link

After numerous attempts without success, I finally managed to succeed. I will record what I tried.

[1] I attempted to edit /Library/Preferences/com.apple.windowserver.displays.plist. This method involved changing the refresh rate and other display settings, but it failed.

[2] Next, I tried alternative method, but I couldn't find com.apple.windowserver.displays.[UUID].plist in /Users/username/Library/Preferences/ByHost. However, rotating the screen created a new com.apple.windowserver.displays.[UUID].plist. After executing Terminal commands, I finally achieved RGB!

Thanks to GetVladimir and everyone.

Lastly, I'll provide details about my setup: Mac mini M2, Mac OS 13.4.1 (c), HDMI to HDMI, DELL S2722DC.

@GetVladimir
Copy link
Author

@satori-mitora thank so much for your comment and for the detailed steps. Glad to hear that you got RGB color output working

@loucyan
Copy link

loucyan commented Aug 10, 2023

UPDATE: See my latest reply in this gist for complete steps for fixing this problem

If you're stuck with reseting to YPbPr after reboot or sleep here's what worked for me:

  1. Take the steps to edit plist in /Library/Preferences
  2. Remov plist in ~/Library/Preferences/ByHost
  3. Reboot

I removed the plist in ~/Library/Preferences/ByHost in recovery mode because i couldn't log in anymore since i somehow corrupted it .. but i guess it might work in the regular environment as well

okay so that was a short lived fix. here's how i got it to work better now:

  • Remove plist in /Library/Preferences
  • Remove plist in ~/Library/Preferences/ByHost
  • Empty trash
  • Reboot
  • Connect monitor via HDMI and close the macbook lid
  • Copy plist in /Library/Preferences to desktop, convert to xml, add lines below these steps after each <key>CurrentInfo</key><dict>...</dict> entry, convert back to binary, replace original file
  • Set the file to Stationary pad and Locked under file info in finder
  • Reboot
  • Open System Settings > Displays > Rotate your external screen 90deg and back
  • Copy plist in ~/Library/Preferences/ByHost to desktop, convert to xml, add lines below these steps after each <key>CurrentInfo</key><dict>...</dict> entry, convert back to binary, replace original file
  • Set the file to Stationary pad and Locked under file info in finder
  • Reboot

Now every time i start my macbook with the lid closed and connected to the external monitor, the external monitor receives RGB signal upon login.

The login screen for some reason starts in HDR+ mode (lol)

The external monitor for some reason looses RGB mode and switches back to YPbPr mode when disconnecting and reconnecting the HDMI cable though. But i can live with a setup where upon startup things work as expected.

Anyway, waiting for the fall release of the new OS where this nonsense has been fixed..

UPDATE: See my latest reply in this gist for complete steps for fixing this problem

@GetVladimir
Copy link
Author

@loucyan thank you for your comment and for the steps on how to fix it

@jackwilsdon
Copy link

jackwilsdon commented Aug 17, 2023

The menu on the LG UltraGear 27GL83A doesn't show the color format, but you can find it in the service menu by doing the following:

  1. Turn off the monitor by pressing in the control stick on the bottom
  2. Press the control stick left 3 times and right once
  3. Turn the monitor back on by pressing in the control stick
  4. Open the menu by pressing in the control stick and then pressing it right. This should open the service menu instead of the normal menu
  5. Scroll to "DEBUG INFO." using the control stick (pressing it upwards 3 times should loop round to the debug info) and press it right to enter the debug info menu
  6. Note the "COLOR FORMAT" displayed

You can exit the debug menu by pressing the control stick left, then exit the service menu by scrolling off the bottom of the menu using the control stick (pressing it downwards twice should do it) and pressing the stick in. Be sure not to accidentally change any values in the service menu!

These steps should hopefully work for other LG monitor models too.

@GetVladimir
Copy link
Author

@jackwilsdon that is awesome info! Thank you so much for sharing the detailed steps

@ioctlsg
Copy link

ioctlsg commented Aug 27, 2023

@GetVladimir thank you for your work. I couldn't understand why apple put us through this! but thank you and the kind people out their providing this solution. BTW i struggle a bit, until i read about the byHost folder. I delete all the com.apple.windowserver.* files and now my mac m1 behaves.

Screenshot 2023-08-27 at 1 55 13 PM

Screenshot 2023-08-27 at 1 59 31 PM

@GetVladimir
Copy link
Author

@ioctlsg Thank you so much for your comment and I'm glad to hear that you got RGB color output working

@vittau
Copy link

vittau commented Sep 22, 2023

Anyway, waiting for the fall release of the new OS where this nonsense has been fixed..

Wait, they fixed it? Do you have a source talking about this?

@loucyan
Copy link

loucyan commented Sep 27, 2023

Anyway, waiting for the fall release of the new OS where this nonsense has been fixed..

Wait, they fixed it? Do you have a source talking about this?

@vittau under Sonoma you still have to do the configuration manually, but the wake from sleep and unplugging the external monitor and plugging back in works as expected now as the external monitor retains RGB signal

Here's the steps for Sonoma. Do exactly what it says here, or you will end up with a partially working setup. To my findings all the rebooting is necessary to also capture the login screen configuration.

  1. Unplug external display, use only your laptop display for now
  2. We want to start with a clean configuration, so delete the two com.apple.windowserver.* plists under /Library/Preferences and ~/Library/Preferences/ByHost
  3. Reboot
  4. Now we want macOS to set up all configurations that will naturally occur when using our setup. Open System Preferences and set your desired resolution scale
  5. Reboot
  6. Keep your laptop display open and plug in the external display. Open System Preferences and set your desired resolution scale and assign the desired main display where your dock and main windows will appear
  7. Reboot
  8. Close your laptop display so only the external display is being used. Open System Preferences and set your desired resolution scale
  9. Reboot. Then, reboot again
  10. Now we have all possible configuration variants set up in both plists. Copy the two com.apple.windowserver.* plists under /Library/Preferences and ~/Library/Preferences/ByHost to your Desktop manually (cp command will not transfer the needed user privileges)
  11. Convert both plists on your Desktop to xml format with plutil -convert xml1 ~/Desktop/com.apple.windowserver.*
  12. Open both plists in a text editor. We now want to find occurrences of only the external display and add some additional config lines to them. I'm not sure how to identify them properly, but my external display is 60Hz so that's what i used to differentiate from the 120Hz built-in display configs. Add the code at the bottom of this reply to each external display config in both plists. Consult the screenshot provided in the original gist at the top to where exactly it should be placed
  13. Save both plists and convert them back to binary with plutil -convert binary1 ~/Desktop/com.apple.windowserver.*
  14. Check if the plists are valid with plutil -lint ~/Desktop/com.apple.windowserver.*
  15. Manually copy the updated plists back to their respective folders
  16. Right click and Get Info on both, and set them to Stationary pad and Locked
  17. Reboot and enjoy
<dict>
<key>BitDepth</key>
<integer>8</integer>
<key>EOTF</key>
<integer>0</integer>
<key>PixelEncoding</key>
<integer>0</integer>
<key>Range</key>
<integer>1</integer>
</dict>

@GetVladimir
Copy link
Author

@loucyan thank you so much for the detailed steps and explanation

@kmhcreative
Copy link

So when Sonoma was released and theoretically Big Sur won't be getting any more updates I finally upgraded to Monterey 12.7 (I always stay a couple versions back for sanity on my main work machine). I had this RGB mode working under Big Sur but Monterey broke it and I can't seem to get it back.

My main monitor is a 27" Dell S2721QS 4K monitor, connected HDMI-to-HDMI directly to my M1 Mac Mini. My second screen is a 27" LG 27LQ635S-PU FHD TV, connected HDMI-to-HDMI through a USB-C Dock. I'm using a Display Override with "DisplayIsTV" set to false to prevent macOS seeing the HDTV as a TV, so I can set it to 1920x1080 instead of 1080p, which vastly improved text legibility on it, but I have no idea if that monitor is actually in RGB color mode or not, I'm assuming it is because it's not blurry anymore, but text quality did slightly degrade after moving to Monterey.

I had my /Library/Preferences/com.apple.windowserver.displays.plist locked when I upgraded and it was still there and locked after Monterey installed, but doesn't seem to actually be doing anything anymore. I've tried deleting the one "windowserver" file I had in ~/Library/Preferences/ByHost/com.apple.windowserver.displays.[UUID].plist and it respawned but still no RGB mode on my Dell monitor. I also tried adding another file to my Displays Overrides for the Dell also with "DisplayIsTV" set to false, but that didn't work either.

As a side note, Monterey also can't seem to remember my monitor arrangement. I have to reorder them every time I reboot.

At this point, the only reason I care about trying to get the Dell back into RGB mode is because it now randomly experiences the flickering and ghosting problem, which I never saw under Big Sur so long as it was in RGB mode.

In addition to two HDMI 2.0 ports the Dell monitor does have a DisplayPort 1.2 on it too, but I don't have any cables, adapters, or docks for it. I haven't seen anyone talking about using an HDMI-to-DisplayPort cable or adapter, or what color mode that defaults to, but I'm assuming it would have to be an active adapter. Unless a USB-C dock with DisplayPort would be a better option, and then plug my LG HDTV into the Mac's HDMI out? I'd really hate to have to buy new hardware to work around what is clearly a software problem.

@GetVladimir
Copy link
Author

@kmhcreative thank you for your comment and for the details.

You might want to try modifying the displays plist file in the ByHost too, as it will take precedence over the one in the Library.

Regarding the monitor arrangements, this was issue in Monterey and I'm not sure if it got resolved.

The workaround is to try a different HDMI port on the monitor and see if that helps

@kmhcreative
Copy link

I tried using the "alternative" terminal commands shown above to modify the ByHost plist file and on reboot the Dell monitor is still in YPbPr color mode. I'll try the second HDMI port and see if that at least fixes the arrangement problem.

@GetVladimir
Copy link
Author

@kmhcreative thank you for the reply. You will have to modify two UUIDs in the plist file, since you have 2 monitors connected. Each one is only applied for one monitor.

@kmhcreative
Copy link

Ok, if I’m understanding you correctly, you’re saying I should have TWO plist UUID files in my ByHost folder, one for each monitor? But I’ve only ever had one UUID plist file in my ByHost folder. If I delete it macOS only recreates one file. I have no idea if this matters, but in the “Mission Control” settings I have “Displays have separate spaces” checked — but I’d think if anything that would make it more likely to create two display files, since it’s not seeing both screens as one space.

And inside that plist file there are ELEVEN sub-arrays under key “Configs” each of which has two main sub-sections, seemingly referring to two separate monitors, one of which has an “OriginX” of “-1920.”

I have this old Ruby script that seems to still pull EDID UUIDs for each monitor. But NONE of the UUID strings in my plist files match the EDID UUIDs that Ruby script pulls. The UUID on the plist filename doesn’t match either of them either.

When I manually rearrange the monitors to their actual positions, instead of updating any of the existing configs, it simply inserts another new array with two sub-sections with UUIDs that don’t match anything else. So now there are an even DOZEN entries in that file.

I should note that only the last three of the Config arrays have “LinkDescription” sections until I run those “alternative” terminal commands. Which, by the way, shouldn’t there be another line on the end that reads:

/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:Range 1" ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist

Otherwise it sets the Range to 0.

But the terminal commands only add the “LinkDescription” stuff to the first entry under “Config” and as soon as I manually re-arrange my monitors it overwrites it and the “LinkDescription” is gone. Not that it actually did anything in the first place.

Why does my Mac only create only one UUID display file in ByHost? And why does it have nearly a dozen entries, most of which don’t have a “LinkDescription” sub-section? Why does rearranging the monitors just add new entries to the file instead of changing configurations that are already there? Why do NONE of the UUID strings in that file seem to match the EDID UUIDs the Ruby script pulls?

On the other issue, switching HDMI ports on the monitor didn’t fix the arrangement problem. Switching which monitor is plugged into the Mac Mini HDMI and which is connected to the USB-C Dock, does fix the arrangement problem, but it always considers the HD screen the “Main” display, and even if I switch it in settings on the next boot it reverts back. It will ALWAYS set the Mac Mini’s HDMI port to “Main” and it will always position it to the left of the other display.

No changes in System Preferences will persist after a reboot.

I’m about ready to just give up on this. Thanks for your help though.

@GetVladimir
Copy link
Author

@kmhcreative you're welcome, glad if it helps.

There is only one displays plist file in ByHost folder.

Inside that file, there should be multiple UUID displays. You can add the LinkDescription to each one manually if you want to be sure.

Please note that you can't use the other scripts as they are only for x86 based Macs and they won't match the Apple Silicon UUIDs.

That being said, if you don't want to bother with this, the easiest workaround is to just connect both monitors with an USB-C to DisplayPort cable directly, without using a dock.

It will take up 2 USB-C ports on your Mac, but the displays should work properly and output RGB color

@kmhcreative
Copy link

Fixed it!

Remember how I said that my locked /Library/Preferences/com.apple.windowserver.displays.plist file from Big Sur was untouched after my upgrade to Monterey? That was the problem. I had to trash that file and force macOS to generate a new one. But the XML <dict> literally just had UUID entries in it, nothing else. It wasn't until I went into System Preferences and rearranged my monitors correctly that it updated that plist file with actual configurations for both my monitors. Minus the "LinkDescription" sections, of course.

Then I went through the steps outlined above to add the "LinkDescription" section to each monitor's entry, rebooted, and my display arrangement is correct and my monitors are in RGB mode.

I stupidly assumed that the plist file from Big Sur would just work with Monterey, so the one thing I hadn't tried was getting rid of it and making Monterey generate a new one to edit, and I didn't think I needed to edit the Big Sur plist because it already had the "LinkDescription" sections in it. But Monterey clearly didn't like something in that file, and because it was locked it couldn't update it.

Lesson learned, now I know what I need to do when I eventually upgrade to Ventura so I won't lose my RGB mode again.

@GetVladimir
Copy link
Author

@kmhcreative awesome! Thank you for the update and the solution, and I'm glad to hear that you got RGB color output working

@Eclipt1c
Copy link

Eclipt1c commented Dec 7, 2023

@GetVladimir many thanks for the great work that you have put in! I wanted to add a few things.

Alternate terminal way
This is a very nice and quick way to update plists, however, the values should be populated and Range is very important. This is the only way it works on my MacBook M2 Pro with LG C2. Also, if you have a true 10bit display, use BitDepth 10.
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays..plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:BitDepth 10” ~/Library/Preferences/ByHost/com.apple.windowserver.displays.
.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:EOTF integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays..plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:EOTF 0” ~/Library/Preferences/ByHost/com.apple.windowserver.displays.
.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:PixelEncoding integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays..plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:PixelEncoding 0” ~/Library/Preferences/ByHost/com.apple.windowserver.displays.
.plist
/usr/libexec/PlistBuddy -c "add DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:Range integer" ~/Library/Preferences/ByHost/com.apple.windowserver.displays..plist
/usr/libexec/PlistBuddy -c "set DisplaySets:Configs:DisplayConfig:DisplayConfig:DisplayConfig:LinkDescription:Range 1” ~/Library/Preferences/ByHost/com.apple.windowserver.displays.
.plist

Regarding YCbCr444 vs RGB
If you have a Mac with HDMI 2.1 (starting with M2 Pro) and are able to get 10bit YCbCr444 (check screen OSD information, if on LG C2, keep clicking green button on the remote) working by default, I do not recommend messing around. 4:4:4 means no chroma subsampling and you will get absolutely no visual benefits from trying to get RGB to work. In theory, RGB has a slightly wider range, but as long as both your screen and computer are working on the same range (i.e. limited or low black level), it will sort itself out so that no one ever will be able to see any difference (especially at 10bit). Rather focus on getting a good calibration and your creative work.

@GetVladimir
Copy link
Author

GetVladimir commented Dec 7, 2023

@Eclipt1c Thank you so much for your comment and for the additional info for 10 bit color.

Regarding the YCbCr444 vs RGB, it seems there is a difference in the default color profile that macOS chooses, which could affect colors and calibration

@mnsk0000
Copy link

mnsk0000 commented Dec 9, 2023

When connecting to HDMI on my m1 MacBook Air, RGB output was successful, but the gamma value was destroyed (presumed to be an HDMI bandwidth issue).
When connected via DP, ypbpr is still output (in this case, the gamma value is normal).

@GetVladimir
Copy link
Author

@mnsk0000 if you're using a Dell monitor, make sure to set the Gamma to PC instead of Mac in the Monitor built-in menu and see if it makes a difference

@mnsk0000
Copy link

mnsk0000 commented Dec 9, 2023

@GetVladimir I using a Dell monitor, But this model not support Gamma setting menu

@GetVladimir
Copy link
Author

@mnsk0000 In that case, you can try changing the gamma in the color profile. Here is how to calibrate it in macOS Sonoma: https://support.apple.com/en-ie/guide/mac-help/mchlp1109/mac

@mnsk0000
Copy link

mnsk0000 commented Dec 9, 2023

@GetVladimir I can't setting gamma to Display Calibrator Assistant. I was only able to change the color temperature through this.

@mnsk0000
Copy link

mnsk0000 commented Dec 9, 2023

When connecting to HDMI on my m1 MacBook Air, RGB output was successful, but the gamma value was destroyed (presumed to be an HDMI bandwidth issue). When connected via DP, ypbpr is still output (in this case, the gamma value is normal).

When I connected both hdmi and dp and output to dp, I succeeded in outputting RGB from dp.
However, the gamma value still appears to be destroyed, so it may not be an HDMI issue.

@GetVladimir
Copy link
Author

@mnsk0000 Make sure to hold the ALT/OPTION button on your keyboard while clicking on the + on the color profile.

It should appear a checkbox with Expert Mode and the Gamma should be available:
gamma

@mnsk0000
Copy link

mnsk0000 commented Dec 9, 2023

@GetVladimir Thanks you
Have you or anyone else had any gamma issues?
monitor.co.kr The third on this site list is the contrast ratio test.
I couldn't distinguish values ​​above 92 in this test (I could distinguish them in ycbcr state)

@GetVladimir
Copy link
Author

@mnsk0000 Thank you for the info. I personally haven't noticed issues with Gamma unless the setting on the Monitor itself is set to the wrong value.

The slider that you've posted might be affected by contrast and brightness also though, as well as high RGB and low RGB (limited RGB and full RGB) range values

@mnsk0000
Copy link

@GetVladimir When I connected it with DP
I found that it works as RGB at 30hz and ypbpr at 60hz.

@GetVladimir
Copy link
Author

@mnsk0000 that doesn't sound right. Are you sure the USB-C to DisplayPort cable that you use is good for 4K60? (Many usually are)

@mnsk0000
Copy link

@GetVladimir The cable is fine. I Connected to DP-DP via Hub.
This could be a case of my hub or monitor being unusual.

@GetVladimir
Copy link
Author

@mnsk0000 thank you for the reply and for the info.

You're right, in that case the issue is very likely the hub not supporting 4K60 output.

Connecting your M1 MacBook Air with a direct USB-C to DisplayPort cable to the Dell monitor should solve the issue

@Averyy
Copy link

Averyy commented Jan 7, 2024

Gave up troubleshooting and just got 2 USBC-DisplayPort cables and all works fine in RGB now lol. Appreciate the effort.

@GetVladimir
Copy link
Author

@Averyy that is probably the best solution, other than the issue being fixed in macOS.

Thank you for the reply and the update, and glad to hear that you got it working

@exetico
Copy link

exetico commented Jan 18, 2024

I'm rocking two U2722D, and they're stuck at YPbPr. I've tried all your suggestions, but I've not been able to force RGB to work with my hardware combo:

Have anyone else managed to get this combo working?

The problem for me, is that the Dell screens generate wierd things if low-light grey text is on the screen, like described in the Reddit post "M1 Mac + Dell Monitor Flickering Issue Fixed - S2722QC - USB-C - Monterey".

Once occurred once (the flickering), it's even visible in the Dell "diagnostics" mode on the screen:
billede

It's not a problem in RGB Color-mode, which I use at home (See Bonus info at the bottom)

I'm still unsure what's going on?

My two old U2515H's was rocking on the same system with no issues what so ever.

I'm using the Satechi-adapter which did work just fine with two U2515H's, so I'm unsure why the two U2722D does not work with the same cables and adapter. I though I upgraded my setup, but it's a pain right now...

Dell did get all the details on WhatsApp, and decided to replace the two U2722D screens with two refurbished U2722D, even though I clearly mentioned that it must be related to software/firmware.

Maybe I need to give the USB-C > DisplayPort cable a go? But, that would require me to manually plug four cables in the laptop at all time, which is not ideal.

Bonus info: At home I'm also using two U2722's and they work just fine, but here I have a DisplayLink dock in between (Lenovo 40AF with DisplayLink), which gives RGB output just fine. I know that's not a solution by itself, as it's requires a dock + adapter to the Lenovo dock, and adds a bit of delay as DisplayLink needs to proces the output, too. And the DisplayLink software to be running in the background as well...

@GetVladimir
Copy link
Author

@exetico thank you for your comment and for the useful details.

My guess regarding why the 2515H worked while the U2722D is that the 2515H defaults to RGB when initializing the HDMI connection.

You've mentioned that all 4 ran at the same resolution and refresh rate, so that shouldn't be the issue.

From the image you've posted, it's very strange that they have what looks like image retention, even on the Dell diagnostic screen.

If possible, it might be a good idea to connect both monitors with USB-C directly, just to see if that would resolve both the flickering and the RGB issue

@GetVladimir
Copy link
Author

@exetico I've been researching more about the image retention issue that you've mentioned, and I've found more articles about it: https://www.eizoglobal.com/support/compatibility/pc/mac/m1m2/

This is what the article above mentions:

Flicker or image burn-in have been reported in some cases when connecting an external monitor to a Mac computer equipped with Apple M1/M2/M3 series chip.

Although the cause of the phenomenon and the conditions under which it occurs are not confirmed, it is thought to be due in part to the fact that the video signals output from Mac computers equipped with Apple M1/M2/M3 series chip behave differently than Mac or Windows computers with Apple Intel chip or Windows PCs.

When displaying certain images or video, the brightness of the screen fluctuates in short cycles, causing flicker or image burn-in occurs, causing images to persist.
The phenomenon may continue even after switching to another image or signal input.

The video signal output from the Mac computer with Apple M1/M2/M3 series chip is fluctuating in several frame cycles, which may be interfering with the LCD panel control of the external monitor.
Video signal output from a Mac or Windows computer with Apple Intel chip do not fluctuate in this way, so the phenomenon is not likely to occur.

@exetico
Copy link

exetico commented Jan 18, 2024

@GetVladimir

My guess regarding why the 2515H worked while the U2722D is that the 2515H defaults to RGB when initializing the HDMI connection.

Good point. I didn't think of that. The old 2515H's are sold now, so I don't have a option to test them.

From the image you've posted, it's very strange that they have what looks like image retention, even on the Dell diagnostic screen.

If possible, it might be a good idea to connect both monitors with USB-C directly, just to see if that would resolve both the flickering and the RGB issue

There's quite a few threads about flickering Dell screens in combination with Apple Arm Silicon. I've also done the same things, as recommended in the article you're recommended. But, sadly I'm still having a hard time.

I'm wondering if there's any ways to enforce the RGB, as the YPbPr flickering are a real pain.

Thank you for your inputs, btw! It's a good idea to test with a USB-C > DP, so I'll do that in the next week. I'm not really sure what to do next. It's crazy that a popular display like the Dell Ultrasharp and the M1 doesn't play nice together, and Dell didn't even manage to mention that while I tried to talk with their support team.

@GetVladimir
Copy link
Author

@exetico thank you for the reply.

Other monitors seem to have the flickering issue as well, including Benq and Samsung.

The issue is very likely in the Apple Silicon, since all other Macs, PCs and devices work properly with those exact same monitors.

Dell also have a support page about this issue: https://www.dell.com/support/kbdoc/en-us/000218313/flicker-on-dell-monitors-connected-to-mac-s

@gammelby
Copy link

Thanks for the research and guide! I was going insane of the blurred text on a new Samsung G7 monitor connected through HDMI to my m1 MBP. However, I cannot get the tricks to work - tried following the guide and using the scripts that wrap the same steps. I apparently have the multi-configuration (I don't know why). So the following hint applies to me:

Note that there might be multiple instances of the PixelEncoding and Range keys in the same file, one for each output of your monitor and for different AirPlay devices. You might need to update the integer on each one to get RGB color output on all displays.

Can you elaborate the "update the integer on each one"? Should the range integer be incremented for each? I tried setting both to 1 and then setting the first to 1 and the next to 2. Same result (blurry text). Are there anything else to try in this scenario?

Note that the blurry text is the only indication of the RGB issue as I cannot find any system information that tells if the signal is RGB or not. But I have tried disabling font smoothing etc (was already done years ago I think), to no avail - and all looks crisp on my old USB-C connected LG display.

Thanks in advance!

@GetVladimir
Copy link
Author

@gammelby thank you so much for your comment.

You're right, if there are multiple instances of the DisplayConfig and CurrentInfo, you will need to add the PixelEncoding and Range manually to each one.

You don't need to change the values. They can be exactly the same as the first instance.

If it's easer, you can make a backup and just delete the Displays plist file. It should be recreated again after reboot and resolution change, and it should not have as many duplicated instances.

Regarding the indicator whether RGB color output is enabled or not, the easiest way is indeed if your monitor's built-in menu shows it.

If it doesn't, you can sometimes determine it by going to System Settings > Displays > Color Profile and see if any profiles starting with SD or HD show up as compatible with your monitor (shown above the horizontal line in the list). If they are, you are running in YCbCr mode. If only your Monitor Color Profile is above the line, then it's usually RGB Color Output. This is not always a reliable indicator though.

If nothing else works, it might be for the best to look for an USB-C to DisplayPort cable and connect the monitor with it instead of the HDMI.

@gammelby
Copy link

@GetVladimir thanks for your message and the hints, I will take a look!

@exetico
Copy link

exetico commented Mar 15, 2024

I tried everything, and ended up ordering a Lenovo DisplayLink dock (40AF). Crazy and unnecessary cost, and extra delay. But as it's only running in RGB, my combination now works. If someone finds a good way to do this, I'd be happy to revert back, however, right now, I don't want to spend more time on it. I don't get why Apple does not give more control to the user, to enforce the usage of RGB 🙃 ...

@GetVladimir
Copy link
Author

@gammelby you're welcome. Let us know how it goes.

@exetico thank you for the update and glad to hear that it works with the DisplayLink dock.

You're right, it would be so easy for them to add an option menu to choose between RGB and YCbCr, same as they already have on the Apple TV Settings.

At the very least, it should be set to default to RGB whenever possible.

@albertmonzo
Copy link

I finally got this working. The trick for me was to make the edit in thebyHost folder file instead of the suggested one. This file seems to override everything else and deleting it doesn't work because it also loses my display settings (e.g scaling, arrangement, refresh rate...). If I then set my settings back to what I need, the file gets regenerated so it overrides the changes I made to the top level plist file.

What I also found very confusing was figuring out what the right display to apply the fix to is. This is complicated because plugging in the same display via different methods (HDMI, usb hdmi dongle, usb) causes the system to create separate entries that look correct but aren't. What worked for me was using Color Sync Utility.app to get the UUID of the display the system is currently using, then looking for the entry in the file that matches and making the changes there.

@GetVladimir
Copy link
Author

@albertmonzo thank you so much for your comment and glad to hear that you got RGB Color Output working.

That is a great suggestion for using the built-in Color Sync Utility.app to determine which is the correct UUID of the monitor port that needs to be modified.

And you're right, each port or connection of the monitor has a different UUID.

@albertmonzo
Copy link

To clarify, it's not just different ports of the monitor, but even different ways of connecting to the same port. In my case, most of the confusion happened because I had previously connected the monitor via HDMI directly to the HDMI port, but I'm now using a usb-c to HDMI cable (to get 4k@120hz on an M1 Pro). The act of having connected it before created this separate entry that looks identical except the UUID is different...

@GetVladimir
Copy link
Author

@albertmonzo thank you for the clarification and additional info.

You're right. That also explains why people that use a dock sometimes seem to get a different UUID on every reconnect, which make is really difficult to modify the correct entry for RGB

@maxskorr
Copy link

Not sure if it was mentioned before, but for those suffering from the blurry image issue on external displays with an M1/M2/M3/.. MBP and DisplayLink-based dock station - enabling "Experimental 3008x and 2560x modes" option in DisplayLink seems to do the trick (https://support.displaylink.com/knowledgebase/articles/1993915)

@GetVladimir
Copy link
Author

@maxskorr thank you for your comment and the info.

I haven't seen this feature before. Good info to know for anyone using a DisplayLink based Dock.

@Bilge
Copy link

Bilge commented Apr 15, 2024

Forcing RGB Color Output still seems to work with the original procedure of modifying the plist files

No, it doesn't. I followed the instructions to the letter on Sonoma and it didn't do shit. The "alternate" method was also a waste of time. Stuck with shitty TV colours on a desktop monitor because I'm forced to use the worst operating system ever conceived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment