Bug 498668 - Washed out colors in a VM after 1f832cfc
Summary: Washed out colors in a VM after 1f832cfc
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-14 20:19 UTC by daron439
Modified: 2025-01-15 15:33 UTC (History)
1 user (show)

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


Attachments
with 1f832cfc (1.03 MB, image/png)
2025-01-14 20:19 UTC, daron439
Details
with 1f832cfc reverted (1.18 MB, image/png)
2025-01-14 20:20 UTC, daron439
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daron439 2025-01-14 20:19:28 UTC
Created attachment 177356 [details]
with 1f832cfc

SUMMARY
https://invent.kde.org/plasma/kwin/-/commit/1f832cfc6439d3d2936ee7d5277918bf84504ffe causes washed out colors in a vm. The VM: qemu/kvm, video virtio without 3d acceleration, night light - disabled, color profile - None

STEPS TO REPRODUCE
1. Run kwin in a qemu/kvm vm

OBSERVED RESULT
Washed out colors

EXPECTED RESULT
Colors are alright 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Comment 1 daron439 2025-01-14 20:20:34 UTC
Created attachment 177357 [details]
with 1f832cfc reverted
Comment 2 Zamundaaa 2025-01-14 22:03:10 UTC
Can confirm, not sure why it only happens in VMs, but I think I see how to fix it
Comment 3 Bug Janitor Service 2025-01-14 22:11:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7008
Comment 4 Zamundaaa 2025-01-15 14:45:21 UTC
Git commit 22c519f0bfb41bc2346f0a8ea96445e67ae6267f by Xaver Hugl.
Committed on 15/01/2025 at 14:24.
Pushed by zamundaaa into branch 'master'.

backends/drm: don't use ColorDescription::toOther for calculating channel factors

ColorDescription::toOther adjusts the brightness from the original color description
to the new one, which makes it unsuitable for checking the brightness after the
transformation.
Instead, a new helper in Colorimetry is added that does only the desired calculation
without any brightness changes.

M  +1    -1    src/backends/drm/drm_output.cpp
M  +5    -0    src/core/colorspace.cpp
M  +2    -0    src/core/colorspace.h

https://invent.kde.org/plasma/kwin/-/commit/22c519f0bfb41bc2346f0a8ea96445e67ae6267f
Comment 5 Zamundaaa 2025-01-15 15:33:09 UTC
Git commit b883722857bcb7e971eb9aaeaaa83d2ccd22ba61 by Xaver Hugl.
Committed on 15/01/2025 at 14:56.
Pushed by zamundaaa into branch 'Plasma/6.3'.

backends/drm: don't use ColorDescription::toOther for calculating channel factors

ColorDescription::toOther adjusts the brightness from the original color description
to the new one, which makes it unsuitable for checking the brightness after the
transformation.
Instead, a new helper in Colorimetry is added that does only the desired calculation
without any brightness changes.


(cherry picked from commit 22c519f0bfb41bc2346f0a8ea96445e67ae6267f)

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

M  +1    -1    src/backends/drm/drm_output.cpp
M  +5    -0    src/core/colorspace.cpp
M  +2    -0    src/core/colorspace.h

https://invent.kde.org/plasma/kwin/-/commit/b883722857bcb7e971eb9aaeaaa83d2ccd22ba61