Bug 495026 - ICC profiles applied incorrectly.
Summary: ICC profiles applied incorrectly.
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (other bugs)
Version First Reported In: 6.2.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-19 05:09 UTC by max
Modified: 2024-12-04 16:48 UTC (History)
2 users (show)

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


Attachments
two icc profiles, and a visual output from my colorimeter showing the problem (1.89 MB, application/zip)
2024-10-19 05:09 UTC, max
Details

Note You need to log in before you can comment on or make changes to this bug.
Description max 2024-10-19 05:09:50 UTC
Created attachment 175012 [details]
two icc profiles, and a visual output from my colorimeter showing the problem

I have created an ICC profile to calibrate my monitor using displaycal, and a spyder4 pro colorimeter. When I apply that profile, something is going wrong, which is confirmed by the colorimeter not matching up. When I apply the same profile directly in inkscape or gimp, it looks very accurate and the colorimeter reports the colors as correct.

The process for calibration was:
1. Disable color management in kwin by setting Color Profile to None in system settings
2. Run calibration
3. Take the generated icc profile, and tell kwin to use it
4. Notice that the colors look off 

Steps to reproduce with the supplied file 
1. Load the icc profile for a monitor in Display and Monitor -> Display Configuration -> Color Profile -> ICC profile
2. Open inkscape and make a box with 40% grey
3. Note the color of the grey box. It's definitely not going to be a neutral grey, since your monitor won't match mine, but it should look like something
4. Set the kwin icc profile back to None
5. Tell inkscape to use the icc profile as the display profile in Preferences -> Input/Output -> Color management -> display profile
6. enable color management for the document in view -> color management
7. note how the color of the 40% grey box is different from when kwin was applying the profile. 

Interestingly, when I calibrate another one of my monitors, which has less aggressive corrections, that mostly seems to work, though it's hard to tell since the changes are much more subtle. I've attached that profile as well.

Monitor 2 #2 2024-10-18 20-40 D6500 2 F-S XYZLUT+MTX.icc is the aggressive calibration that's applied incorrectly
Monitor 1 #1 2024-10-18 13-21 D6500 2.2 F-S XYZLUT+MTX.icc is the less aggressive calibration that's maybe applied correctly, or maybe just too subtle to notice

Linux/KDE Plasma: 6.2.1
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Comment 1 Zamundaaa 2024-10-19 13:24:48 UTC
When you profile your display in the Wayland session, you must not do any calibration, as DisplayCAL relies on X11 to apply the "calibration" LUTs, and that just doesn't do anything. You need to either disable the calibration for profiling on Wayland (see https://zamundaaa.github.io/wayland/2024/07/16/how-to-profile.html if you're not sure how to do that, also contains a guide for how to verify the profile), or create the profile on X11.

The difference between Inkscape applying the ICC profile and KWin doing it is that KWin applies the whole profile + the calibration saved in the profile, and Inkscape only applies the profile without calibration (expecting another system component to apply the calibration instead).