Skip to contentSkip to conversation

Can't invert screen colors by adjusting the gamma ramp

Bug 110677 [email protected] 1 participant 11 messages May 14, 2019 – Nov 19, 2019

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 110677
Summary: Can't invert screen colors by adjusting the gamma ramp
Product: DRI
Version: XOrg git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

On X11, there are several ways KWin can invert screen colors: either by using an OpenGL-based effect, or by adjusting the gamma ramp. While the former approach works well on most hardware, we experience some issues with the latter approach on AMD hardware.

After adjusting the gamma ramp, the screen is filled with mostly white color.

Steps to reproduce:
* Open System Settings, go to Shortcuts, select KWin component under Global Shortcuts tab, assign custom shortcut to "Invert Screen Colors";
* Press the shortcut.

(or just use xcalib -i)

Observed results:
The screen is filled with mostly white color.

Expected results:
Inverted screen.

Hardware: Radeon RX 580
Mesa: 19.0.3
Linux: 5.0.13
xorg: 1.20.4

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

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

--- Comment #1 from Vlad Zagorodniy <[email protected]> --- Created attachment 144265
--> https://bugs.freedesktop.org/attachment.cgi?id=144265&action=edit
observed

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

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

--- Comment #2 from Vlad Zagorodniy <[email protected]> --- Created attachment 144266
--> https://bugs.freedesktop.org/attachment.cgi?id=144266&action=edit
expected

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

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

--- Comment #3 from Vlad Zagorodniy <[email protected]> --- Created attachment 144267
--> https://bugs.freedesktop.org/attachment.cgi?id=144267&action=edit
Screen without inverted colors

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

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

Vlad Zagorodniy <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 OS|All                         |Linux (All)
           Hardware|Other                       |x86-64 (AMD64)
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

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

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #4 from Michel Dänzer <[email protected]> --- Please attach the corresponding dmesg output and Xorg log file.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

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

--- Comment #5 from Vlad Zagorodniy <[email protected]> --- Created attachment 144268
--> https://bugs.freedesktop.org/attachment.cgi?id=144268&action=edit
dmesg output

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

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

--- Comment #6 from Vlad Zagorodniy <[email protected]> --- Created attachment 144269
--> https://bugs.freedesktop.org/attachment.cgi?id=144269&action=edit
Xorg log file

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

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

--- Comment #7 from Nicholas Kazlauskas <[email protected]> --- The issue is in the display driver.

The driver does an sRGB degamma, CTM, then sRGB regamma + user regamma - which explains why the screen is mostly white (since the curve is inverse).

If the the degamma block was put into linear bypass and the user regamma was applied directly to the regamma block that should give the correct result.

Not sure if mapping the legacy gamma to the full LUT would break any IGT color or standard X11 gamma operations.

I do have some changes that fix this kind of operation for atomic userspace but I'd have to take a look at the legacy one again to know if this is easy to support or not.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

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

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #144269|text/x-log                  |text/plain
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

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

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #8 from Martin Peres <[email protected]> --- -- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/783.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel