Summary: | HDR does not work correctly anymore in buggy apps that mis-report brightness with kwin 6.2 | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | bugreports61 |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdedev, nate, xaver.hugl |
Priority: | NOR | Keywords: | regression |
Version: | 6.2.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=494424 | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/03b4da31c0a774d38c2d3cca6f131e4dcd270311 | Version Fixed In: | 6.2.2 |
Sentry Crash Report: | |||
Attachments: |
kwin62 hdr laayer
gears 5 hdr layer output ghostwire tokyo hdr layer output halo infinite hdr layer output the last of us hdr layer output tina tinas wonderland attachment-506707-0.html gears 5 hdr gamescope tiny tinas wonderland gamescope doom eternal gamescope log |
Description
bugreports61
2024-10-11 05:09:43 UTC
Please attach the command line output of when you run the game with the Vulkan layer. It should contain some information about the colorspace and HDR metadata (grep for [HDR Layer]) (In reply to Zamundaaa from comment #1) > Please attach the command line output of when you run the game with the > Vulkan layer. It should contain some information about the colorspace and > HDR metadata (grep for [HDR Layer]) I did, please find attached the logs. Created attachment 174723 [details]
kwin62 hdr laayer
Hi, btw, the issue is not limited to Dead Island 2, it affects multiple games. Same issue in e.g Gears 5, where you easily can spot it already at the loading screen of the game. I also tested with gamescope instead of the hdr layer + wine wayland and hdr seems to work there. So it is the combination of the HDR Layer + wine wayland which does not work anymore with kwin 6.2 but works fine with kwin 6.1.5. Hope that helps finding the rootcause of the issue. Br ! Pingubot > max 10000000.000000 nits
Heh, I'm not surprised that causes issues! I'll look into adding some sanity checks to HDR metadata...
(In reply to Zamundaaa from comment #5) > > max 10000000.000000 nits > Heh, I'm not surprised that causes issues! I'll look into adding some sanity > checks to HDR metadata... Cool, thy, great that you found the issue. Is that something you need to fix in kwin or your vulkan hdr layer ? And why did it work in 6.1.5 and not in 6.2 anymore ? A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6626 (In reply to bugreports61 from comment #6) > Is that something you need to fix in kwin or your vulkan hdr layer ? The Vulkan layer is doing everything correctly, the only real place to fix it would be the game that provides wrong data. We can detect this obvious nonsense in KWin though and ignore it. > And why did it work in 6.1.5 and not in 6.2 anymore ? In 6.1, HDR metadata was completely ignored, in 6.2 it's used to adapt the image to the capabilities of your screen. Git commit 03b4da31c0a774d38c2d3cca6f131e4dcd270311 by Xaver Hugl. Committed on 15/10/2024 at 12:44. Pushed by vladz into branch 'master'. wayland/color management: ignore obviously wrong HDR metadata Some applications provide truly nonsensical luminance values, like 10 million nits. This adds a basic sanity check to not use that for tone mapping M +20 -15 src/wayland/frog_colormanagement_v1.cpp M +12 -2 src/wayland/xx_colormanagement_v4.cpp https://invent.kde.org/plasma/kwin/-/commit/03b4da31c0a774d38c2d3cca6f131e4dcd270311 (In reply to Zamundaaa from comment #8) > (In reply to bugreports61 from comment #6) > > Is that something you need to fix in kwin or your vulkan hdr layer ? > The Vulkan layer is doing everything correctly, the only real place to fix > it would be the game that provides wrong data. We can detect this obvious > nonsense in KWin though and ignore it. > > > And why did it work in 6.1.5 and not in 6.2 anymore ? > In 6.1, HDR metadata was completely ignored, in 6.2 it's used to adapt the > image to the capabilities of your screen. Hi, many thx for the information. I was taking a look at the HDR Layer output of some other games in HDR. Those which do not have metadata in the log seem to work. Others like Gears 5 and Ghostwire Tokyo which have metadata in the log show the same mastering luminance of 10 million nits, for whatever reason. I attaches some logs for the games i have taken a look at. Br Created attachment 174852 [details]
gears 5 hdr layer output
Created attachment 174853 [details]
ghostwire tokyo hdr layer output
Created attachment 174854 [details]
halo infinite hdr layer output
Created attachment 174855 [details]
the last of us hdr layer output
Created attachment 174857 [details]
tina tinas wonderland
Also 10 million max nits mastering luminance
(In reply to Zamundaaa from comment #8) > (In reply to bugreports61 from comment #6) > > Is that something you need to fix in kwin or your vulkan hdr layer ? > The Vulkan layer is doing everything correctly, the only real place to fix > it would be the game that provides wrong data. We can detect this obvious > nonsense in KWin though and ignore it. > > > And why did it work in 6.1.5 and not in 6.2 anymore ? > In 6.1, HDR metadata was completely ignored, in 6.2 it's used to adapt the > image to the capabilities of your screen. One note in addition, for ghostwire tokyo i had even set the ingame option for max luminance to 1000 nits. Uploaded tiny tinas wonderlond in addition,same 10mil thing. (In reply to bugreports61 from comment #16) > One note in addition, for ghostwire tokyo i had even set the ingame option > for max luminance to 1000 nits. > Uploaded tiny tinas wonderlond in addition,same 10mil thing. I wouldn't trust most games to actually pass through the HDR metadata that you set up. Still, this is pretty odd. Do you have a guide on how to set up Wine Wayland for a game on Steam? I know that Doom Eternal sets proper HDR metadata in gamescope: [Gamescope WSI] VkHdrMetadataEXT: display primaries: r: 0.708 0.292 g: 0.17 0.797 b: 0.131 0.046 w: 0.3127 0.329 mastering luminance: min 1 nits, max 1000 nits maxContentLightLevel: 1000 nits maxFrameAverageLightLevel: 500 nits so I'd like to test that and debug if it also reports nonsense with that. Maybe there's still something broken in the Vulkan layer. Created attachment 174861 [details] attachment-506707-0.html Hi, Sadly doom eternal is one of the rare games which do not work with wine Wayland. Overall I am using proton Tkg . You can use wine as a base for that proton version and enable the Wayland backend. It has a very nice build script which takes care about everything. I have gamescpe installed and did test gears 5 with it which has working HDR with gamescope + wine (x11) but not with wine Wayland and the layer . I will start the game tomorrow morning with gamescope. Do I need to do anything special or is the metadata simply displayed on the terminal with gamescpe ? Can do the same for tiny Tina and other games if needed. Br Zamundaaa <bugzilla_noreply@kde.org> schrieb am Di., 15. Okt. 2024, 22:11: > https://bugs.kde.org/show_bug.cgi?id=494502 > > --- Comment #17 from Zamundaaa <xaver.hugl@gmail.com> --- > (In reply to bugreports61 from comment #16) > > One note in addition, for ghostwire tokyo i had even set the ingame > option > > for max luminance to 1000 nits. > > Uploaded tiny tinas wonderlond in addition,same 10mil thing. > I wouldn't trust most games to actually pass through the HDR metadata that > you > set up. Still, this is pretty odd. > > Do you have a guide on how to set up Wine Wayland for a game on Steam? I > know > that Doom Eternal sets proper HDR metadata in gamescope: > [Gamescope WSI] VkHdrMetadataEXT: display primaries: > r: 0.708 0.292 > g: 0.17 0.797 > b: 0.131 0.046 > w: 0.3127 0.329 > mastering luminance: min 1 nits, max 1000 > nits > maxContentLightLevel: 1000 nits > maxFrameAverageLightLevel: 500 nits > > so I'd like to test that and debug if it also reports nonsense with that. > Maybe > there's still something broken in the Vulkan layer. > > -- > You are receiving this mail because: > You reported the bug. (In reply to Zamundaaa from comment #17) > (In reply to bugreports61 from comment #16) > > One note in addition, for ghostwire tokyo i had even set the ingame option > > for max luminance to 1000 nits. > > Uploaded tiny tinas wonderlond in addition,same 10mil thing. > I wouldn't trust most games to actually pass through the HDR metadata that > you set up. Still, this is pretty odd. > > Do you have a guide on how to set up Wine Wayland for a game on Steam? I > know that Doom Eternal sets proper HDR metadata in gamescope: > [Gamescope WSI] VkHdrMetadataEXT: display primaries: > r: 0.708 0.292 > g: 0.17 0.797 > b: 0.131 0.046 > w: 0.3127 0.329 > mastering luminance: min 1 nits, max 1000 > nits > maxContentLightLevel: 1000 nits > maxFrameAverageLightLevel: 500 nits > > so I'd like to test that and debug if it also reports nonsense with that. > Maybe there's still something broken in the Vulkan layer. Good morning, as promised i did some quick tests, find logfiles for the games for gamescope attached (gears5, tiny tina and doom et). In addition here is the link for wine/proton-tkg: https://github.com/Frogging-Family/wine-tkg-git. It is super handy to create your own proton and wine builds. Br Created attachment 174870 [details]
gears 5 hdr gamescope
Created attachment 174871 [details]
tiny tinas wonderland gamescope
Created attachment 174872 [details]
doom eternal gamescope log
@Zamundaaa: I just retested with: Repositorium : extra Name : kwin Version : 6.2.1-1 Beschreibung : An easy to use, but flexible, composited Window Manager Architektur : x86_64 URL : https://kde.org/plasma-desktop/ Erstellt am : Di 15 Okt 2024 20:55:14 CEST Verifiziert durch : SHA-256-Summe Signatur And it still does not work. So for me it is not fixed in 6.2.1. Br (In reply to bugreports61 from comment #19) > Good morning, > > as promised i did some quick tests, find logfiles for the games for > gamescope attached (gears5, tiny tina and doom et). Great, that shows the same metadata - it's the games doing dumb things. (In reply to bugreports61 from comment #23) > And it still does not work. So for me it is not fixed in 6.2.1. Does it work if you set KWIN_DISABLE_TONEMAPPING=1 for KWin? (In reply to Zamundaaa from comment #24) > (In reply to bugreports61 from comment #19) > > Good morning, > > > > as promised i did some quick tests, find logfiles for the games for > > gamescope attached (gears5, tiny tina and doom et). > Great, that shows the same metadata - it's the games doing dumb things. > > (In reply to bugreports61 from comment #23) > > And it still does not work. So for me it is not fixed in 6.2.1. > Does it work if you set KWIN_DISABLE_TONEMAPPING=1 for KWin? Yeah, and thinking about it, afaik all the games are UE4 games. Does it work if you set KWIN_DISABLE_TONEMAPPING=1 for KWin? -> Yes, using that variable it works fine again. One side question which i noticed with 6.2: Using 40% display brightness on my display control is 100 nits. Using the same setting in the display system settings for sdr in hdr mode gives me a way less bright image, its roughly the same if i switch to 200 nits in the settings. I don't remember seeing this in plasma 6.1 . Should i open another issue for that ? In addition it looks like the screen brightness in SDR gets raised shortly after login without me doing anything (i only use my monitor menu to adjust brightness). oh, the commit for this just so didn't get into 6.2.1. It should work in the next bugfix release. > Using 40% display brightness on my display control is 100 nits. Using the same setting in the display system settings for sdr in hdr mode gives me a way less bright image, its roughly the same if i switch to 200 nits in the settings. I don't remember seeing this in plasma 6.1 . Should i open another issue for that ? Not sure what could be causing that, I don't see it happening here, but probably worth opening a bug report for, yes. > In addition it looks like the screen brightness in SDR gets raised shortly after login without me doing anything (i only use my monitor menu to adjust brightness). Yes, powerdevil sets the brightness setting of your screen; if you don't want that, you can disable it with the POWERDEVIL_NO_DDCUTIL=1 environment variable. (In reply to Zamundaaa from comment #26) > oh, the commit for this just so didn't get into 6.2.1. It should work in the > next bugfix release. > > > Using 40% display brightness on my display control is 100 nits. Using the same setting in the display system settings for sdr in hdr mode gives me a way less bright image, its roughly the same if i switch to 200 nits in the settings. I don't remember seeing this in plasma 6.1 . Should i open another issue for that ? > Not sure what could be causing that, I don't see it happening here, but > probably worth opening a bug report for, yes. > > > In addition it looks like the screen brightness in SDR gets raised shortly after login without me doing anything (i only use my monitor menu to adjust brightness). > Yes, powerdevil sets the brightness setting of your screen; if you don't > want that, you can disable it with the POWERDEVIL_NO_DDCUTIL=1 environment > variable. Ahhh, ok, if its not in that explains things :). Will open another bug report for the hdr/sdr brightness thing. For the powerdevil part, i tried that variable in different spots also following the readme for powerdevil (even verified if the variable shows up in the environment for the process) but the monitor brightness applet still is showing up and changing the brightness there has an visible brightness impact. |