Bug 508999 - Old screen content sometimes not updated with color blindness correction enabled
Summary: Old screen content sometimes not updated with color blindness correction enabled
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (other bugs)
Version First Reported In: 6.3.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-01 12:03 UTC by the.real.icecream95
Modified: 2025-10-17 20:29 UTC (History)
2 users (show)

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


Attachments
Demonstrates the bug, with closed context menus still visible (334.83 KB, image/jpeg)
2025-09-01 12:03 UTC, the.real.icecream95
Details

Note You need to log in before you can comment on or make changes to this bug.
Description the.real.icecream95 2025-09-01 12:03:25 UTC
Created attachment 184622 [details]
Demonstrates the bug, with closed context menus still visible

SUMMARY

When Colour blindness correction or the invert effect is enabled,
I see a number of graphical glitches.

The most obvious is that when reading a PDF in Firefox, context
menus do not disappear from the screen when closed.

STEPS TO REPRODUCE
1. Enable Colour blindness correction 
2. Start Firefox (using Wayland)
3. Open a PDF file
4. Zoom out so that the pdf.js background is visible
5. Right click in various places on the background

OBSERVED RESULT

The old context menus stay on the screen and do not disappear after being dismissed.

EXPECTED RESULT

The context menus disappear when closed.

SOFTWARE/OS VERSIONS
Operating System: Ubuntu 25.04
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3
Graphics Processor: Adreno X1-85

ADDITIONAL INFORMATION

Bisected to

commit 6bd07ad6b30e34f43652934630d30234ad65ac7c (HEAD)
Author: Xaver Hugl <xaver.hugl@gmail.com>
Date:   Tue Jul 9 12:09:33 2024 +0200

    backends/drm: remove the shadow buffer when possible, and reduce it to 10bpc when not
    
    Using the custom values for min. and max. luminance in transfer functions, we can reduce the
    ranges of values in the shadow buffer to be limited to [0, 1], and with that we can switch
    from a floating point buffer back to a normalized format. As gamma 2.2 encoding is much more
    efficient at storing color values, this also drops the buffer from 16bpc down to 10bpc.
    
    Furthermore, this offloads the gamma 2.2 -> PQ conversion to KMS when possible, and then uses
    the scanout buffer with gamma 2.2 encoding directly. This way the shadow buffer gets completely
    skipped and performance and efficiency get improved a lot.
    
    BUG: 491452
    CCBUG: 477223
Comment 1 Bug Janitor Service 2025-09-01 12:33:40 UTC
Thank you for the bug report!

However Plasma 6.3.4 no longer receives updates or maintenance from KDE; active versions are 6.4 or newer. Please upgrade to an active version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.

If you need help with Plasma 6.3.4, please contact your distribution, who bears the responsibility of providing help for older releases that are no longer receiving updates from KDE.

If you can reproduce the issue after upgrading to an active version, feel free to re-open this bug report.
Comment 2 the.real.icecream95 2025-09-03 08:42:57 UTC
Reproduced with kwin 6.4.4.
Comment 3 Bug Janitor Service 2025-10-13 16:03:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8245
Comment 4 Zamundaaa 2025-10-15 15:35:14 UTC
Git commit 0d35d05d988a60d739b38a6a5a4d3258ea3844e0 by Xaver Hugl.
Committed on 15/10/2025 at 14:54.
Pushed by zamundaaa into branch 'master'.

scene/windowitem: emit Window::damaged when subsurfaces get removed too

Otherwise we miss some necessary repaints in offscreen effects.

M  +3    -0    src/scene/item.cpp
M  +2    -0    src/scene/item.h
M  +2    -0    src/scene/windowitem.cpp

https://invent.kde.org/plasma/kwin/-/commit/0d35d05d988a60d739b38a6a5a4d3258ea3844e0
Comment 5 Zamundaaa 2025-10-15 16:07:07 UTC
Git commit af0ce59feec294f3159d27ef9727cf5443fc9d61 by Xaver Hugl.
Committed on 15/10/2025 at 15:40.
Pushed by zamundaaa into branch 'Plasma/6.5'.

scene/windowitem: emit Window::damaged when subsurfaces get removed too

Otherwise we miss some necessary repaints in offscreen effects.


(cherry picked from commit 0d35d05d988a60d739b38a6a5a4d3258ea3844e0)

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

M  +3    -0    src/scene/item.cpp
M  +2    -0    src/scene/item.h
M  +2    -0    src/scene/windowitem.cpp

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