Bug 494930 - GTK apps are super dark in HDR.
Summary: GTK apps are super dark in HDR.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (show other bugs)
Version: 6.2.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-17 12:10 UTC by laichiaheng
Modified: 2024-11-06 22:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.4
Sentry Crash Report:


Attachments
Here is a sample for GTK apps in plasma HDR, it looks super dark. (862.65 KB, image/jpeg)
2024-10-17 12:10 UTC, laichiaheng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description laichiaheng 2024-10-17 12:10:06 UTC
Created attachment 174939 [details]
Here is a sample for GTK apps in plasma HDR, it looks super dark.

SUMMARY
If I open GTK apps from indicator or terminal in HDR, it is super dark.

STEPS TO REPRODUCE
1. Open terminal
2. run nautilus
3. 

OBSERVED RESULT
The window is super dark

EXPECTED RESULT
Not super dark.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 6.2.1
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2024-10-17 19:59:12 UTC
If you don't enable the Vulkan HDR layer for the app, does it still happen?
Comment 2 laichiaheng 2024-10-18 12:07:06 UTC
(In reply to Zamundaaa from comment #1)
> If you don't enable the Vulkan HDR layer for the app, does it still happen?

Do you mean "ENABLE_HDR_WSI=1"?
It seems to be fixed if "ENABLE_HDR_WSI=1" is disabled.
Comment 3 laichiaheng 2024-10-19 02:26:27 UTC
(In reply to Zamundaaa from comment #1)
> If you don't enable the Vulkan HDR layer for the app, does it still happen?

By the way, it still happens with the latest vk-hdr-layer-kwin6-git update
Comment 4 Zamundaaa 2024-10-23 12:42:19 UTC
Okay, please attach the terminal output from the affected app then, with the Vulkan layer enabled.
Comment 5 laichiaheng 2024-10-30 14:35:21 UTC
(In reply to Zamundaaa from comment #4)
> Okay, please attach the terminal output from the affected app then, with the
> Vulkan layer enabled.

(gnome-text-editor:42235): Gtk-WARNING **: 22:35:04.397: Unknown key gtk-modules in /home/laichiaheng/.config/gtk-4.0/settings.ini

(gnome-text-editor:42235): libenchant-WARNING **: 22:35:04.464: broker.vala:159: Error loading plugin: libaspell.so.15: cannot open shared object file: No such file or directory

(gnome-text-editor:42235): libenchant-WARNING **: 22:35:04.464: broker.vala:159: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory

(gnome-text-editor:42235): libenchant-WARNING **: 22:35:04.464: broker.vala:159: Error loading plugin: libnuspell.so.5: cannot open shared object file: No such file or directory

(gnome-text-editor:42235): libenchant-WARNING **: 22:35:04.465: broker.vala:159: Error loading plugin: libvoikko.so.1: cannot open shared object file: No such file or directory
[HDR Layer] Created HDR surface
[HDR Layer] Enabling format: 64 colorspace: 1000104008
[HDR Layer] Enabling format: 58 colorspace: 1000104008
[HDR Layer] Enabling format: 97 colorspace: 1000104002
[HDR Layer] Enabling format: 97 colorspace: 1000104005
[HDR Layer] Enabling format: 64 colorspace: 1000104008
[HDR Layer] Enabling format: 58 colorspace: 1000104008
[HDR Layer] Enabling format: 97 colorspace: 1000104002
[HDR Layer] Enabling format: 97 colorspace: 1000104005
[HDR Layer] Creating swapchain for id: 45 - format: VK_FORMAT_R8G8B8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
[HDR Layer] Creating swapchain for id: 45 - format: VK_FORMAT_R8G8B8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
[HDR Layer] Creating swapchain for id: 45 - format: VK_FORMAT_R16G16B16A16_SFLOAT - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
Comment 6 Bug Janitor Service 2024-11-05 13:31:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6734
Comment 7 Zamundaaa 2024-11-05 15:05:25 UTC
Git commit 3a23b2974ae6388a58fd253ddd05062056347941 by Xaver Hugl.
Committed on 05/11/2024 at 14:49.
Pushed by zamundaaa into branch 'master'.

core/colorspace: fix the max luminance of linear

It's supposed to match the reference luminance; this is just a remnant of KWin using a
different variant of linear internally

M  +1    -1    src/core/colorspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/3a23b2974ae6388a58fd253ddd05062056347941
Comment 8 Zamundaaa 2024-11-05 15:36:16 UTC
Git commit 14db57fc56d16b8d4deee5f33f4b2564db0ee630 by Xaver Hugl.
Committed on 05/11/2024 at 15:36.
Pushed by zamundaaa into branch 'Plasma/6.2'.

core/colorspace: fix the max luminance of linear

It's supposed to match the reference luminance; this is just a remnant of KWin using a
different variant of linear internally
(cherry picked from commit 3a23b2974ae6388a58fd253ddd05062056347941)

M  +1    -1    src/core/colorspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/14db57fc56d16b8d4deee5f33f4b2564db0ee630