moonlight-qt icon indicating copy to clipboard operation
moonlight-qt copied to clipboard

HDR support for the Steam Deck

Open alon-z opened this issue 2 years ago • 472 comments

Is your feature request related to a problem? Please describe. Users cannot enable the HDR option on the Steam Deck (Linux client) when connected to an external display that supports HDR.

Describe the solution you'd like Being able to enable HDR setting in moonlight and see HDR content when streaming

Describe alternatives you've considered Possible to use other clients for HDR (couldn't find one that supports HDR 4K 60hz)

Additional context I have seen something about ffmpeg 6.1 that was released that enables HDR on vulkan? (I think) I would love to help coding (golang knowledge) but I have 0 idea on where to start here.

Thank you :)

alon-z avatar Nov 16 '23 09:11 alon-z

Seconding this. New Steam Deck OLEDs have builtin HDR support for its new display, but in the meantime Valve enabled HDR for first generation devices as well when connected to an external display that supports HDR. It seems to work well except Moonlight on Linux doesn't allow toggling the "HDR mode".

Kabraxist avatar Nov 17 '23 18:11 Kabraxist

On Linux, HDR is only currently supported when streaming outside of a desktop environment (where Moonlight can take full control over the display hardware to configure HDR). In theory, it should be possible to support HDR using our existing EGL+GLES renderer, but I think Gamescope only supports HDR via Vulkan.

In any case, I am working on a Vulkan renderer that will support HDR on Linux from within Gamescope.

cgutman avatar Nov 20 '23 08:11 cgutman

https://github.com/streetpea/chiaki4deck/issues/93 I think this could help.

kaitolucifer avatar Nov 27 '23 20:11 kaitolucifer

I use moonlight regularly to stream from my PC to my Nvidia Shield, often with HDR.

Recently grabbed an OLED Steam Deck hoping to stream with HDR to the Steam Deck. Is this currently not possible?

HDR option on the Linux build seems to be greyed out.

Jordan-Ch avatar Nov 28 '23 02:11 Jordan-Ch

I use moonlight regularly to stream from my PC to my Nvidia Shield, often with HDR.

Recently grabbed an OLED Steam Deck hoping to stream with HDR to the Steam Deck. Is this currently not possible?

HDR option on the Linux build seems to be greyed out.

Both the LCD and OLED Steam Decks now support HDR to external displays. Only the OLED supports it on its own display. However, the support for external displays is limited to games run on the Steam Decks themselves. Streaming apps like Moonlight need to add support for HDR separately. I hope that helps.

eliw00d avatar Nov 28 '23 05:11 eliw00d

It's the only thing holding back the Steam Deck for me at this point... hope you can figure it out!

HA55EHH avatar Nov 29 '23 17:11 HA55EHH

Not sure if you accept bounties or sponsorships for features but I'd happily pay to have this prioritized.

david-pili avatar Dec 02 '23 12:12 david-pili

On Linux, HDR is only currently supported when streaming outside of a desktop environment (where Moonlight can take full control over the display hardware to configure HDR). In theory, it should be possible to support HDR using our existing EGL+GLES renderer, but I think Gamescope only supports HDR via Vulkan.

In any case, I am working on a Vulkan renderer that will support HDR on Linux from within Gamescope.

Guys from chiaki4deck got the HDR working and are debugging. I have tested it and it works great. I don't know how they made HDR work but you can check it out:

https://github.com/streetpea/chiaki4deck/pull/104

arshiatn avatar Dec 05 '23 00:12 arshiatn

Also dying for HDR remoteplay on the steam deck so I can drop the nvidia shield and its horrible controls with moonlight due to its limited control configuration support. If the steam deck could do HDR remote play then it can be the ultimate TV Docked and Portable experience paired with a gaming PC.

ritmototal avatar Dec 11 '23 02:12 ritmototal

Happy to test this right now! Let me know what if any logs i can provide.

zachrd avatar Dec 13 '23 06:12 zachrd

Ok, initial test of the latest automatic build.

Cannot enable HDR within moonlight settings on the OLED Deck.Happy to try anything else needed.

zachrd avatar Dec 13 '23 07:12 zachrd

Yep, that's expected if you're using the AppImage build from CI. It doesn't have the required libraries yet for Vulkan. I'm working on that now.

cgutman avatar Dec 13 '23 07:12 cgutman

You can try this AppImage - https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48754905/job/7r54vi0b48f1b6n1/artifacts

You'll need to make sure you run it from within the regular Steam Deck UI rather than the desktop mode since it requires Gamescope for HDR.

There are still known issues with the Vulkan renderer but I think it should work for testing.

cgutman avatar Dec 14 '23 07:12 cgutman

You can try this AppImage - https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48754905/job/7r54vi0b48f1b6n1/artifacts

You'll need to make sure you run it from within the regular Steam Deck UI rather than the desktop mode since it requires Gamescope for HDR.

There are still known issues with the Vulkan renderer but I think it should work for testing.

I actually just tried this build on my Steam Deck (from the "Game Mode" UI by adding the AppImage as a non-Steam game), HDR option is still greyed out. Do I need to set an env var or something to enable the new Vulkan renderer?

TheBacon00 avatar Dec 14 '23 07:12 TheBacon00

You can try this AppImage - https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48754905/job/7r54vi0b48f1b6n1/artifacts You'll need to make sure you run it from within the regular Steam Deck UI rather than the desktop mode since it requires Gamescope for HDR. There are still known issues with the Vulkan renderer but I think it should work for testing.

I actually just tried this build on my Steam Deck (from the "Game Mode" UI by adding the AppImage as a non-Steam game), HDR option is still greyed out. Do I need to set an env var or something to enable the new Vulkan renderer?

Going to test the JSON here: FrogTheFrog

@FrogTheFrog posted this on the Discord the other day.

zachrd avatar Dec 14 '23 15:12 zachrd

You can try this AppImage - https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48754905/job/7r54vi0b48f1b6n1/artifacts

You'll need to make sure you run it from within the regular Steam Deck UI rather than the desktop mode since it requires Gamescope for HDR.

There are still known issues with the Vulkan renderer but I think it should work for testing.

I have tested AppImage (and my flatpak build), both with no luck.

I will generate some logs from AppImage in gamemode and add them here.

FrogTheFrog avatar Dec 14 '23 15:12 FrogTheFrog

You can try this AppImage - https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48754905/job/7r54vi0b48f1b6n1/artifacts You'll need to make sure you run it from within the regular Steam Deck UI rather than the desktop mode since it requires Gamescope for HDR. There are still known issues with the Vulkan renderer but I think it should work for testing.

I actually just tried this build on my Steam Deck (from the "Game Mode" UI by adding the AppImage as a non-Steam game), HDR option is still greyed out. Do I need to set an env var or something to enable the new Vulkan renderer?

Same. I just added Applmage to Steam after making it executable and HDR (Experimental) is grayed out. I thought that I may have to connect to my PC first then change the options and it is still grayed out. I tried out every combination of Display Mode X Video Decoder X Video Codec and HDR is still grayed out. Restarting the steam deck didn't do anything either.

Using Windows 11 with a LG C2 OLED and (HDR on before connecting to my PC).

I have no idea how to generate logs for you but it seems like that @FrogTheFrog is going to generate his logs.

arshiatn avatar Dec 14 '23 16:12 arshiatn

So here are some logs (PLVK_LOG_LEVEL=5, for debug logs) for SteamDeck running from gamemode: with_prefer_vulkan.log with_prefer_vulkan_and_force_vaapi.log without_prefer_vulkan.log

I noticed there is SDL Error (0): pl_map_avframe_ex() failed, but have no idea what this means :/

FrogTheFrog avatar Dec 14 '23 16:12 FrogTheFrog

This latest AppImage is a winner! Very impressive work, devs. System details: Nobara Linux, Kernel 6.6.7-200, Steam Deck OLED. Added the AppImage as a non-Steam game, switched to game mode and HDR was available as an option within Moonlight’s settings.

IMG_0385 IMG_0386

matte-schwartz avatar Dec 15 '23 01:12 matte-schwartz

This latest AppImage is a winner! Very impressive work, devs. System details: Nobara Linux, Kernel 6.6.7-200, Steam Deck OLED. Added the AppImage as a non-Steam game, switched to game mode and HDR was available as an option within Moonlight’s settings.

IMG_0385 IMG_0386

Hmmm… HDR is grayed out on my end…

johnyz333 avatar Dec 15 '23 01:12 johnyz333

This latest AppImage is a winner! Very impressive work, devs. System details: Nobara Linux, Kernel 6.6.7-200, Steam Deck OLED. Added the AppImage as a non-Steam game, switched to game mode and HDR was available as an option within Moonlight’s settings. IMG_0385 IMG_0386

Hmmm… HDR is grayed out on my end…

Even on the build from an hour ago? The previous ones I tried hadn’t worked but this worked OOTB for me… happy to dump logs if it would be useful IMG_0391

matte-schwartz avatar Dec 15 '23 01:12 matte-schwartz

This latest AppImage is a winner! Very impressive work, devs. System details: Nobara Linux, Kernel 6.6.7-200, Steam Deck OLED. Added the AppImage as a non-Steam game, switched to game mode and HDR was available as an option within Moonlight’s settings. IMG_0385 IMG_0386

Hmmm… HDR is grayed out on my end…

Even on the build from an hour ago? The previous ones I tried hadn’t worked but this worked OOTB for me… happy to dump logs if it would be useful IMG_0391

Can you link the build please…

johnyz333 avatar Dec 15 '23 01:12 johnyz333

Here's a link to the working AppImage build with HDR support: https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/48762923/job/8ciibh342qicq980/artifacts

cgutman avatar Dec 15 '23 02:12 cgutman

I can confirm latest build is working with Sunshine on Windows to host if you aren't getting it working here are some things to try:

  • what remains of the NVidia driver host did not work for me; upon starting a stream Moonlight would say the PC can't encode AV1 or H265 in HDR (my 30-series GPU can't encode AV1 at all, so that one at least makes total sense)
  • you need HDR turned on for the display you're streaming from in Windows display settings on the host machine; which yeah if Windows isn't outputting HDR then there's no HDR to stream.

chipgw avatar Dec 15 '23 02:12 chipgw

Thank you for your work on this! It looks like Appveyor has hit its download quota:

{"message":"Artifacts download limit (1024 MB/day) exceeded."}

Is there a mirror available?

dylanfrankcom avatar Dec 15 '23 03:12 dylanfrankcom

Thank you for your work on this! It looks like Appveyor has hit its download quota:

{"message":"Artifacts download limit (1024 MB/day) exceeded."}

Is there a mirror available?

I anticipated this happening and uploaded a mirror here: https://pixeldrain.com/u/1zMvXLqi @ cgutman please feel free to delete if this is not okay

matte-schwartz avatar Dec 15 '23 03:12 matte-schwartz

I've tried the Appveyor AppImage on my OLED Steamdeck with a Nvidia 2080TI and Sunshine on my PC.

I can select HDR in Moonlight, but starting the stream produces a black screen.

When manually changing the codec to HVEC (AV1 encoding isn't supported by the graphics card) I get a warning "This PC's GPU doesn't support HEVC Main 10 decoding for HDR streaming" and the stream is shown in SDR (i.e. washed out colors and no HDR indicator in the brightness settings)

Moredread avatar Dec 15 '23 04:12 Moredread

I've tried the Appveyor AppImage on my OLED Steamdeck with a Nvidia 2080TI and Sunshine on my PC.

I can select HDR in Moonlight, but starting the stream produces a black screen.

When manually changing the codec to HVEC (AV1 encoding isn't supported by the graphics card) I get a warning "This PC's GPU doesn't support HEVC Main 10 decoding for HDR streaming" and the stream is shown in SDR (i.e. washed out colors and no HDR indicator in the brightness settings)

Yeah this is my experience as well. Happy to provide any data that might be useful (unless the SD really can't do HEVC Main 10 decoding?).

TheBacon00 avatar Dec 15 '23 05:12 TheBacon00

Had the same issues, set it to automatic, that worked for me.

johnyz333 avatar Dec 15 '23 05:12 johnyz333

I also had this problem. Will check automatic in a moment.

zachrd avatar Dec 15 '23 05:12 zachrd