mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #222] FR: HDR support #149
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hukuma1 on GitHub (Jul 5, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/222
Running headless on a system with an iGPU (Intel(R) Core(TM) Ultra 7 265K). I am shown a message by Moonlight that my display does not support HDR. I am streaming to an HDR display (LG C4). I don't have an HDMI dummy plugged into my port because I thought I wouldn't need one? Or is that the only way to make headless HDR working?
I don't have
vainfoinstalled but maybe the Jellyfin output is helpful? It confirms my HWA is working in Jellyfin along with the Intel driver version:@ABeltramo commented on GitHub (Jul 5, 2025):
Wolf doesn't support HDR streaming, yet. It's definitely on my radar, I'm just busy with a few other new features at the moment 😉
@Hukuma1 commented on GitHub (Jul 5, 2025):
Oh oops! I feel silly copy-pastaing all that now haha. Keep up the great work! I'll leave this open as a feature request?
@ABeltramo commented on GitHub (Jul 5, 2025):
Sure thing! To be fair it wasn't written anywhere else!
@RyuunosukeDS3 commented on GitHub (Nov 17, 2025):
Hey! Just curious to know if anything changed since the last update on this. Are we getting close to HDR or there is still a lot to figure out?
@ABeltramo commented on GitHub (Nov 17, 2025):
Unfortunately it seems that Smithay doesn't have support for it https://github.com/Smithay/smithay/pull/1143
Having proper HDR in our custom Wayland compositor is probably the first step required. After that we can start building out the additional video encoding pipelines and see what actually supports HDR downstream in our clients (Sway, Gamescope all the way down to Steam and so on..)
@macher91 commented on GitHub (Dec 23, 2025):
Actually, Smithay does have HDR support. It supports the color-management-v1 Wayland protocol (which was standardized recently) and provides the necessary backend support for HDR metadata and WCG (Wide Color Gamut) through DRM/KMS. It's already being utilized by projects like COSMIC
@ABeltramo commented on GitHub (Dec 23, 2025):
@macher91 are you sure about that, and can you provide any reference?
The official list of implemented wayland protocols links to https://github.com/Smithay/smithay/pull/1143 for
color-management-v1. I can't find an official source for Cosmic but the Arch Wiki only says thatOnly other thing I could find is https://github.com/pop-os/cosmic-comp/issues/1384 which seems to confirm that there's no HDR support in COSMIC.
I suppose only @Drakulix can say for sure, but from a quick look around I don't see HDR implemented..
@Drakulix commented on GitHub (Dec 23, 2025):
The PR you linked is the only work on smithay related to HDR support in the moment. COSMIC also indeed doesn't have any HDR support atm.
For fullscreen clients you can get away with hacking something together, but as soon as you potentially have multiple windows to render it falls apart as you might need to convert between color spaces and blend correctly.
I am finally looking into working on this in the new year, but it might still take a bit until wolf can adopt new smithay code with minimal changes. If you want to hack something together for gamescope or sway in the meantime, I am happy to provide some pointers.
@ABeltramo commented on GitHub (Dec 23, 2025):
Thanks @Drakulix for the quick reply!
That would definitely be interesting since a single fullscreen app is always going the be the main usecase for Wolf (and gst-wayland-comp by extension). If you can spare some pointers I'll look into it after the xmass holidays, I'm sure also @DatCaptainHorse would be interested 😉
@Drakulix commented on GitHub (Dec 23, 2025):
Okay sure.
gst-wayland-comp(the code should work fine out of tree, but some imports, etc need to be cleaned up).This only gives you data from the client, it obviously doesn't change any rendering. You probably want to support as little in terms of what the protocol offers as possible. For gamescope/gaming the following stuff should be sufficient:
With that srgb + gamma22 is basically what you are currently doing, while HDR apps should use BT2020 + PQ.
I don't think gamescope uses ext_srgb or hgl, but possibly check the source. It could probably make use of luminances, extended-color-volume and more, but I think it doesn't need it and can composite with just these. Using something like wine-wayland directly would probably need Windows-scrgb and much more. Also this is most likely not enough for video-players, but one step at a time.
I think you also need wp-color-representation-v1, but only for the alpha-modes. And premultiplied vs straight alpha is easy to support in the shader.
And for BT2020 you don't need to modify these values at all, if you are not rendering multiple windows, you just need to make sure the framebuffer has enough bits to represent the high color fidelity. Which is probably already has. You want to make sure you use at least a 10-bit format. (Something like ARGB2101010 is sufficient and in most cases pretty efficient. ARGB16161616f (16-bit float per component) works as well, but is probably more resource intensive.
Select something based on what your gst-pipeline supports, you need to make sure you never drop down to 8-bit buffers. If you can only encode 8-bit buffers, don't advertise the protocol.
Now Steam and other apps won't magically output HDR contents and I am not sure gamescope will internally convert everything to BT2020 or send you sRGB image descriptions while no HDR game is running. It might work to simply not advertise sRGB+gamma22, but a lot of apps will likely complain. So you need a new shader, that renders sRGB content in BT2020 color space. You can probably find something simple online to do that.
And that's basically it. Now you just need to set the color space on the pipeline, so that gstreamer will do the right thing and pass HDR-enabled to the moonlight client. This is the most basic implementation, but it should work.
Afterwards there are a lot of possible optimizations. Moonlight likely sends you information about the HDR properties of the display, e.g. it's maximum brightness, etc. Content out of that range will potentially get clipped, etc.
You can take this data and send it back using the protocol and allow the client to give you more data by enabling more features. You then need to figure out, if you can simply encode these bits on the gst-pipeline or if that means you might need to touch the buffer after all and mess with the color values.
But you can figure that out once it works at all, though until then it might not look the best depending on the display.
@ABeltramo commented on GitHub (Dec 23, 2025):
Thanks for the very detailed answer! I'll try hacking something when I'm back home!
@DatCaptainHorse commented on GitHub (Dec 23, 2025):
🐴 - yep, though my monitor supports only "fake HDR" (HDR 400 nits), it might be useful for testing early implementations if you go forward with that 🙂
@realaod commented on GitHub (Jul 23, 2026):
This needs to be a thing in GoW now. When can we expect true HDR support? The latest Nvidia drivers support HDR natively now.
@JBailes commented on GitHub (Jul 23, 2026):
We already have HDR in testing in gst-wayland, and have had in testing for a few weeks.
@ABeltramo commented on GitHub (Jul 23, 2026):
There are two parts to this:
We are currently working on 1 (https://github.com/games-on-whales/gst-wayland-display/pull/37), and there's been recent upstream interest in 2 (https://github.com/Smithay/smithay/pull/1143) that we'll need to bring in.
No ETA, it'll be there when everything will be implemented; any help is appreciated though 😉
@jfranco09 commented on GitHub (Aug 31, 2026):
I would love to help have HDR working. I work as a developer, but I worked with this kind of project before. What would be a good place to start or where is help needed?
My current machine is a amd 5600x + rtx 5090 with 32 Gb RAM.