Bug 492890 - [wayland] Night Color does not work if an ICC profile is set
Summary: [wayland] Night Color does not work if an ICC profile is set
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: night color (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
: 493076 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-09 15:14 UTC by Prajna Sariputra
Modified: 2024-09-17 21:14 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prajna Sariputra 2024-09-09 15:14:19 UTC
SUMMARY
With git master Plasma 6 compiled via kdesrc-build, if I set an ICC profile while Night Color is enabled then the latter has no effect, the orange tint disappears and enabling/disabling Night Color has no effect.

Setting the color profile to either None or Built-in allows Night Color to work properly again, although in my case I don't think the screen has a built in profile.


STEPS TO REPRODUCE
1. Set an ICC profile for the screen
2. Enable Night Color (possibly set it to always on for easier testing)

OBSERVED RESULT
Nothing happens

EXPECTED RESULT
The screen gets an orange tint

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.10.8-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800H with Radeon Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon 680M


ADDITIONAL INFORMATION
KWin is at commit 8b95810e17ff293599f9cd6a952e613e36e3d375 (dated 7 Sept).

Not sure when exactly the regression happened since I don't use ICC profiles plus Night Light often (only when on battery power, due to something about AMD display power savings?) and I haven't had time to do a bisect unfortunately, but I think I first noticed it a few weeks ago or something like that.
Comment 1 Bug Janitor Service 2024-09-14 14:14:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6381
Comment 2 Zamundaaa 2024-09-17 12:59:10 UTC
Git commit 5fde036d748f12db2862627727eadac7715d59f4 by Xaver Hugl.
Committed on 17/09/2024 at 12:50.
Pushed by zamundaaa into branch 'master'.

backends/drm: fix night light not being applied with ICC profiles

As we opportunistically use KMS outside of ICC profiles to apply night light,
we need to explicitly set the shader fallback option to make it be applied in
shaders instead.

M  +1    -0    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/5fde036d748f12db2862627727eadac7715d59f4
Comment 3 Zamundaaa 2024-09-17 13:29:00 UTC
Git commit 971b644197ad9b48170055b682ec1d6b51a9d4aa by Xaver Hugl.
Committed on 17/09/2024 at 13:08.
Pushed by zamundaaa into branch 'Plasma/6.2'.

backends/drm: fix night light not being applied with ICC profiles

As we opportunistically use KMS outside of ICC profiles to apply night light,
we need to explicitly set the shader fallback option to make it be applied in
shaders instead.


(cherry picked from commit 5fde036d748f12db2862627727eadac7715d59f4)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +1    -0    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/971b644197ad9b48170055b682ec1d6b51a9d4aa
Comment 4 Nate Graham 2024-09-17 21:14:12 UTC
*** Bug 493076 has been marked as a duplicate of this bug. ***