Hey,
My laptop has an HDR screen, which is not compatible with KDE out of the box, but by patching the EDID, I was able to make that screen work.
EDID details
The original EDID included a DisplayID 2.0 section, which Plasma cannot read as of today, so I extracted the part Plasma could read in another block, which made it recognize my screen as HDR.
There may be some critical color handling data missing in that new block though.
$ edid-decode /sys/class/drm/card0-eDP-1/edid
edid-decode (hex):
00 ff ff ff ff ff ff 00 4c 83 97 41 00 00 00 00
00 20 01 04 b5 1e 13 78 03 0b d1 af 51 3d b6 23
0b 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 cb fe 40 64 b0 08 18 70 20 08
88 00 2e bd 10 00 00 1b cb fe 40 64 b0 08 c8 7a
20 08 88 00 2e bd 10 00 00 1b 00 00 00 fd 00 30
78 da da 42 01 00 00 00 00 00 00 00 00 00 00 02
00 01 00 00 19 96 c8 3a 15 46 c8 00 00 00 02 13
70 20 79 02 00 20 00 0c ba 41 59 97 41 00 00 00
00 00 16 00 21 00 1d b8 0b 6c 07 40 0b 08 07 00
f2 ea 50 d7 d3 b6 3d 42 0b 01 45 54 40 5e d0 60
18 10 23 78 26 00 09 07 06 03 00 00 00 50 00 00
22 00 14 e6 f3 09 84 3f 0b 63 00 1f 00 07 00 07
07 17 00 07 00 07 00 81 00 1f 73 1a 00 00 03 03
30 78 00 a0 74 02 60 02 78 00 00 00 00 8d e3 05
80 00 e6 06 05 01 74 60 02 00 00 00 00 00 2f 90
02 03 23 00 73 1a 00 00 03 03 30 78 00 a0 74 02
60 02 78 00 00 00 00 8d e3 05 80 00 e6 06 05 01
74 60 02 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0
----------------
Block 0, Base EDID:
EDID Structure Version & Revision: 1.4
Vendor & Product Identification:
Manufacturer: SDC
Model: 16791
Made in: 2022
Basic Display Parameters & Features:
Digital display
Bits per primary color channel: 10
DisplayPort interface
Maximum image size: 30 cm x 19 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
First detailed timing includes the native pixel format and preferred refresh rate
Display supports continuous frequencies
Color Characteristics:
Red : 0.6835, 0.3164
Green: 0.2402, 0.7138
Blue : 0.1396, 0.0439
White: 0.3125, 0.3291
Established Timings I & II: none
Standard Timings: none
Detailed Timing Descriptors:
DTD 1: 2880x1800 120.001398 Hz 16:10 218.883 kHz 652.270000 MHz (302 mm x 189 mm)
Hfront 32 Hsync 8 Hback 60 Hpol P
Vfront 8 Vsync 8 Vback 8 Vpol N
DTD 2: 2880x1800 48.000559 Hz 16:10 218.883 kHz 652.270000 MHz (302 mm x 189 mm)
Hfront 32 Hsync 8 Hback 60 Hpol P
Vfront 8 Vsync 8 Vback 2744 Vpol N
Display Range Limits:
Monitor ranges (Range Limits Only): 48-120 Hz V, 218-218 kHz H, max dotclock 660 MHz
Manufacturer-Specified Display Descriptor (0x02): 00 02 00 01 00 00 19 96 c8 3a 15 46 c8 00 00 00 '.........:.F....'
Extension blocks: 2
Checksum: 0x13
----------------
Block 1, DisplayID Extension Block:
Version: 2.0
Extension Count: 0
Display Product Primary Use Case: None of the listed primary use cases; generic display
Product Identification Data Block (0x20), OUI BA-41-59:
Product Code: 16791
Year of Manufacture: 2022
Display Parameters Data Block (0x21):
Image size: 300.0 mm x 190.0 mm
Display native pixel format: 2880x1800
Scan Orientation: Left to Right, Top to Bottom
Luminance Information: Minimum guaranteed value
Color Information: CIE 1931
Audio Speaker Information: integrated
Native Color Chromaticity:
Primary #1: (0.684082, 0.315918)
Primary #2: (0.239990, 0.714111)
Primary #3: (0.139893, 0.043945)
White Point: (0.312744, 0.329102)
Native Maximum Luminance (Full Coverage): 400.000000 cd/m^2
Native Maximum Luminance (10% Rectangular Coverage): 616.000000 cd/m^2
Native Minimum Luminance: 0.000500 cd/m^2
Native Color Depth: 12 bpc
Display Device Technology: Organic LED
Native Gamma EOTF: 2.20
Display Interface Features Data Block:
Supported bpc for RGB encoding: 6, 8, 10
Supported bpc for YCbCr 4:4:4 encoding: 8, 10
Supported bpc for YCbCr 4:2:2 encoding: 8, 10
Supported color space and EOTF standard combination 1: DCI-P3, BT.2020/SMPTE ST 2084
Video Timing Modes Type 7 - Detailed Timings Data Block:
DTD: 2880x1800 120.000110 Hz 16:9 218.880 kHz 652.263000 MHz (aspect 16:9, no 3D stereo, preferred)
Hfront 32 Hsync 8 Hback 60 Hpol N
Vfront 8 Vsync 8 Vback 8 Vpol N
CTA-861 DisplayID Data Block:
Vendor-Specific Data Block (AMD), OUI 00-00-1A:
Version: 3
Feature Caps: 0x03
Minimum Refresh Rate: 48 Hz
Maximum Refresh Rate: 120 Hz
Flags 1.x: 0x00
Flags 2.x: 0xa0
Maximum luminance: 116 (616.884 cd/m^2)
Minimum luminance: 2 (0.000 cd/m^2)
Unknown: 0x60 0x02
Colorimetry Data Block:
BT2020RGB
HDR Static Metadata Data Block:
Electro optical transfer functions:
Traditional gamma - SDR luminance range
SMPTE ST2084
Supported static metadata descriptors:
Static metadata type 1
Desired content max luminance: 116 (616.884 cd/m^2)
Desired content max frame-average luminance: 96 (400.000 cd/m^2)
Desired content min luminance: 2 (0.000 cd/m^2)
Checksum: 0x2f
Checksum: 0x90
----------------
Block 2, CTA-861 Extension Block:
Revision: 3
Native detailed modes: 0
Vendor-Specific Data Block (AMD), OUI 00-00-1A:
Version: 3
Feature Caps: 0x03
Minimum Refresh Rate: 48 Hz
Maximum Refresh Rate: 120 Hz
Flags 1.x: 0x00
Flags 2.x: 0xa0
Maximum luminance: 116 (616.884 cd/m^2)
Minimum luminance: 2 (0.000 cd/m^2)
Unknown: 0x60 0x02
Colorimetry Data Block:
BT2020RGB
HDR Static Metadata Data Block:
Electro optical transfer functions:
Traditional gamma - SDR luminance range
SMPTE ST2084
Supported static metadata descriptors:
Static metadata type 1
Desired content max luminance: 116 (616.884 cd/m^2)
Desired content max frame-average luminance: 96 (400.000 cd/m^2)
Desired content min luminance: 2 (0.000 cd/m^2)
Checksum: 0xf0 Unused space in Extension Block: 92 bytes
After turning on HDR, the screen gets noticeably brighter, but the colors are getting off, as if the screen could not display many colors. The System configuration gray background gets slightly green, and I observe color banding on every gradient, such as windows’ backdrop shadow or on the HDR calibration wizard’s gradient.
I tried adding those environment variables, with no success.
KWIN_DRM_PREFER_COLOR_DEPTH=24
KWIN_DRM_ALLOW_INTEL_COLORSPACE=1
I tried turning off Wide Color Gamut with the following command, with no success:
$ kscreen-doctor output.eDP-1.wcg.disable
My computer is running KDE Plasma 6.4.1, on Fedora 42. It has a Core Ultra 7 155H, with only the integrated GPU. The issue is happening with both i915
and xe
drivers.
I am not sure of whether it is a bug, or if it’s because some calibration data is missing because of my EDID patch or anything, so did I miss anything?