Created attachment 175066 [details] Overbright HDR screenshot SUMMARY When you take a screenshot of HDR window it turns out overbright. STEPS TO REPRODUCE 1. Run an HDR application 2. Make a screenshot OBSERVED RESULT Screenshot turns out overbright EXPECTED RESULT It should be tonemapped to SDR correctly. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.2.1 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 Kernel Version: 6.11.4-4-cachyos (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz Memory: 15.6 ГиБ of RAM Graphics Processor: AMD Radeon RX 6700 XT
Moved to KWin since that's where the screenshots come from on Plasma with KWin. KWin and Spectacle do not support HDR screenshots right now, but that could be fixed.
HDR content is already tone mapped to SDR, but it depends on the application providing HDR metadata to match the content. Please check the command line output from running the game, and attach the HDR metadata that gamescope prints into the output here
(In reply to Zamundaaa from comment #2) > Please check the command line output from running the game, and attach the > HDR metadata that gamescope prints into the output here Isn't gamescope a Steam Deck thing? I don't think the reporter is using a Steam Deck. They seem to be using a desktop computer.
Created attachment 175085 [details] Lutris log Here's a log from Lutris. I've observed one thing that I'll describe in the next attachments.
Created attachment 175086 [details] Screenshot of a screen When I take screenshot from screen it is actually tone mapped correctly.
Created attachment 175087 [details] Screenshot of a window But when I try to take a screenshot of a window this is where things go wrong.
(In reply to Noah Davis from comment #3) > Isn't gamescope a Steam Deck thing? I don't think the reporter is using a > Steam Deck. They seem to be using a desktop computer. No, it's the only way (outside of Quake II RTX) to get games working with HDR on the desktop too. (In reply to Oleg from comment #4) > Created attachment 175085 [details] > Lutris log > > Here's a log from Lutris. I've observed one thing that I'll describe in the > next attachments. There's this in the log: > [HDR Layer] wayland compositor lacking frog color management protocol.. You shouldn't use my Vulkan layer with gamescope, at best it does nothing, but it can cause problems. Other than that I just see absolutely nothing in the log. This suggests that the game just doesn't set any HDR metadata whatsoever, making this rather hard to deal with. Maybe we could just assume the game's configured to work well with your screen's metadata, or that it's configured for HGIG recommendations, but that could still mess things up. Aside from just supporting HDR screenshots properly, the only proper-ish thing I can think of here is to analyze the image before tone mapping, to figure out the maximum luminance and use that for tone mapping. (In reply to Oleg from comment #5) > When I take screenshot from screen it is actually tone mapped correctly. Yes, but that's more of a bug than intentional. When you take a "screen"shot, KWin takes the HDR metadata of the screen, instead of the content that's currently shown on it.
Yeah, I guess that's a bug in Lutris where it sets the wrong environment variable and doesn't set the right one. https://github.com/lutris/lutris/blob/c32e2562b6083d18eb513ac186693062c4a4149c/lutris/runner_interpreter.py#L85 Still, after setting everything right (no HDR WSI layer and DXVK_HDR=1) screenshots are still overbright.
Screenshots of HDR content are now tonemapped correctly.