Bug 501622

Summary: SDR black has faint glow
Product: [Plasma] kwin Reporter: FK <fk-kde-bugs>
Component: colour-managementAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: nate, xaver.hugl
Priority: NOR    
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description FK 2025-03-17 07:32:58 UTC
SUMMARY
On my OLED screen I use as much black as possible (wallpaper, dark mode). With kwin-6.3.3 I noticed that in SDR mode my "solid color: black" wallpaper appears to have a faint gray. Switching to HDR mode has proper true black again.
This is with no ICC profile configured and "Prefer efficiency" set. Though toying with either didn't appear to change anything. 

Reminds me of a https://bugs.kde.org/show_bug.cgi?id=494854 - except likely no vk_hdr_layer involved.

STEPS TO REPRODUCE
1. Own an OLED
2. Display black in SDR mode
3. Turn down external light sources in your room

OBSERVED RESULT
See the whole screen faintly glowing

EXPECTED RESULT
Only the mouse cursor should emit light

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 46.3 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Zamundaaa 2025-03-24 13:31:47 UTC
Can't replicate that on my LCD's backlight dimming, though the brightness levels they turn on might be different from OLED.

Please attach the output of kscreen-doctor -o
Comment 2 FK 2025-03-24 17:00:54 UTC
(In reply to Zamundaaa from comment #1)
> Can't replicate that on my LCD's backlight dimming, though the brightness
> levels they turn on might be different from OLED.
> 
> Please attach the output of kscreen-doctor -o
SDR:
Output: 4 HDMI-A-1
        enabled
        connected
        priority 1
        HDMI
        Modes:  91:3840x2160@60*!  92:4096x2160@120  93:4096x2160@120  94:4096x2160@100  95:4096x2160@60  96:4096x2160@60  97:4096x2160@50  98:4096x2160@30  99:4096x2160@30  100:4096x2160@25  101:4096x2160@24  102:4096x2160@24  103:3840x2160@120  104:3840x2160@120  105:3840x2160@100  106:3840x2160@60  107:3840x2160@60  108:3840x2160@50  109:3840x2160@30  110:3840x2160@30  111:3840x2160@25  112:3840x2160@24  113:3840x2160@24  114:2560x1440@120  115:1920x1200@60  116:1920x1080@120  117:1920x1080@120  118:1920x1080@100  119:1920x1080@60  120:1920x1080@60  121:1920x1080@60  122:1920x1080@50  123:1920x1080@30  124:1920x1080@30  125:1920x1080@25  126:1920x1080@24  127:1920x1080@24  128:1600x1200@60  129:1680x1050@60  130:1280x1024@60  131:1440x900@60  132:1280x800@60  133:1152x864@60  134:1280x720@60  135:1280x720@60  136:1280x720@50  137:1024x768@60  138:800x600@60  139:720x576@50  140:720x480@60  141:720x480@60  142:720x480@60  143:720x480@60  144:640x480@60  145:640x480@60  146:720x400@70  147:1600x1200@60  148:1280x1024@60  149:1024x768@60  150:2560x1600@60  151:1920x1200@60  152:1280x800@60  153:3840x2160@60  154:3200x1800@60  155:2880x1620@60  156:2560x1440@60  157:1920x1080@60  158:1600x900@60  159:1368x768@60  160:1280x720@60 
        Geometry: 0,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Always
        RgbRange: unknown
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
HDR:
Output: 4 HDMI-A-1
        enabled
        connected
        priority 1
        HDMI
        Modes:  91:3840x2160@60*!  92:4096x2160@120  93:4096x2160@120  94:4096x2160@100  95:4096x2160@60  96:4096x2160@60  97:4096x2160@50  98:4096x2160@30  99:4096x2160@30  100:4096x2160@25  101:4096x2160@24  102:4096x2160@24  103:3840x2160@120  104:3840x2160@120  105:3840x2160@100  106:3840x2160@60  107:3840x2160@60  108:3840x2160@50  109:3840x2160@30  110:3840x2160@30  111:3840x2160@25  112:3840x2160@24  113:3840x2160@24  114:2560x1440@120  115:1920x1200@60  116:1920x1080@120  117:1920x1080@120  118:1920x1080@100  119:1920x1080@60  120:1920x1080@60  121:1920x1080@60  122:1920x1080@50  123:1920x1080@30  124:1920x1080@30  125:1920x1080@25  126:1920x1080@24  127:1920x1080@24  128:1600x1200@60  129:1680x1050@60  130:1280x1024@60  131:1440x900@60  132:1280x800@60  133:1152x864@60  134:1280x720@60  135:1280x720@60  136:1280x720@50  137:1024x768@60  138:800x600@60  139:720x576@50  140:720x480@60  141:720x480@60  142:720x480@60  143:720x480@60  144:640x480@60  145:640x480@60  146:720x400@70  147:1600x1200@60  148:1280x1024@60  149:1024x768@60  150:2560x1600@60  151:1920x1200@60  152:1280x800@60  153:3840x2160@60  154:3200x1800@60  155:2880x1620@60  156:2560x1440@60  157:1920x1080@60  158:1600x900@60  159:1368x768@60  160:1280x720@60 
        Geometry: 0,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Always
        RgbRange: unknown
        HDR: enabled
                SDR brightness: 150 nits
                SDR gamut wideness: 0%
                Peak brightness: unknown
                Max average brightness: unknown
                Min brightness: 0 nits
        Wide Color Gamut: enabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%

It's really faint, almost unnoticeable - much lower luminance iirc than with 494854.
Comment 3 FK 2025-08-03 23:08:18 UTC
Just an update. I tried the same display/cable/kwin version using a USB-C HDMI Adapter, and the OLED screen stays properly black even in SDR mode.

Output: 2 DP-2 
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  14:3840x2160@60*!  15:4096x2160@120  16:4096x2160@120  17:4096x2160@100  18:4096x2160@60  19:4096x2160@60  20:4096x2160@50  21:4096x2160@30  22:4096x2160@30  23:4096x2160@25  24:4096x2160@24  25:4096x2160@24  26:3840x2160@120  27:3840x2160@120  28:3840x2160@100  29:3840x2160@60  30:3840x2160@60  31:3840x2160@50  32:3840x2160@30  33:3840x2160@30  34:3840x2160@25  35:3840x2160@24  36:3840x2160@24  37:2560x1440@120  38:1920x1200@60  39:1920x1080@120  40:1920x1080@120  41:1920x1080@100  42:1920x1080@60  43:1920x1080@60  44:1920x1080@60  45:1920x1080@50  46:1920x1080@30  47:1920x1080@30  48:1920x1080@25  49:1920x1080@24  50:1920x1080@24  51:1600x1200@60  52:1680x1050@60  53:1280x1024@60  54:1440x900@60  55:1280x800@60  56:1152x864@60  57:1280x720@60  58:1280x720@60  59:1280x720@50  60:1024x768@60  61:800x600@60  62:720x576@50  63:720x480@60  64:720x480@60  65:720x480@60  66:720x480@60  67:640x480@60  68:640x480@60  69:720x400@70  70:1600x1200@120  71:1280x1024@120  72:1024x768@120  73:2560x1600@60  74:2560x1600@120  75:1920x1200@120  76:1280x800@120  77:3200x1800@60  78:3200x1800@120  79:2880x1620@60  80:2880x1620@120  81:2560x1440@60  82:1600x900@60  83:1600x900@120  84:1368x768@60  85:1368x768@120  86:1280x720@120 
        Geometry: 0,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        Color resolution: 10 bits per color, range: [8; 16] bits per color
        Allow EDR: unsupported

back with SDR on the HDMI 2.0 port, it's still lightly glowing:

Output: 4 HDMI-A-1
        enabled
        connected
        priority 1
        HDMI
        replication source:0
        Modes:  78:3840x2160@60*!  79:4096x2160@120  80:4096x2160@120  81:4096x2160@100  82:4096x2160@60  83:4096x2160@60  84:4096x2160@50  85:4096x2160@30  86:4096x2160@30  87:4096x2160@25  88:4096x2160@24  89:4096x2160@24  90:3840x2160@120  91:3840x2160@120  92:3840x2160@100  93:3840x2160@60  94:3840x2160@60  95:3840x2160@50  96:3840x2160@30  97:3840x2160@30  98:3840x2160@25  99:3840x2160@24  100:3840x2160@24  101:2560x1440@120  102:1920x1200@60  103:1920x1080@120  104:1920x1080@120  105:1920x1080@100  106:1920x1080@60  107:1920x1080@60  108:1920x1080@60  109:1920x1080@50  110:1920x1080@30  111:1920x1080@30  112:1920x1080@25  113:1920x1080@24  114:1920x1080@24  115:1600x1200@60  116:1680x1050@60  117:1280x1024@60  118:1440x900@60  119:1280x800@60  120:1152x864@60  121:1280x720@60  122:1280x720@60  123:1280x720@50  124:1024x768@60  125:800x600@60  126:720x576@50  127:720x480@60  128:720x480@60  129:720x480@60  130:720x480@60  131:640x480@60  132:640x480@60  133:720x400@70  134:1600x1200@120  135:1280x1024@120  136:1024x768@120  137:2560x1600@60  138:2560x1600@120  139:1920x1200@120  140:1280x800@120  141:3200x1800@60  142:3200x1800@120  143:2880x1620@60  144:2880x1620@120  145:2560x1440@60  146:1600x900@60  147:1600x900@120  148:1368x768@60  149:1368x768@120  150:1280x720@120 
        Geometry: 0,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Automatic
        RgbRange: Automatic
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 100% and dimming to 100%
        Color resolution: 10 bits per color, range: [8; 16] bits per color
        Allow EDR: unsupported

in HDR mode with HDMI there is no issue still.

Is there anything else I could try or change?
Comment 4 FK 2025-08-05 20:26:47 UTC
Toying around with the settings I could lower the black levels of the TV. Maybe the differences between HDR/SDR and adapters is related to full/limited range and/or 8b/10b. Closing this as resolved now.
Comment 5 Zamundaaa 2025-08-05 23:16:29 UTC
It's certainly possible that the TV does different things with different bit depth, yeah. Thanks for following up on the bug report.