Bug 501247 - Shadow Rendering Error w/ Night Light/Built-in Color Profile on Prefer Efficiency
Summary: Shadow Rendering Error w/ Night Light/Built-in Color Profile on Prefer Effici...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: night color (show other bugs)
Version: 6.3.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-09 05:11 UTC by Michael
Modified: 2025-04-12 03:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.5
Sentry Crash Report:


Attachments
Video of the bug (3.34 MB, video/mp4)
2025-03-15 14:55 UTC, Liarus1001
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2025-03-09 05:11:36 UTC
SUMMARY
• With always-on "Night Light" enabled (default settings) and my monitor's "Built-in" color profile on "Prefer efficiency" my shadows have a very noticeable red tinge/opaqueness on black backgrounds.

I am using an AMD Radeon RX 6900 XT and a Dell S2421HGF (non-HDR). This previously wasn't an issue when the color changes hit with 6.3, although I'm not exactly sure when this broke for me. Probably with 6.3.2, as I didn't seem to notice this on 6.3.1.

OBSERVED RESULT
https://files.catbox.moe/bw9hii.jpg

EXPECTED RESULT
Shadows being unnoticeable/black on a dark/black background (and not having a red tinge).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 6.13.5-zen1-1-zen (64-bit)
KDE Plasma Version: 6.3.2
KDE Frameworks Version:  6.11.0
Qt Version: 6.8.2 

ADDITIONAL INFORMATION
• When I use the "None" color profile and "Prefer efficiency" OR "Prefer color accuracy" everything renders as expected besides dark blues (which render more purple than blue), although I suspect that is working as intended or is a quirk of my monitor with night light on? It wasn't an issue prior to 6.3. I was unable to take a photo that demonstrates the problem. Here is a link to the background which renders unexpectedly: https://files.catbox.moe/dhu4lz.png

• When using the "Built-in" color profile and "Prefer color accuracy" everything is working as intended.

• When night light is disabled, everything is perfectly fine, including dark blues, regardless of settings.
Comment 1 Liarus1001 2025-03-15 14:55:34 UTC
Created attachment 179429 [details]
Video of the bug

Video of the bug, left screen is plugged into the GPU, right screen is plugged into the iGPU
Comment 2 Liarus1001 2025-03-15 14:57:58 UTC
(In reply to Liarus1001 from comment #1)
> Created attachment 179429 [details]
> Video of the bug
> 
> Video of the bug, left screen is plugged into the GPU, right screen is
> plugged into the iGPU

Whoops, i had too many tabs open, and i uploaded to the wrong bug form, ignore this, sorry!
Comment 3 Zamundaaa 2025-04-02 16:11:21 UTC
What color temperature do you have night light set to?
It seems like your monitor is just shy of sRGB, so if you have night light set to very low color temperatures, that could cause this sort of issue to appear when it wouldn't without a color profile (which makes KWin assume the screen is perfect sRGB)
Comment 4 Michael 2025-04-03 09:51:55 UTC
(In reply to Zamundaaa from comment #3)
> What color temperature do you have night light set to?
> It seems like your monitor is just shy of sRGB, so if you have night light
> set to very low color temperatures, that could cause this sort of issue to
> appear when it wouldn't without a color profile (which makes KWin assume the
> screen is perfect sRGB)

It's on the default setting - 4500K. Thanks for the explanation!
Comment 5 Bug Janitor Service 2025-04-08 00:23:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7459
Comment 6 Zamundaaa 2025-04-09 11:14:47 UTC
Git commit 36a0f992b110e6c5013beaba0a7a5cb1d003dc4f by Xaver Hugl.
Committed on 09/04/2025 at 11:03.
Pushed by zamundaaa into branch 'master'.

backends/drm: reduce minimum luminance for SDR

The minimum luminance the Wayland protocol uses is 0.2cd/m², which is pretty high
for modern displays, and leads to colors close to black being much more distorted
towards red than expected.

This only affects displays without an ICC profile and in SDR mode.

M  +6    -2    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/36a0f992b110e6c5013beaba0a7a5cb1d003dc4f
Comment 7 Zamundaaa 2025-04-09 13:04:47 UTC
Git commit 61d03d5050b559233224bfd3e2802f859e768336 by Xaver Hugl.
Committed on 09/04/2025 at 12:18.
Pushed by zamundaaa into branch 'Plasma/6.3'.

backends/drm: reduce minimum luminance for SDR

The minimum luminance the Wayland protocol uses is 0.2cd/m², which is pretty high
for modern displays, and leads to colors close to black being much more distorted
towards red than expected.

This only affects displays without an ICC profile and in SDR mode.
(cherry picked from commit 36a0f992b110e6c5013beaba0a7a5cb1d003dc4f)

M  +6    -2    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/61d03d5050b559233224bfd3e2802f859e768336