SUMMARY HDR content has a mastering luminance, f.e. 1000, 2000, 5000 or 10.000 nits. The display has a maximum brightness it can display, f.e. 1150 nits. Plasma allows to limit the display to a number below its capabilities in the system settings to a value <= the display's capability, f.e. to 1000 nits. For HDR content that has a higher mastering luminance than the set limit in the system settings, KWin has to do some sort of luminance limiting to prevent an image that is too bright and shows color artifacts. This works when an application is in windowed mode or in fullscreen, but the hardware cursor is still shown. Unfortunately this color transformation seems not to be active, when applications get into the state "direct scanout", which can happen when they are in fullscreen and the cursor goes away. This can be seen using mpv with the parameters and a video that has a mastering luminance higher than the set limit in the system settings: `mpv --vo=dmabuf-wayland "path/to/video"` To show the issue drastically one can use a 10.000 nits video file. This leads to the problem that full screen video with a mastering luminance higher than the set limit in kwin cannot be accurately displayed, sometimes making the image unwatchable. As far as I can understand, kwin should be able to apply luminance limiting also in direct scanout, so fullscreen applications can display HDR content the same as non fullscreen applications. STEPS TO REPRODUCE 1. Activate HDR in KDE Plasma with a monitor that has less than 10.000 nits of max. luminance. 2. Open a video file with a mastering luminance of 10.000 nits in mpv with `mpv --vo=dmabuf-wayland "path/to/video"`, enable fullscreen and wait three seconds until the mouse cursor disappears. OBSERVED RESULT As soon as the mouse cursor disappears (and direct scanout gets activated) the image becomes a lot brighter and obviously incorrect. EXPECTED RESULT As soon as the mouse cursor disappears the image should stay the same as with mouse cursor or as in windowed mode. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.18.2-arch2-1 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor Memory: 32 GiB of RAM (31.3 GiB usable) Graphics Processor: AMD Radeon RX 6900 XT
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8635
*** Bug 514957 has been marked as a duplicate of this bug. ***
Git commit ed12505a540910de28faf2c19e30dcc77315c0c5 by Xaver Hugl. Committed on 10/02/2026 at 15:52. Pushed by zamundaaa into branch 'master'. core/colorpipeline: add a clamping operation Does exactly what it says. It's needed to ensure the shader and KMS behave the same: clamping the output to the screen's configured max luminance. To prevent performance regressions, the clamping operation is only added if necessary - which it generally isn't with normal SDR content buffers. M +1 -1 autotests/test_colorspaces.cpp M +6 -7 src/backends/drm/drm_colorop.cpp M +42 -2 src/core/colorpipeline.cpp M +19 -2 src/core/colorpipeline.h M +3 -1 src/scene/itemrenderer_opengl.cpp M +1 -0 src/scene/itemrenderer_opengl.h M +14 -0 src/scene/surfaceitem.cpp M +2 -0 src/scene/surfaceitem.h https://invent.kde.org/plasma/kwin/-/commit/ed12505a540910de28faf2c19e30dcc77315c0c5
Git commit 9973b1d6946defb361cee94aa4d3eee1d32368fc by Xaver Hugl. Committed on 11/02/2026 at 12:59. Pushed by zamundaaa into branch 'Plasma/6.6'. core/colorpipeline: add a clamping operation Does exactly what it says. It's needed to ensure the shader and KMS behave the same: clamping the output to the screen's configured max luminance. To prevent performance regressions, the clamping operation is only added if necessary - which it generally isn't with normal SDR content buffers. (cherry picked from commit ed12505a540910de28faf2c19e30dcc77315c0c5) Co-authored-by: Xaver Hugl <xaver.hugl@kde.org> M +1 -1 autotests/test_colorspaces.cpp M +6 -7 src/backends/drm/drm_colorop.cpp M +42 -2 src/core/colorpipeline.cpp M +19 -2 src/core/colorpipeline.h M +3 -1 src/scene/itemrenderer_opengl.cpp M +1 -0 src/scene/itemrenderer_opengl.h M +14 -0 src/scene/surfaceitem.cpp M +2 -0 src/scene/surfaceitem.h https://invent.kde.org/plasma/kwin/-/commit/9973b1d6946defb361cee94aa4d3eee1d32368fc
[