Bug 375666

Summary: Please add option to adjust output RGB range
Product: [Plasma] kwin Reporter: NW <nw9165-jjnfov5mav>
Component: platform-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: alexander.shchadilov, bugseforuns, gerbilsoft, grouchomarx.fr, nate, notuxius
Priority: NOR Flags: mgraesslin: Wayland+
mgraesslin: X11-
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
See Also: https://bugs.kde.org/show_bug.cgi?id=353689
Latest Commit: Version Fixed In: 5.23
Sentry Crash Report:

Description NW 2017-01-28 16:11:03 UTC
Hi,

when using X, it's possible to adjust the Intel driver's Broadcast RGB setting via xrandr like this:

xrandr --output OUTPUT --set "Broadcast RGB" "Full"

or:

xrandr --output OUTPUT --set "Broadcast RGB" "Limited 16:235"

or:

xrandr --output OUTPUT --set "Broadcast RGB" "Automatic"

Unfortunately the Intel driver now sets this to "Automatic" by default and "Automatic" doesn't really set it properly all of the time:

https://bugzilla.kernel.org/show_bug.cgi?id=94921

amdgpu and radeon apparently are also planned to get options to to adjust the RGB range / color space, see:

https://bugs.freedesktop.org/show_bug.cgi?id=83226

When asking on #wayland on the freenode IRC channel, I was told that such an option would need to be added to the corresponding Wayland compositor and that I should submit a feature request for the corresponding Wayland compositor.

So, could you please add an option to adjust the RGB range?

Regards
Comment 1 NW 2017-01-28 16:11:59 UTC
And there's no kernel parameter for it, see:

https://bugs.freedesktop.org/show_bug.cgi?id=96489

So if the Wayland compositor does not provide an option to adjust it, you're pretty much stuck.

I guess this is the list of all those "connector properties":

https://01.org/linuxgraphics/gfx-docs/drm/drm-kms-properties.html

?
Comment 2 NW 2017-01-29 10:59:16 UTC
May I ask why this has been set to "wishlist"? This is not just a fancy feature request. It's a real issue if you're affected by the automatic setting not working properly.

The Weston devs seem to take this more seriously, see:

https://bugs.freedesktop.org/show_bug.cgi?id=99406
Comment 3 Martin Flöser 2017-01-29 12:14:33 UTC
> May I ask why this has been set to "wishlist"?

We have bugs and wishes. Anything which is not an existing feature is a 
wishlist. Currently KWin does not yet support this, thus it's wishlist.
Comment 4 grouchomarx.fr 2018-02-27 00:32:36 UTC
I strongly agree.

Plasma on Wayland is shaping up nicely, but the picture is washed out on my hdmi monitors due to this issue.
Comment 5 Alexander Mentyu 2018-09-22 07:25:01 UTC
(In reply to grouchomarx.fr from comment #4)
> I strongly agree.
> 
> Plasma on Wayland is shaping up nicely, but the picture is washed out on my
> hdmi monitors due to this issue.

Bug about washed out colors https://bugs.kde.org/show_bug.cgi?id=398898
Comment 6 Alexander Shchadilov 2019-10-23 19:30:29 UTC
I suggest that this also needs a visible toggle in Plasma settings ("Hardware"\"Display and Monitor"\"Displays"). Some people may even not realise that their displays work in the incorrect mode, at least a visible option in the GUI could interest them.
The most detailed discussion about the whole situation with colour ranges that I am aware off:
https://bugzilla.kernel.org/show_bug.cgi?id=94921

Existing workarounds:
https://www.brad-x.com/2017/08/07/quick-tip-setting-the-color-space-value-in-wayland/
Some fixes for configuration that was described there:
https://www.reddit.com/r/linuxquestions/comments/aj7ojy/has_anyone_successfully_enabled_full_rgb_range_on/elemn0b?utm_source=share&utm_medium=web2x
Comment 7 Bug Janitor Service 2021-08-31 16:33:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1355
Comment 8 Zamundaaa 2021-09-02 11:55:29 UTC
Git commit 26ad8e194f90174cf30a9f6f0607b9017d3c7371 by Xaver Hugl.
Committed on 02/09/2021 at 11:53.
Pushed by zamundaaa into branch 'master'.

platforms/drm: support Broadcast_RGB setting

This allows the user to switch between full and limited rgb.
Related: bug 353689

M  +22   -0    src/abstract_wayland_output.cpp
M  +14   -0    src/abstract_wayland_output.h
M  +16   -0    src/plugins/platforms/drm/drm_object_connector.cpp
M  +4    -0    src/plugins/platforms/drm/drm_object_connector.h
M  +12   -0    src/plugins/platforms/drm/drm_output.cpp
M  +1    -0    src/plugins/platforms/drm/drm_output.h
M  +11   -0    src/plugins/platforms/drm/drm_pipeline.cpp
M  +2    -0    src/plugins/platforms/drm/drm_pipeline.h
M  +16   -0    src/waylandoutputdevicev2.cpp
M  +1    -0    src/waylandoutputdevicev2.h

https://invent.kde.org/plasma/kwin/commit/26ad8e194f90174cf30a9f6f0607b9017d3c7371