Bug 514239 - [Feature request] Add the ability to set an ICC profile with HDR enabled
Summary: [Feature request] Add the ability to set an ICC profile with HDR enabled
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-06 19:19 UTC by fililip
Modified: 2026-05-07 21:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report:


Attachments
Synthetic HDR ICC profile with BT.2020 color primaries (13.80 KB, application/vnd.iccprofile)
2026-01-27 12:10 UTC, Alicia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fililip 2026-01-06 19:19:20 UTC
There is no way to set an ICC profile for a display when HDR is enabled. A display with broken/overrepresented built-in color primaries in its EDID will show desaturated sRGB content vs. a properly factory-calibrated OLED panel if the sRGB intensity slider is set to 0%. Similar desaturation is observed by setting 'Built-in' as the color profile option, but for non-HDR workflows there is a way to set an ICC profile.
Comment 1 Zamundaaa 2026-01-08 17:11:34 UTC
Could you attach an ICC profile for an HDR screen here? I could use one for testing.
Comment 2 Bug Janitor Service 2026-01-08 17:19:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8613
Comment 3 fililip 2026-01-08 20:10:59 UTC
I don't have a colorimeter (yet), so I'm not sure how I can obtain a profile for the primary-overrepresented IPS display that I have right now, is there an alternative way to get it (i.e. by somehow extracting what KWin uses for the "built-in" profile)?
Comment 4 Zamundaaa 2026-01-12 20:40:35 UTC
No, that wouldn't be useful. I'll have to see if I can extract one from a Windows install.
Comment 5 Alicia 2026-01-27 12:10:18 UTC
Created attachment 188943 [details]
Synthetic HDR ICC profile with BT.2020 color primaries

I have a monitor with a mis-calibrated HDR colorspace that causes desaturated colors for both wide color-gamut/HDR and SDR content. I do not have a colorimeter, but when I used windows I generated an ICC profile based off my monitor's EDID but with color info replaced with BT.2020 primaries. It wasn't perfect, but it made a noticeable improvement on color accuracy. I'll attach the synthetic HDR profile.
Comment 6 fireculex 2026-02-27 22:44:52 UTC
I have a monitor that uses Gamma HDR instead of PQ.  I've generated a .cal file with bt 2390 and apply it using dispwin in W11. Being able to apply a 1D LUT or ICC profile is necessary for HDR to be usable on this display.
Comment 7 Zamundaaa 2026-05-06 14:53:33 UTC
Git commit 7e019dfb6fd6250df9b7830ce9e704c48cc4b16f by Xaver Hugl.
Committed on 06/05/2026 at 14:29.
Pushed by zamundaaa into branch 'master'.

backends/drm: allow using ICC profiles with HDR

There are two cases supported for this:
- profiles without MHC2, which are just normal ICC profiles that were created
  while the display is in HDR mode
- profiles with MHC2, which work like normal ICC profiles, except the primaries
  sent to the display are always assumed to be BT.2020, and the primares of the
  ICC profile are assumed to be the native primaries of the display

The normal HDR calibration data the user can set (max_cll, max_fall and max
reference luminance) is ignored in favor of the values in the ICC profile, to
allow users to more conveniently switch between different profiles.

M  +40   -19   src/backends/drm/drm_output.cpp
M  +16   -0    src/core/backendoutput.cpp
M  +8    -0    src/core/backendoutput.h
M  +3    -0    src/core/outputconfiguration.h
M  +5    -1    src/opengl/icc_shader.cpp
M  +49   -18   src/outputconfigurationstore.cpp
M  +2    -0    src/outputconfigurationstore.h
M  +67   -12   src/wayland/outputdevice_v2.cpp
M  +2    -0    src/wayland/outputdevice_v2.h
M  +43   -12   src/wayland/outputmanagement_v2.cpp

https://invent.kde.org/plasma/kwin/-/commit/7e019dfb6fd6250df9b7830ce9e704c48cc4b16f