Contribute
Register

[FIX] Corrupt color depth in High Sierra/Mojave

Status
Not open for further replies.
Could you point me towards how to enable EDID injection then? Maybe a link to some guide or something? All guides I encounter seem to only modify the EDID value under Graphics and enable Injection, none mentioned any Device Property (Including this one), and I can't seem to find any more information about EDID under Device Properties, even in the Clover Wiki.

It is covered in the backlight guide:
https://www.tonymacx86.com/threads/...ontrol-using-applebacklightfixup-kext.218222/
 
On Sierra/High Sierra I found that changing byte 20 to "95" (fixedid's macbook pro/air preset) and removing the last checksum byte and using an online calculator to get the new checksum, fixed my blur/depth issue, and so did simply injecting the whole new EDID. http://easyonlineconverter.com/converters/checksum_converter.html

However on Mojave this doesn't seem to work any more; the ugly blur (specifically on launchpad) remains.

Edit: added debug files
Also, system specs
i5-7y54, UX360CAK-AH51T, Mojave 10.14
 

Attachments

  • debug_16993.zip
    5.6 MB · Views: 99
Last edited:
On Sierra/High Sierra I found that changing byte 20 to "95" (fixedid's macbook pro/air preset) and removing the last checksum byte and using an online calculator to get the new checksum, fixed my blur/depth issue, and so did simply injecting the whole new EDID. http://easyonlineconverter.com/converters/checksum_converter.html

However on Mojave this doesn't seem to work any more; the ugly blur (specifically on launchpad) remains.

Edit: added debug files
Also, system specs
i5-7y54, UX360CAK-AH51T, Mojave 10.14

There are a few other patches to EDID that FixEDID is doing...
 
I got it to inject EDID correctly! Excuse me for I'm a novice, and thanks for the patience, I read the guides thoroughly and got it to work by adding AAPL0,override-no-connect to Device Properties. But the color banding problem hasn't been fixed yet, even with the injected EDID. Colors seem to be a little bit washed out, which I could fix in the Color preferences panel in Screen section of System Preferences.
 

Attachments

  • debug_24535.zip
    4.2 MB · Views: 95
I got it to inject EDID correctly! Excuse me for I'm a novice, and thanks for the patience, I read the guides thoroughly and got it to work by adding AAPL0,override-no-connect to Device Properties. But the color banding problem hasn't been fixed yet, even with the injected EDID. Colors seem to be a little bit washed out, which I could fix in the Color preferences panel in Screen section of System Preferences.

What exactly did you patch in the EDID?
 
What exactly did you patch in the EDID?

I used FixEDID app to patch the EDID extracted by DarwinDumper.

This is the DarwinDump information without injecting EDID

Extracted contents:
header: 00 ff ff ff ff ff ff 00
serial number: 0d ae d2 14 00 00 00 00 14 1a
version: 01 04
basic params: 95 1f 11 78 02
chroma info: ee 95 a3 54 4c 99 26 0f 4f 53
established: 00 00 00
standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
descriptor 1: b4 3b 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 2: cc 27 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 3: 00 00 00 fe 00 43 4d 4e 0a 20 20 20 20 20 20 20 20 20
descriptor 4: 00 00 00 fe 00 4e 31 34 30 48 43 45 2d 45 4e 31 20 20
extensions: 00
checksum: 19

Manufacturer: CMN Model 14d2 Serial Number 0
Made week 20 of 2016

EDID version: 1.4
Digital display
6 bits per primary color channel
DisplayPort interface
Maximum image size: 31 cm x 17 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
First detailed timing is preferred timing
Chroma Info:
Red X: 0.639648 Y: 0.330078
Green X: 0.299805 Y: 0.599609
Blue X: 0.150391 Y: 0.059570
White X: 0.309570 Y: 0.325195

Established timings supported:
Standard timings supported:
Detailed mode: Clock 152.840 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
Detailed mode: Clock 101.880 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
ASCII string: CMN (This is inexistent in the resulting EDID)
ASCII string: N140HCE
Checksum: 0x19 (valid)
EDID block does NOT conform to EDID 1.3!
Missing name descriptor
Missing monitor ranges
Detailed block string not properly terminated

This is the original EDID HEX.
00ffffffffffff000daed21400000000141a0104951f117802ee95a3544c99260f4f5300000001010101010101010101010101010101b43b804a71383440503c680035ad10000018cc27804a71383440503c680035ad10000018000000fe00434d4e0a202020202020202020000000fe004e3134304843452d454e3120200019

Then, this are the options I used in the FixEDID app to patch the original EDID.

FixEDID.png

I used the gen_edid.sh to generate an EDID from the DisplayVendorID file generated by FixEDID, this is the resulting HEX EDID

00ffffffffffff000610f29c000000001a150104951a0e7802ef05975754922722505400000001010101010101010101010101010101b43b804a71383440503c680035ad10000018cc27804a71383440503c680035ad10000018000000fc00436f6c6f72204c43440a202020000000fe004e3134304843452d454e312020004c

And this is the information given by DarwinDumper after injecting the patched EDID.

Extracted contents:
header: 00 ff ff ff ff ff ff 00
serial number: 06 10 f2 9c 00 00 00 00 1a 15
version: 01 04
basic params: 95 1a 0e 78 02
chroma info: ef 05 97 57 54 92 27 22 50 54

established: 00 00 00
standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
descriptor 1: b4 3b 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 2: cc 27 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 3: 00 00 00 fc 00 43 6f 6c 6f 72 20 4c 43 44 0a 20 20 20
descriptor 4: 00 00 00 fe 00 4e 31 34 30 48 43 45 2d 45 4e 31 20 20
extensions: 00
checksum: 4c

Manufacturer: APP Model 9cf2 Serial Number 0
Made week 26 of 2011

EDID version: 1.4
Digital display
6 bits per primary color channel (Maybe this is what's wrong? Isn't 6bits per color too little?)
DisplayPort interface
Maximum image size: 26 cm x 14 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
First detailed timing is preferred timing
Chroma Info:
Red X: 0.592773 Y: 0.341797
Green X: 0.331055 Y: 0.573242
Blue X: 0.152344 Y: 0.132812
White X: 0.313477 Y: 0.329102

Established timings supported:
Standard timings supported:
Detailed mode: Clock 152.840 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
Detailed mode: Clock 101.880 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
Monitor name: Color (This was inexistent in the original EDID dump)
ASCII string: N140HCE
Checksum: 0x4c (valid)
EDID block does NOT conform to EDID 1.3!
Missing monitor ranges
Detailed block string not properly terminated

Changes seem to be made in the serial number, basic params, chroma info and descriptor 3 of the EDID.

Debug files attached.
 

Attachments

  • debug_24292.zip
    4.3 MB · Views: 86
So, by using Wikipedia's description table of bytes in EDID, I got to modify the bits per primary color and up it to 16bits per primary color. I just modified the first byte of basic params, and remade the checksum using a checksum calculator. It still does NOT fix the color banding issue. I'll analize DEXX EDID's and compare it to mine, to see which changes made his EDID work. I'm also thinking, maybe I'm still not injecting the EDID correctly? It does change my Color Scheme when I restart and ioreg in Terminal informs the injected EDID, but maybe...

To change the bits per primary color, I just changed byte 20 in EDID as of per this table: https://en.wikipedia.org/wiki/Extended_Display_Identification_Data#EDID_1.4_data_format
and then updated checksum.

DarwinDumper now informs this:
Extracted contents:
header: 00 ff ff ff ff ff ff 00
serial number: 06 10 f2 9c 00 00 00 00 1a 15
version: 01 04
basic params: e5 1a 0e 78 02
chroma info: ef 05 97 57 54 92 27 22 50 54
established: 00 00 00
standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
descriptor 1: b4 3b 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 2: cc 27 80 4a 71 38 34 40 50 3c 68 00 35 ad 10 00 00 18
descriptor 3: 00 00 00 fc 00 43 6f 6c 6f 72 20 4c 43 44 0a 20 20 20
descriptor 4: 00 00 00 fe 00 4e 31 34 30 48 43 45 2d 45 4e 31 20 20
extensions: 00
checksum: fc

Manufacturer: APP Model 9cf2 Serial Number 0
Made week 26 of 2011
EDID version: 1.4
Digital display
16 bits per primary color channel
DisplayPort interface
Maximum image size: 26 cm x 14 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
First detailed timing is preferred timing
Chroma Info:
Red X: 0.592773 Y: 0.341797
Green X: 0.331055 Y: 0.573242
Blue X: 0.152344 Y: 0.132812
White X: 0.313477 Y: 0.329102
Established timings supported:
Standard timings supported:
Detailed mode: Clock 152.840 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
Detailed mode: Clock 101.880 MHz, 309 mm x 173 mm
1920 2000 2060 2250 hborder 0
1080 1086 1094 1132 vborder 0
-hsync -vsync
Monitor name: Color
ASCII string: N140HCE
Checksum: 0xfc (valid)
EDID block does NOT conform to EDID 1.3!
Missing monitor ranges
Detailed block string not properly terminated
 
Last edited:
I got to modify the bits per primary color and up it to 16bits per primary color

Setting 16 bits per channel is wrong, apple devices are 6 bits per channel: 6 for Red, 6 for Green and 6 for Blue, that gives 18 + 6 for Gamma (not sure) = 24 bit color in total, as shown in "About this Mac" info. So you should set byte 20 to "95" which is 10010101 in binary, where Bit 7=1 (Digital Input), Bits 6–4 = 001 (6 bits per color channel), Bits 3–0 = 0101 (DisplayPort).

But I see that your original EDID's byte 20 is already "95" and it tells you already have normal color depth. My problem was that my byte 20 was "80" that corresponds to binary 1000000 which means undefined color depth and undefined video interface. So changing it to "95" works for me.

Maybe you can try setting byte 20 to "A5" (binary 10100101), as late apple devices claim to have 8 bits per channel resulting in total 32 bit color depth, but people in Apple Forums say it is fake 32 bits because of dithering... But maybe your display is really 32 bit so it needs this setting.

Also are you sure your problem is in color depth, not in color profile? You can change color profile in "Settings" > "Monitor".
 
Setting 16 bits per channel is wrong, apple devices are 6 bits per channel: 6 for Red, 6 for Green and 6 for Blue, that gives 18 + 6 for Gamma (not sure) = 24 bit color in total, as shown in "About this Mac" info. So you should set byte 20 to "95" which is 10010101 in binary, where Bit 7=1 (Digital Input), Bits 6–4 = 001 (6 bits per color channel), Bits 3–0 = 0101 (DisplayPort).

But I see that your original EDID's byte 20 is already "95" and it tells you already have normal color depth. My problem was that my byte 20 was "80" that corresponds to binary 1000000 which means undefined color depth and undefined video interface. So changing it to "95" works for me.

Maybe you can try setting byte 20 to "A5" (binary 10100101), as late apple devices claim to have 8 bits per channel resulting in total 32 bit color depth, but people in Apple Forums say it is fake 32 bits because of dithering... But maybe your display is really 32 bit so it needs this setting.

Also are you sure your problem is in color depth, not in color profile? You can change color profile in "Settings" > "Monitor".

No, problem definitely was not in Color Profile, color banding issue was quite obvious in everything that had a gradient, mostly in Launchpad's background.

I tried changing it to 8bits per channel, still didn't work. Funny thing, System Profiler didn't recognize my screen to neither 24bits color nor to 32bits color, but to 30bits color.

I finally solved it by using the HD620 spoof config.plist, that was supposed to be used only in mac OS prior to 10.12.6

Spoofing my Kabylake graphics as Skylake graphics has fixed the issue. I guess this is not ideal, but I have been to busy to go reinstall High Sierra.

Now System Profiler recognizes my screen as 24bits, with no EDID injection.
 
@RehabMan fork of WhateverGreen / Spoof_fix2 branch added support for skylake spoofing.

It fixes the HDMI problems and the blur and super pixelated images/shadows on Kaby Lake Platform on macOS Mojave.

i attached the kext that i built from source.

You have to change ig-platform-id & device-id to skylake, via config.plist /Devices/Properties/PciRoot(0)/Pci(0x02,0) here is my example on my Lenovo V330-15IKB with Kaby Lake R/UHD 620:

View attachment 359461

copy the kext to desktop, open terminal and write these commands:
Code:
cd desktop
sudo cp -R WhateverGreen.kext /Library/Extensions/
Then you rebuild caches with:
Code:
sudo kextcache -i /

Enjoy your laptop display at it's best.
This fix also fixed my color banding issue on my ThinkPad T470. Funny enough, Mojave still seems to think that my GPU is Kaby Lake.
 
Status
Not open for further replies.
Back
Top