Bug 479749

Summary: [Intel] Enabling "Colorblindness Correction" Desktop Effect make the screen almost all white instead.
Product: [Plasma] kwin Reporter: dmatteo002
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: grave CC: bugseforuns, dmatteo002, hedim74889, nate, qydwhotmail, xaver.hugl
Priority: NOR Keywords: qt6
Version First Reported In: 5.92.0Flags: qydwhotmail: Intel+
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Image of screen after setting change

Description dmatteo002 2024-01-13 16:36:11 UTC
Created attachment 164869 [details]
Image of screen after setting change

SUMMARY
The screen after changing that setting is almost completly white but it is only a graphical problem, as in the system still work as normal.
It became whiter as time goes on so, so maybe it is some kind of multiplicative effect where the effect is applied on the same image multiple times.


STEPS TO REPRODUCE
1.  Go to Window Managment -> Desktop Effects
2. Enable Colorblindness Correction
3. Click apply 
* This apply to both 5.92.0 and today's master branch.

OBSERVED RESULT
The screen is almost completly white. When enabling it become more and more white.
It is still possible to disable it by entering overview, understanding where to click (or to tab to) and disable colorblindess and click apply again.

EXPECTED RESULT
The screen should have slightly different colors.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Kernel Version: 6.7.0-arch2-1 (64-bit)
Graphics Platform: Wayland
Graphics Processor: Intel


ADDITIONAL INFORMATION
I think it is a major bug because it could make it almost unusable and it is diffult to disable it.
Comment 1 Mintra 2024-01-16 05:16:18 UTC
I can confirm this on Fedora rawhide RC1
Comment 2 Fushan Wen 2024-01-17 03:44:26 UTC
Cannot reproduce on X11, AMD
Comment 3 Mintra 2024-01-17 09:49:07 UTC
(In reply to Fushan Wen from comment #2)
> Cannot reproduce on X11, AMD

Then maybe it is a wayland only issue. Fedora has dropped the x11 session so I can't test it.
Comment 4 Mintra 2024-01-17 09:49:40 UTC
(In reply to Fushan Wen from comment #2)
> Cannot reproduce on X11, AMD

Then maybe it is a wayland only issue. Fedora has dropped the x11 session so I can't test it.
Comment 5 dmatteo002 2024-01-17 10:37:53 UTC
Reproducable in x11 on intel graphics
Comment 6 Zamundaaa 2024-01-17 11:02:12 UTC
I can reproduce some weirdness too; in my case the screen goes very dark instead of bright. Not sure what's causing it though
Comment 7 dmatteo002 2024-01-17 11:55:27 UTC
On amd this does not uccur (neither in wayland nor in x11).
But i can reproduce it on the nouveau driver (i cannot test on nvidia prioprietary driver because it blackscreen at the moment)
Comment 8 Bug Janitor Service 2024-01-19 10:32:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4994
Comment 9 Vlad Zahorodnii 2024-01-19 14:44:22 UTC
Git commit 4cc94e9462cdac8a60db26e34573dcd07231cd9f by Vlad Zahorodnii.
Committed on 19/01/2024 at 15:23.
Pushed by vladz into branch 'master'.

plugins/colorblindnesscorrection: Fix screen becoming white on intel machines

correction.a is uninitialized. It creates problems on intel machines.

M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Deutranopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Deutranopia_core.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Protanopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Protanopia_core.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Tritanopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Tritanopia_core.frag

https://invent.kde.org/plasma/kwin/-/commit/4cc94e9462cdac8a60db26e34573dcd07231cd9f
Comment 10 Vlad Zahorodnii 2024-01-22 08:34:18 UTC
Git commit 22b5634f99eb5514098ad323dfaa944acf54ebf7 by Vlad Zahorodnii.
Committed on 22/01/2024 at 09:33.
Pushed by vladz into branch 'Plasma/6.0'.

plugins/colorblindnesscorrection: Fix screen becoming white on intel machines

correction.a is uninitialized. It creates problems on intel machines.
(cherry picked from commit 4cc94e9462cdac8a60db26e34573dcd07231cd9f)

M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Deutranopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Deutranopia_core.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Protanopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Protanopia_core.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Tritanopia.frag
M  +4    -6    src/plugins/colorblindnesscorrection/shaders/Tritanopia_core.frag

https://invent.kde.org/plasma/kwin/-/commit/22b5634f99eb5514098ad323dfaa944acf54ebf7