Bug 513691

Summary: Vendor (HP) sRGB color profile has weird color inaccuracy after update
Product: [Plasma] kwin Reporter: nethshanperis
Component: colour-managementAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: nate, xaver.hugl
Priority: NOR Keywords: regression
Version First Reported In: 6.5.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.6
Sentry Crash Report:
Attachments: HP sRGB Colour profile from windows
DCI-P3 colour profile (HP)
Default colour profile (HP)
Native colour profile (HP)
sRGB (taken from phone)
Default (taken from phone)

Description nethshanperis 2025-12-22 05:55:13 UTC
Created attachment 187863 [details]
HP sRGB Colour profile from windows

SUMMARY
Ever since i updated to 6.5.3, applying my HP sRGB icc profile would make the colors look weird. Everything looks desaturated but the reds, oranges and the likes look dark and punchy. 

STEPS TO REPRODUCE
1. Update to 6.5.3 or above
2. Apply the attached sRGB profile in KDE Settings

OBSERVED RESULT
Colours look desaturated. The reds, oranges and the likes look dark and punchy. 

EXPECTED RESULT
Colours must look normal and usable. 

SOFTWARE/OS VERSIONS
Operating System: Aurora 43
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.17.7-300.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 22 × Intel® Core™ Ultra 7 155H
Memory: 16 GiB of RAM (15.0 GiB usable)
Graphics Processor: Intel® Arc
Manufacturer: HP
Product Name: HP Spectre x360 2-in-1 Laptop 14-eu0xxx

ADDITIONAL INFORMATION
I imported the icm file from windows. Prior to 6.5.3, everything looked normal.
Comment 1 Zamundaaa 2026-01-21 21:19:51 UTC
The profile has a MHC2 tag, which I added support for in 6.5.3. The colors from before were incorrect... which doesn't necessarily mean there isn't still an issue though.

Does your screen have a normal ICC profile that you can compare the hacky "sRGB" profile with? Either visually, or if you attach it here, I could also run both through an autotest and compare the resulting images directly.
Comment 2 nethshanperis 2026-01-23 12:07:54 UTC
> Does your screen have a normal ICC profile...
Im sorry im not sure what this means? Its an HP laptop so im assuming there is no readily available ICC profile on linux unfortunately. But there are other ICC profiles that I was able to extract from Windows that the laptop supports (not generic ones but ones from HP themselves) that work pretty well, for example, the DCI P3 profile. I will upload attachments shortly.
Comment 3 nethshanperis 2026-01-23 12:16:39 UTC
Created attachment 188814 [details]
DCI-P3 colour profile (HP)
Comment 4 nethshanperis 2026-01-23 12:17:38 UTC
Created attachment 188815 [details]
Default colour profile (HP)
Comment 5 nethshanperis 2026-01-23 12:18:28 UTC
Created attachment 188816 [details]
Native colour profile (HP)
Comment 6 nethshanperis 2026-01-23 12:24:12 UTC
> Either visually, or if you attach it here...
i took screenshots but the sRGB profile's colour issue, although can be seen in Spectacle's screenshot preview, cannot be seen in Gwenview. Regardless here are some photos i took from my phone of the Default profile and P3 profile. (Native profile gives me similar colour to Default so i wont provide any attachments of that). 

Also there are other HP ICC profiles that I haven't provided like Work, Low Light, Printing, etc... The above photos are taken with sRGB intesity at 50%. Lmk if you need anything else. TIA!
Comment 7 nethshanperis 2026-01-23 12:44:10 UTC
Created attachment 188823 [details]
sRGB (taken from phone)

sRGB intensity at 50%. Notice Brave's (kickoff and panel) orange colour looking like red. Notice the unsaturated look in Kate's icon (kickoff). Notice the weird look on OnlyOffice Icon in the panel. Compare this with the Default photo.
Comment 8 nethshanperis 2026-01-23 12:45:14 UTC
Created attachment 188824 [details]
Default (taken from phone)
Comment 9 Zamundaaa 2026-01-23 13:59:53 UTC
The "native" profile is a normal one, "default" additionally has a MHC2 tag, which however doesn't seem to do anything bad. It also has brightness information in it, so the "default" one is the best to use.
All other profiles are bad hacks that break stuff, and I don't quite understand why manufacturers create confusion with them.

We should ensure they work correctly anyways.

(In reply to nethshanperis from comment #6)
> > Either visually, or if you attach it here...
> i took screenshots but the sRGB profile's colour issue, although can be seen
> in Spectacle's screenshot preview, cannot be seen in Gwenview.
Screenshots are rendered in sRGB without any ICC profile, so that's not too unexpected.

> Also there are other HP ICC profiles that I haven't provided like Work, Low
> Light, Printing, etc... The above photos are taken with sRGB intesity at
> 50%. Lmk if you need anything else. TIA!
Does setting sRGB intensity to 0% change anything? In theory it shouldn't do anything at all with the sRGB profile. If it does, then that could be the issue.
Comment 10 nethshanperis 2026-01-26 04:42:54 UTC
> We should ensure they work correctly anyways.
<3

> Does setting sRGB intensity to 0% change anything? In theory it shouldn't do anything at all with the sRGB profile.
Yes u r right. it didnt do anything! 

> so the "default" one is the best to use
Thanks for this!
Comment 11 Bug Janitor Service 2026-02-05 00:23:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8746
Comment 12 Zamundaaa 2026-02-05 14:59:56 UTC
Git commit d11b9a173993768a25616d8235436ad36e58917c by Xaver Hugl.
Committed on 05/02/2026 at 14:12.
Pushed by zamundaaa into branch 'master'.

opengl/icc_shader: more properly apply the MHC2 tag

For shaper+matrix profiles, the matrix was applied in RGB... but it needs to be
applied in XYZ space, with an additional unintuitive step to convert back to RGB
after it.
The spec also doesn't describe how you'd correctly apply it in combination with
BToA tags, so the tag forces the shaper+matrix path from now on.

The previous code resulting in visually correct results with some profiles was
merely a coincidence, so this adds an additional autotest case to verify the
correctness more objectively.

A  +-    --    autotests/data/HP 'Native' profile.icc
A  +-    --    autotests/data/HP 'sRGB' profile with MHC2.icc
M  +12   -5    autotests/test_colorspaces.cpp
M  +5    -2    src/backends/drm/drm_output.cpp
M  +14   -2    src/opengl/icc_shader.cpp

https://invent.kde.org/plasma/kwin/-/commit/d11b9a173993768a25616d8235436ad36e58917c
Comment 13 Zamundaaa 2026-02-05 21:32:48 UTC
Git commit a153f9614c47b6c1136f3ed779906eef909140c1 by Xaver Hugl.
Committed on 05/02/2026 at 21:09.
Pushed by zamundaaa into branch 'Plasma/6.6'.

opengl/icc_shader: more properly apply the MHC2 tag

For shaper+matrix profiles, the matrix was applied in RGB... but it needs to be
applied in XYZ space, with an additional unintuitive step to convert back to RGB
after it.
The spec also doesn't describe how you'd correctly apply it in combination with
BToA tags, so the tag forces the shaper+matrix path from now on.

The previous code resulting in visually correct results with some profiles was
merely a coincidence, so this adds an additional autotest case to verify the
correctness more objectively.


(cherry picked from commit d11b9a173993768a25616d8235436ad36e58917c)

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

A  +-    --    autotests/data/HP 'Native' profile.icc
A  +-    --    autotests/data/HP 'sRGB' profile with MHC2.icc
M  +12   -5    autotests/test_colorspaces.cpp
M  +5    -2    src/backends/drm/drm_output.cpp
M  +14   -2    src/opengl/icc_shader.cpp

https://invent.kde.org/plasma/kwin/-/commit/a153f9614c47b6c1136f3ed779906eef909140c1
Comment 14 Zamundaaa 2026-02-05 21:37:25 UTC
Git commit 34c37b9de475b1051ce06807631de059e59bd1fb by Xaver Hugl.
Committed on 05/02/2026 at 21:09.
Pushed by zamundaaa into branch 'Plasma/6.5'.

opengl/icc_shader: more properly apply the MHC2 tag

For shaper+matrix profiles, the matrix was applied in RGB... but it needs to be
applied in XYZ space, with an additional unintuitive step to convert back to RGB
after it.
The spec also doesn't describe how you'd correctly apply it in combination with
BToA tags, so the tag forces the shaper+matrix path from now on.

The previous code resulting in visually correct results with some profiles was
merely a coincidence, so this adds an additional autotest case to verify the
correctness more objectively.


(cherry picked from commit d11b9a173993768a25616d8235436ad36e58917c)

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

A  +-    --    autotests/data/HP 'Native' profile.icc
A  +-    --    autotests/data/HP 'sRGB' profile with MHC2.icc
M  +12   -5    autotests/test_colorspaces.cpp
M  +5    -2    src/backends/drm/drm_output.cpp
M  +14   -2    src/opengl/icc_shader.cpp

https://invent.kde.org/plasma/kwin/-/commit/34c37b9de475b1051ce06807631de059e59bd1fb