SUMMARY Black level is elevated when HDR is enabled. STEPS TO REPRODUCE 1. Install kwin 6.1.90-1 2. Enable hdr. 3. Open a black sdr image in any app or a black hdr video in mpv. 4. It's gray. OBSERVED RESULT Blacks show up as a dark tone of gray. EXPECTED RESULT Blacks are black SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.1.90 KDE Frameworks Version: 6.6.0 Qt Version: 6.8.0 Kernel Version: 6.10.10-arch1-1 (64-bit) ADDITIONAL INFORMATION This doesn't happen if I downgrade kwin to 6.1.5-2. Monitor connected to amd igpu via dp. Tried enabling hdr without wcg with kscreen-doctor, the issue remains. Doesn't happen with hdr disabled.
Tried opening the same hdr video in mpv with hdr enabled and disabled side by side. The black in the hdr one seems very slightly darker. SDR Brightness setting mostly doesn't seem to affect the black level in either. System tray brightness slider linearly decreases the black levels in both until 3%. At 3% and below the blacks successfully crush (backlight turns off as it did in 6.1.5-2) when sdr brightness is set to the nits in the table or *above*: (Values change slightly based on window size) HDR | SDR 3% 900 900 2% 340 670 1% 300 530 0% 270 440
hmm, can confirm. KWin does black point compensation to get the SDR black levels down to what you'd expect (the minimum brightness of the screen), but it seems like telling screens to show the minimum brightness they can show does not actually do that. Stupid screens... What minimum brightness does your screen have? You can look it up with > kscreen-doctor -o If you override the minimum brightness KWin uses for the screen to be 0, does it also work correctly for you? You can do that with > kscreen-doctor output.1.minBrightnessOverride.0
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6565
`minBrightnessOverride` works, thanks. The minimum brightness was something like 0.027 but it's gone now that I overwrote it. I'd also like to note that the other reported values (like max average brightnes) don't match the monitor's rtings review or my amateur measurements neither. Hdr screens are quirky indeed
Git commit c8849b83c165b2002b59f1a48f0122544efe6c0d by Xaver Hugl. Committed on 05/10/2024 at 00:29. Pushed by zamundaaa into branch 'master'. backends/drm: work around HDR screens being stupid about the minimum luminance Apparently some HDR screens only show the minimum luminance if you send them a value of zero, instead of the minimum luminance they report in the EDID. To work around that, assume the minimum value of the transfer function instead of what the screen reports as the minimum. M +3 -1 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/c8849b83c165b2002b59f1a48f0122544efe6c0d
Git commit f185221f30df588572f314f44d93239d0f0a8135 by Xaver Hugl. Committed on 05/10/2024 at 01:45. Pushed by zamundaaa into branch 'Plasma/6.2'. backends/drm: work around HDR screens being stupid about the minimum luminance Apparently some HDR screens only show the minimum luminance if you send them a value of zero, instead of the minimum luminance they report in the EDID. To work around that, assume the minimum value of the transfer function instead of what the screen reports as the minimum. (cherry picked from commit c8849b83c165b2002b59f1a48f0122544efe6c0d) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +3 -1 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/f185221f30df588572f314f44d93239d0f0a8135