Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Hi!

I just wrote a tool in order to fix the bad white point on my 16.2" 2021 MacBook Pro.
After checking in a shop I saw that there was noticeable inconsistency in factory calibration between units, leading to some displays being more red, more blue, or worse like mine with a depressing blue-green tint.

Frustrated between the choice of giving it back to Apple for fixing for unknown results or requesting a refund and wait for months to get a replacement, I researched solutions to fix it myself.

Unfortunately each of the calibration options had dealbreakers, namely:
  • With a profile generated by X-Rite i1Profiler and a i1 Display Pro:
    • Losing HDR capability altogether
    • Wrong color matrix for colorspace conversion
  • With a "fine-tuned" custom display preset:
    • Losing 1600 nits HDR peak brightness: limit to 1000-nits instead.
    • Losing automatic brightness
    • Losing the ability to adjust brightness altogether
So, not great.

Fortunately, ColorSync supports loading correction tables into the display (or display controller) with at least 10-bit precision in a way that makes it easy to alter the "gain" of red, green and blue channels as well as their overall gamma.
Then, XDR Tuner takes the factory ICC profile generated by the system from display data, modifies the max and gamma values in its vcgt table according to your config and apply it.

That way, it is possible to adjust the white point and every other follows accordingly.
HDR works just as expected is is corrected the same. True Tone and Night Shift are good to go as well.

I thought I might not be the only one that needs this fix: Everybody out here working with color will need to match their Liquid Retina XDR display with a reference monitor and like me might not want to experience the same limitations.

Now my MacBook Pro XDR display matches with the other calibrated displays I have, with the added XDR capability which is frankly breathtaking. I look forward to play with grading HDR video in Resolve soon.

Here's the tool:

I hope it'll be useful to you as well, let me know if you need any help with using it or tuning your display.
 

sydlow

macrumors newbie
Oct 13, 2011
21
4
Hi - thanks for your app.
Are you matching the whitepoint with your reference display visually?
Or are you using a calibrator to do it.
 
  • Like
Reactions: supercurio

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Great question, so in theory you'd match white points with a sensor and that would be straightforward.
It's the idea behind Appel's own fine-tuning feature.

However in practice, correction matrixes are not available yet for popular colorimeters for the phosphors used by this panel, and the spectrum emitted by them is peaky enough that only a very high resolution spectro can see the colors precisely enough to get a good perceptual estimation.

So my recommendation for now is to calibrate a standard white-LED display to D65 with the suitable settings, and if the results are satisfactory, match visually this white with the MacBook's XDR display using XDR Tuner.

It might take a few minutes to get it right, but especially with a trained eye it's not a difficult task.
 

sydlow

macrumors newbie
Oct 13, 2011
21
4
...

So my recommendation for now is to calibrate a standard white-LED display to D65 with the suitable settings, and if the results are satisfactory, match visually this white with the MacBook's XDR display using XDR Tuner.

It might take a few minutes to get it right, but especially with a trained eye it's not a difficult task.

So for photography - I would just open Photoshop and have the screen show an absolute white image on a calibrated display, do the same on the MacBook Pro, and then use your app on the MacBook Pro to match by eye?
 

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
So for photography - I would just open Photoshop and have the screen show an absolute white image on a calibrated display, do the same on the MacBook Pro, and then use your app on the MacBook Pro to match by eye?

Exactly, simple as that.

To get there quickly, I'd run ./xdr-tuner.py -l to start it in a loop and edit the default.json config in a text editor.
Then changing the values of max for red, green and blue as needed: range 0.0 to 1.0, until you got it just right.

You'll find that it helps to have both backlights at roughly the same intensity to match the whites.
 

J.Gallardo

macrumors 6502
Apr 4, 2017
448
157
Spain
Nice contribution.
I’m not using Monterey, and still waiting for a 16”pro to arrive. I’m not an image-pro, and I don’t know about programming. Terminal scares me.
I’ve read you are looking for help to make a GUI. Couldn’t “Shortcuts“ be used for the script?
I think your app is a very good idea and contribution, considering we’re talking about a very capable and expensive screen.
Thank you!
 
  • Like
Reactions: supercurio

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Cheers @J.Gallardo, thanks for the feedback.
I'll add a step-by-step guide on the project then, from downloading to how to complete the adjustments.

It looks like "Shortcuts" doesn't allow to create and distribute an interactive UI as it would be needed.
I checked AppleScript earlier and it was also too limited.

So far I chose a simple python script with no dependency so it can be run as-is without any dependency to install. Development and sharing was very quick that way.

But if as you describe there's a lot of demand for a GUI I'll look into how to write one and how to provide a standard way to install and launch the utility, either with an app in a dmg or as a pkg.
 

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
I started to write a GUI, making a basic app out of it might not be as difficult as I thought, stay tuned.
 
  • Like
Reactions: J.Gallardo

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
I've made good progress with the UI and an interactive implementation.

Now I wonder if enough people would use it to be worth the yearly cost associated with notarization. Probably not (not sure I understand that part fully yet)
 
  • Like
Reactions: Executor

J.Gallardo

macrumors 6502
Apr 4, 2017
448
157
Spain
I've made good progress with the UI and an interactive implementation.

Now I wonder if enough people would use it to be worth the yearly cost associated with notarization. Probably not (not sure I understand that part fully yet)
I don’t know how this things work either, but I’m sure your app has a value, and should be useful. It’s not strange that it doesn’t exist yet, as XDR in laptops is a totally new thing; this kind of fine-tune is provided in dedicated monitors, and general use of laptops didn’t require it, til now!
I believe my 16” XDR screen is really well calibrated, but I’m not a “pro”. I suppose that a lot of people is going to work seriously with this expensive & powerful machines (but I don’t know how extended could be the necessity of this color control).
Well… globally: It’s a very nice add-on to a XDR-portable screen! New tech, new needing.
Maybe a small but credited developer company could use your app, after a friendly negotiation… I really don’t know.
Anyhow, thank you! It’s nice to know this calibration is possible to do.

Good luck ?
 
  • Like
Reactions: supercurio

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Thanks @J.Gallardo, I appreciate the kind words.

My findings so far is that loading a calibration table, like one you generate with a software taking measurements from a color sensor breaks all the HDR functionality of the display: everything brighter than SDR red/green/blue/white are clipped to their maximum SDR value.

It's a huge oversight so far by Apple, for the professional video market: you'll have to choose between calibration or HDR, no way around it.
I suppose it is a bug, due to things just not being finished.

Confirming the bug theory, when loading gamma formulas which don't break HDR, it mixes up channels: green is needs to be loaded in the red channel, blue in the green channel and red in the blue channel. Same on 12.1; I mean... ?

But at least gamma formulas (allowing to set min/max and gamma for each channel) can be loaded when working around that and HDR content is preserved.

Therefore right now it's not possible to "calibrate" an XDR display, only "tune" it.
But at least my app allows to tune it without any of the many downsides, unlike the built-in tools. Still worth it for people like me ? and a bunch of pros I'm sure.


I looked it up and it costs indeed $99 USD per year for a developer to publish an app installable without warning, no exceptions: entirely unreasonable to pay such rent indefinitely to publish a free app.
So I'll publish it without notarization first (free), and in case there's demand consider either donations or sales to compensate for this expense.
 

kennymax

macrumors newbie
Jan 24, 2022
1
1
Ahoj!

Práve som napísal nástroj na opravu zlého bieleho bodu na mojom 16,2-palcovom MacBooku Pro 2021.
Po kontrole v obchode som zistil, že medzi jednotkami je zrejmá nekonzistentnosť v továrenskej kalibrácii, čo viedlo k tomu, že niektoré displeje boli viac červené, viac modré alebo horšie ako moje s depresívnym modrozeleným odtieňom.

Frustrovaný medzi možnosťou vrátiť ho spoločnosti Apple na opravu pre neznáme výsledky alebo požiadať o vrátenie peňazí a čakať mesiace na náhradu, hľadal som riešenia, ako to opraviť sám.

Bohužiaľ, každá z možností kalibrácie mala prelomové body, konkrétne:
  • S profilom vygenerovaným pomocou X-Rite i1Profiler a i1 Display Pro:
    • Úplná strata schopnosti HDR
    • Nesprávna matica farieb pre konverziu farebného priestoru
  • S „jemne vyladenou“ predvoľbou vlastného zobrazenia:
    • Strata maximálneho jasu HDR 1 600 nitov: namiesto toho obmedzte na 1 000 nitov.
    • Strata automatického jasu
    • Úplná strata možnosti nastavenia jasu
Takže nie skvelé.

Našťastie ColorSync podporuje načítanie korekčných tabuliek do displeja (alebo ovládača displeja) s najmenej 10-bitovou presnosťou spôsobom, ktorý uľahčuje zmenu „zosilnenia“ červených, zelených a modrých kanálov, ako aj ich celkovej gama.
Potom XDR Tuner vezme továrenský ICC profil vygenerovaný systémom z údajov na displeji, upraví hodnoty max a gamma vo svojej tabuľke vcgt podľa vašej konfigurácie a použije ho.

Týmto spôsobom je možné upraviť biely bod a podľa toho sa odvíja každý ďalší.
HDR funguje presne tak, ako sa očakáva, je opravené rovnako. True Tone a Night Shift sú tiež dobré.

Myslel som si, že možno nie som jediný, kto potrebuje túto opravu: Každý, kto tu pracuje s farbami, bude musieť zladiť svoj Liquid Retina XDR displej s referenčným monitorom a ako ja možno nebude chcieť zažiť rovnaké obmedzenia.

Teraz sa môj displej MacBook Pro XDR zhoduje s ostatnými kalibrovanými displejmi, ktoré mám, s pridanou funkciou XDR, ktorá je úprimne úchvatná. Teším sa, že sa čoskoro pohrám s hodnoteným HDR videom v programe Resolve.

Tu je nástroj:

Dúfam, že bude užitočný aj pre vás, ak by ste potrebovali pomoc s jeho používaním alebo vyladením displeja, dajte mi vedieť.
Thanks a lot for your tool! :) It work but there are something wierd:

I tried to instal your app, everything works but when I connect my EIZO CS2740 monitor, all setting gone. It mean, it doesnt work when you are connected to other monitor and want to tune all RGB parametres accoring to my second monitor

After disconecting I have to reapply XDR Tuner and it works again..

Is there some chance to fix that? Thank you, you are my hero :), because I didnt know what to do with that. Nobody knows nothing

PS: I found some temporary solution to change profile, when I am connected to Eizo - I have to open ColorSync Utility and choose Current profile to "tuned.icc" Than it works for both monitors, but when you disconnect, Its there again :)
 
Last edited:
  • Like
Reactions: supercurio

Mitchdoc

macrumors member
Oct 23, 2014
69
32
Hey there I really think this is fantastic work. I am eager to try it. I have newly purchased a MacBook Pro 16 inch. The first unit that I bought I really loved the white point on the screen. It would seem as if the antiglare coating has a slight more reddish pinkish tint which makes the whites appear more on the red side of the spectrum. Unfortunately that unit has an issue with the hinge clicking and I am packing it up for return. I managed to secure a replacement model which functionally is great but comparing screen side-by-side this one seems to have a tent again likely due to the screen coding, that is more in the blue yellow spectrum. I seem to not prefer that as much. And now I am debating which model to keep as the clique is some thing I only hear when closing the screen but I view the screen daily.

my old MacBook Pro from 2012 allowed us to do our own ICC profile using native eye and adjusting colour temperatures and the like on our own. That seems to have disappeared with these new models. I am hoping your tool might be able to allow enough of a shift in the white point temperature to where I get those nice whites that I prefer. I am not a professional photographer and so if the overall colour balance is slightly off but looks good to my eye that is my preference. Will your tool allow me to do this? Or will I require a colorimeter of some sort. Additionally
will this generate an ICC profile that can always be loaded ?

Finally, have you actually made this into an app yet or is it still only via these command line tools?
 

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Thanks a lot for your tool! :) It work but there are something wierd:

I tried to instal your app, everything works but when I connect my EIZO CS2740 monitor, all setting gone. It mean, it doesnt work when you are connected to other monitor and want to tune all RGB parametres accoring to my second monitor

After disconecting I have to reapply XDR Tuner and it works again..

Is there some chance to fix that? Thank you, you are my hero :), because I didnt know what to do with that. Nobody knows nothing

PS: I found some temporary solution to change profile, when I am connected to Eizo - I have to open ColorSync Utility and choose Current profile to "tuned.icc" Than it works for both monitors, but when you disconnect, Its there again :)

Hi @kennymax!

Right, I didn't test with an external monitor yet, but it seems that Apple did not really either as the profile assigned in ColorSync to the XDR display should definitely be applied in various scenarios like:
  • startup
  • changing refresh rate
  • connecting or disconnecting an external monitor.
With the current version, you can run ./xdr-tuner.py --re-apply each time in case it is easier than using the ColorSync graphical ui.

I have an idea for the next version which could help with re-applying, but I'm not sure it's very good yet and will need more work to be done in a way that's really efficient (aka battery efficient)

Hey there I really think this is fantastic work. I am eager to try it. I have newly purchased a MacBook Pro 16 inch. The first unit that I bought I really loved the white point on the screen. It would seem as if the antiglare coating has a slight more reddish pinkish tint which makes the whites appear more on the red side of the spectrum. Unfortunately that unit has an issue with the hinge clicking and I am packing it up for return. I managed to secure a replacement model which functionally is great but comparing screen side-by-side this one seems to have a tent again likely due to the screen coding, that is more in the blue yellow spectrum. I seem to not prefer that as much. And now I am debating which model to keep as the clique is some thing I only hear when closing the screen but I view the screen daily.

I can very much relate to your experience: keeping a unit or not & uncertainty. Pretty annoying indeed!
I would say no doubt, return the device which has the mechanical defect and use xdr-tuner to adjust the display to whatever is right for your use case and environment.

In fact, depending on other displays attached (like a tablet) or jobs you might do later you might want to adjust the white point to something else later, so in a way the factory calibration is not that relevant anyway now that we can adjust it.
The only exception would be an obviously defective panel which could still be tuned to a correct white point, but at a significant loss of brightness output, which then would affect visibility outdoors since normal content is limited to 500 nits.

my old MacBook Pro from 2012 allowed us to do our own ICC profile using native eye and adjusting colour temperatures and the like on our own. That seems to have disappeared with these new models. I am hoping your tool might be able to allow enough of a shift in the white point temperature to where I get those nice whites that I prefer. I am not a professional photographer and so if the overall colour balance is slightly off but looks good to my eye that is my preference. Will your tool allow me to do this? Or will I require a colorimeter of some sort. Additionally
will this generate an ICC profile that can always be loaded ?

Yes that's exactly the purpose of this tool. Months later I'm still rather surprised it's still needed to be honest, but okay then!

Finally, have you actually made this into an app yet or is it still only via these command line tools?
I have a prototype working of a UI with smooth interactive controls. The app is 80% there but I switched to other projects a few weeks back seeing there was not too much response.

But with your interest guys then it would be worth continuing!
 
  • Like
Reactions: kennymax

Mitchdoc

macrumors member
Oct 23, 2014
69
32
Hey thanks for you reply in messages tried the tool with python 2 and it worked!
it made an immediate colour change to a more red orange tint compared to previous. And it is noticeable compared to my previously more pinkish tinted model with the hinge issue ( which now looks bluer). If I understand correctly, there is a way to tweak this more by using the loop command?
This is all new to me!
Greatly appreciate your work.
There is a thread on here where people are complaining about various display tint issues. I bet it would be very appreciated to go to it and link your work!

 

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Ohh I didn't know there was a thread now, thanks for linking @Mitchdoc
I'll read all that.

Yes you can change the values for red/green/blue in the configs/default.json or even your own json file if you make a copy. It's best so it would not be overwritten in a source code update.

Attached, the current state of the prototype UI.
The program should become a lot easier to use like that.

I also noticed that the new MacOS versions are breaking the auto apply at boot functionality, so that needs to be fixed as well.
 

Attachments

  • xdr-tuner-current.png
    xdr-tuner-current.png
    419.2 KB · Views: 148

Mitchdoc

macrumors member
Oct 23, 2014
69
32
Ok Been trying this out and it really works!
Not sure how you figured this out but your efforts are appreciated.
I tried making slight adjustments in default.json and was able to get the colours to. match my calibrated Sony old on video.
Impressive display matching vibrancy and contrast nearly with an OLED panel.

2 questions:
Assuming I don't change from the stock XDR profile this colour profile change will stick? or if I log out or computer sleeps or reboots will I have to run the script again?
 
  • Like
Reactions: supercurio

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Not sure how you figured this out but your efforts are appreciated.

I'm a developer with years of experience with display calibration, so despite some bugs in the OS it was not that complex, and I got lucky to find there was a way to set the gains without losing HDR nor peak HDR capability.

I tried making slight adjustments in default.json and was able to get the colours to. match my calibrated Sony old on video.
Impressive display matching vibrancy and contrast nearly with an OLED panel.

Yes the vibrancy, contrast and near black response are not too far off an OLED for many of the content types. Apple & suppliers did a great job with the panel.
Since it's hard to calibrate the white point for this backlight & phosphors combination at the moment, the best is indeed to match the white visually with an existing display that serves as good enough reference.

2 questions:
Assuming I don't change from the stock XDR profile this colour profile change will stick? or if I log out or computer sleeps or reboots will I have to run the script again?
  • Logging out and back in resets the profile, which should be applied by the OS but is not (an Apple bug).
    In the current version of xdr-tuner, the auto-start at login functionality was broken in Monterey 12.1, I should be able to fix it in the next version.
  • Sleep keeps the profile, I've had it applied for weeks on end without reconfiguration like that.
 

AmazingTechGeek

macrumors demi-god
Mar 6, 2015
684
304
Los Angeles
So I have a couple years of experience of years in color calibration and color theory. This idea is remarkable and my display finally looks like my other calibrated display!

I applaud your code design too. This “app” has the utility to make calibration easier for pro users and course correct one of the few oversights to the new Macbook Pro’s.

Btw, I work in quality assurance. Let me know if you would like any feedback in the future.
 

Executor

macrumors regular
Mar 1, 2008
157
162
NYC
I was trying to use your tool but when I run it I get the following error message:

File "/Users/Exec/Desktop/xdr-tuner-main/xdr-tuner.py", line 13, in <module>


from Carbon.CoreFoundation import kCFURLPOSIXPathStyle


ModuleNotFoundError: No module named 'Carbon'


Any idea as to how I can fix it would be appreciated. Thank you
 

Mitchdoc

macrumors member
Oct 23, 2014
69
32
I think this is because python 2 was removed in latest 12.3 update .
The script was made in python 2.
I messaged SuperCurio hoping to see if he can make a fix as I am not skilled in this
 
  • Like
Reactions: Executor

Executor

macrumors regular
Mar 1, 2008
157
162
NYC
I think this is because python 2 was removed in latest 12.3 update .
The script was made in python 2.
I messaged SuperCurio hoping to see if he can make a fix as I am not skilled in this
Thank you so much for letting me know. Hopefully the tool will get updated eventually.
 

supercurio

macrumors newbie
Original poster
Dec 3, 2021
13
21
Hi @Executor and @Mitchdoc ! Thanks for letting me know.
Ah yes Python 2 is deprecated and supposed to go away eventually.

The next xdr-tuner version relies on Python 3, and is getting closer to completion.
I just fixed now an issue which prevented to re-apply automatically at boot on the new version.
For ease of use, it might probably be best to distribute it via the App Store, or at least as an app so I started to look into that.

Interestingly, Monterey 12.3 fixed an issue in ColorSync framework on the XDR MBP M1 16", where RGB channels were inverted (and I realized later that they were somehow not inverted on the 14" thanks to a tester).
So I'll check if the OS update brings some more changes.

I'll also take a quick look if a pip install of the right dependencies could restore the functionality of the currently released python2 version of xdr-tuner.
 

Executor

macrumors regular
Mar 1, 2008
157
162
NYC
Hi @Executor and @Mitchdoc ! Thanks for letting me know.
Ah yes Python 2 is deprecated and supposed to go away eventually.

The next xdr-tuner version relies on Python 3, and is getting closer to completion.
I just fixed now an issue which prevented to re-apply automatically at boot on the new version.
For ease of use, it might probably be best to distribute it via the App Store, or at least as an app so I started to look into that.

Interestingly, Monterey 12.3 fixed an issue in ColorSync framework on the XDR MBP M1 16", where RGB channels were inverted (and I realized later that they were somehow not inverted on the 14" thanks to a tester).
So I'll check if the OS update brings some more changes.

I'll also take a quick look if a pip install of the right dependencies could restore the functionality of the currently released python2 version of xdr-tuner.
That's great news! Glad to hear you are making such good progress. Thank you so much for all your hard work. I eagerly await for the finished product.
 
  • Like
Reactions: supercurio

Mitchdoc

macrumors member
Oct 23, 2014
69
32
Hi @Executor and @Mitchdoc ! Thanks for letting me know.
Ah yes Python 2 is deprecated and supposed to go away eventually.

The next xdr-tuner version relies on Python 3, and is getting closer to completion.
I just fixed now an issue which prevented to re-apply automatically at boot on the new version.
For ease of use, it might probably be best to distribute it via the App Store, or at least as an app so I started to look into that.

Interestingly, Monterey 12.3 fixed an issue in ColorSync framework on the XDR MBP M1 16", where RGB channels were inverted (and I realized later that they were somehow not inverted on the 14" thanks to a tester).
So I'll check if the OS update brings some more changes.

I'll also take a quick look if a pip install of the right dependencies could restore the functionality of the currently released python2 version of xdr-tuner.
Thanks!!!!!
 
  • Like
Reactions: supercurio
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.