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: dri-devel@lists.freedesktop.org Reporter: vladzzag@gmail.com
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
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #1 from Vlad Zagorodniy vladzzag@gmail.com --- Created attachment 144265 --> https://bugs.freedesktop.org/attachment.cgi?id=144265&action=edit observed
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #2 from Vlad Zagorodniy vladzzag@gmail.com --- Created attachment 144266 --> https://bugs.freedesktop.org/attachment.cgi?id=144266&action=edit expected
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #3 from Vlad Zagorodniy vladzzag@gmail.com --- Created attachment 144267 --> https://bugs.freedesktop.org/attachment.cgi?id=144267&action=edit Screen without inverted colors
https://bugs.freedesktop.org/show_bug.cgi?id=110677
Vlad Zagorodniy vladzzag@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS|All |Linux (All) Hardware|Other |x86-64 (AMD64)
https://bugs.freedesktop.org/show_bug.cgi?id=110677
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nicholas.kazlauskas@amd.com
--- Comment #4 from Michel Dänzer michel@daenzer.net --- Please attach the corresponding dmesg output and Xorg log file.
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #5 from Vlad Zagorodniy vladzzag@gmail.com --- Created attachment 144268 --> https://bugs.freedesktop.org/attachment.cgi?id=144268&action=edit dmesg output
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #6 from Vlad Zagorodniy vladzzag@gmail.com --- Created attachment 144269 --> https://bugs.freedesktop.org/attachment.cgi?id=144269&action=edit Xorg log file
https://bugs.freedesktop.org/show_bug.cgi?id=110677
--- Comment #7 from Nicholas Kazlauskas nicholas.kazlauskas@amd.com --- 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.
https://bugs.freedesktop.org/show_bug.cgi?id=110677
Michel Dänzer michel@daenzer.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #144269|text/x-log |text/plain mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=110677
Martin Peres martin.peres@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|NEW |RESOLVED
--- Comment #8 from Martin Peres martin.peres@free.fr --- -- 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.
dri-devel@lists.freedesktop.org