Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] HDR washed out in Windows 11 24H2 #494

Open
Skyyblaze opened this issue Dec 4, 2024 · 86 comments
Open

[BUG] HDR washed out in Windows 11 24H2 #494

Skyyblaze opened this issue Dec 4, 2024 · 86 comments

Comments

@Skyyblaze
Copy link

Describe the bug
Colors appear washed out and the stream appears with a kind of gray haze over it when attempting to stream a PS5 to a Windows machine

Debug Log
Please attach a log with verbose logging enabled.

To Reproduce
Steps to reproduce the behavior:
Attempt to stream a PS5 to a Windows machine with HDR enabled.

Expected behavior
Colors and brightness appearing correctly in HDR mode.

Screenshots
grafik

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 24H2 Build 26100.2314
  • Device: PC
  • chiaki-ng: Version 1.9.2

Additional context
This happens on the D3D11 and the Vulkan backend. Interesting note, after exiting a stream the Chiaki UI itself appears also washed out. Having a HDR enabled TV on next to the Remote Play session changes nothing. HDR is enabled in Windows and works fine in all other applications.

@streetpea
Copy link
Owner

@Skyyblaze which renderer preset are you using in video settings?

@Skyyblaze
Copy link
Author

@Skyyblaze which renderer preset are you using in video settings?

@streetpea I'm using the High Quality preset

@streetpea
Copy link
Owner

@Skyyblaze can you please post a debug log of running into the issue?

@Skyyblaze
Copy link
Author

@Skyyblaze can you please post a debug log of running into the issue?

@streetpea Sure thing, sorry I forgot to in the initial post.
chiaki_session_2024-12-05_00-00-08-755755.log

@streetpea
Copy link
Owner

@cgarst does it still work fine for you with the latest update (v1.9.2)?

@Skyyblaze
Copy link
Author

@streetpea Sorry to bug you again but where is Chiaki NG's config file stored?`I couldn't find it in %Appdata% and I thought maybe a full, fresh reset might help.

@streetpea
Copy link
Owner

streetpea commented Dec 5, 2024

I doubt a reset will help but you could always create a new profile in settings->config and start fresh from that or delete the values from the windows registry manually

@Skyyblaze
Copy link
Author

Skyyblaze commented Dec 5, 2024

You were right, still I wanted to test it. Thanks for looking into it! Also can I delete the log from the previous post?

@streetpea
Copy link
Owner

streetpea commented Dec 5, 2024

@Skyyblaze which type of gpu are you using? I tested with an amd gpu and it works correctly (nothing like you’re picture) there using windows 11 with d3d11va (that pc doesn’t support Vulkan hw decoding) using the Radeon graphics drivers.

@Skyyblaze
Copy link
Author

@Skyyblaze which type of gpu are you using? I tested with an amd gpu and it works correctly (nothing like you’re picture) there using windows 11 with d3d11va (that pc doesn’t support Vulkan hw decoding) using the Radeon graphics drivers.

@streetpea Hmm interesting. I'm using a Nvidia RTX 4070 running on driver 566.14 which is the newest.

@streetpea
Copy link
Owner

@Skyyblaze can you set hw decoder to none and see if that makes any difference?

@Skyyblaze
Copy link
Author

@Skyyblaze can you set hw decoder to none and see if that makes any difference?

@streetpea I just tried it and unfortunately I get the same issue. Could a reason be that my monitor doesn't correctly expose it's capabilities over its EDID? The max brightness in the EDID says 1207nits however testing revealed the actual hardware goes up to 1400nits. I also have a Windows HDR calibrated profile set.

@cgarst
Copy link

cgarst commented Dec 5, 2024

@cgarst does it still work fine for you with the latest update (v1.9.2)?

Yep, still working on 1.9.2 using AMD graphics and d3d11va. Am still on 23H2.

@beyondinfinitii
Copy link

I'm having the same issue, using an Nvidia RTX 3080 Ti, with driver 566.03, on Windows 11 24H2.

@Skyyblaze
Copy link
Author

I'm having the same issue, using an Nvidia RTX 3080 Ti, with driver 566.03, on Windows 11 24H2.

Good to know I'm not alone.

@streetpea
Copy link
Owner

streetpea commented Dec 15, 2024

@Skyyblaze @beyondinfinitii can you try this build: https://github.com/streetpea/chiaki-ng/actions/runs/12341470852/artifacts/2323254801?

Note: You need to be logged into GitHub to download

@Skyyblaze
Copy link
Author

Skyyblaze commented Dec 15, 2024

@Skyyblaze @beyondinfinitii can you try this build: https://github.com/streetpea/chiaki-ng/actions/runs/12341470852/artifacts/2323254801?

Note: You need to be logged into GitHub to download

@streetpea Thanks for looking into this! Sadly I have the same issue with this build. I tried the HQ Preset with D3D11VA, Vulkan and no HW Decoder but the gray haze remained.

The official Remote Play App has no HDR issues although the video quality is terrible and it lacks many comfort functions of Chiaki.

EDIT: If it helps any, I get the exact same wrong HDR image if I try the RenoxHDR Mod for ReShade in PC games when I use any additional filters that clamp the color space.

@beyondinfinitii
Copy link

@Skyyblaze @beyondinfinitii can you try this build: https://github.com/streetpea/chiaki-ng/actions/runs/12341470852/artifacts/2323254801?

Note: You need to be logged into GitHub to download

Same issue.

I can also confirm that the official PS Remote Play app has working HDR.

@streetpea
Copy link
Owner

@Skyyblaze can you post a verbose log when using d3d11va as the hw decoder?

@beyondinfinitii
Copy link

@Skyyblaze can you post a verbose log when using d3d11va as the hw decoder?

Here's a verbose log from mine.

chiaki_session_2024-12-18_11-42-17-626626.log

@Skyyblaze
Copy link
Author

@Skyyblaze can you post a verbose log when using d3d11va as the hw decoder?

@streetpea Sure thing, here is mine!
chiaki_session_2024-12-18_19-53-42-051051.log

@streetpea
Copy link
Owner

@Skyyblaze @beyondinfinitii can you try mpv with gpu-api=vulkan and vo=gpu-next and see if it presents the same issue
https://github.com/shinchiro/mpv-winbuild-cmake/releases?

@Skyyblaze
Copy link
Author

@Skyyblaze @beyondinfinitii can you try mpv with gpu-api=vulkan and vo=gpu-next and see if it presents the same issue https://github.com/shinchiro/mpv-winbuild-cmake/releases?

Sure! That works fine on my end. I had to look for a local file to playblack, haven't done so in quite some years :p

grafik

@streetpea
Copy link
Owner

@Skyyblaze you would be looking to see if it’s washed out. I’m not sure you can tell with a black and white picture.

@Skyyblaze
Copy link
Author

Skyyblaze commented Dec 19, 2024

@streetpea Oh sorry, it was just a bad screencap, it was a music video and 90% of the video was in color and looking fine, I just happened to hit PrintScr when a black and white part was on screen and didn't think about it. But the output was perfectly fine!

I actually use mpv for streaming often enough and it always looks fine even if I stream HDR content but for your test I setup a fresh instance from your link and with just your settings.

@streetpea
Copy link
Owner

@Skyyblaze just checking you launched with --vo=gpu-next and --gpu-api=vulkan?

@Skyyblaze
Copy link
Author

@streetpea Yes, I launched mpv from the command line with just these two options.

@streetpea
Copy link
Owner

Those settings use the same rendering engine as chiaki-ng which is why I mentioned them. Was that an hdr video? If so we can see what settings are perhaps different.

@Skyyblaze
Copy link
Author

@streetpea It wasn't an HDR video no but I see where you are coming from, I'll try to grab any HDR video and test when I'm back home later 👍🏻

@Skyyblaze
Copy link
Author

@streetpea I found a Samsung HDR Test Video for their TVs and it looks fine in mpv with only these two commands

grafik

No gray haze and normal colors.

@streetpea
Copy link
Owner

streetpea commented Dec 29, 2024

@Skyyblaze @beyondinfinitii can you try this build. If it still doesn’t work you can try manually setting the target peak in display settings under settings->video and see if that changes things

@streetpea
Copy link
Owner

@beyondinfinitii
Copy link

beyondinfinitii commented Dec 29, 2024

Okay so by default with everything on Auto in the Display Settings the issue remained. Changing the target peak to match my monitors peak (1600 nits) also didn't help, plus it doesn't seem like the nits value is accurate since it darkened the interface a lot.

However! What did fix the washed out image was changing the Target Transfer Characteristics. I tried ITU-R Rec. BT.1886, IEC 61966-2-4 sRGB, and Pure power gamma 2.2 which all displayed correctly. Whatever the Auto setting is choosing is causing the washed out image. I'll go through and try all the options when I have more time.

I also don't know if this matters, but my PS5 Pro is plugged into a HDMI 2.0 TV with HDR enabled, which doesn't have the necessary bandwidth to display full RGB so it drops to YUV422.

As an aside, 2 bugs in noticed in this build is that Up on the D-pad (Dualsense) does not work in the Display Settings, and the Target Primaries cannot be changed to anything other than Auto (EDIT: actually it does change it if you back out and go back in).

@streetpea
Copy link
Owner

@beyondinfinitii those transfer characteristics are sdr so you are forcing sdr. HDR is all of the ones starting with ITU-R BT.2100 PQ on down.

@beyondinfinitii
Copy link

Gotcha. You can see the washed out effect happen even outside of the stream.

chiaki-ng.2024-12-29.14-28-13.-.Trim.mp4

@beyondinfinitii
Copy link

beyondinfinitii commented Dec 29, 2024

I fixed it! @Skyyblaze by any chance do you have Sunshine (the game stream software) installed? I quit Sunshine and voila!

chiaki-ng 12_29_2024 2_39_09 PM

@Skyyblaze
Copy link
Author

@streetpea @beyondinfinitii This is absolutely mindblowing, I do use Sunshine too after Nvidia abandoned Shield Streaming! I didn't even try the new build, after reading this I stopped the Sunshine service and Chiaki was displaying perfectly fine with HDR too, great find @beyondinfinitii!

Why would a passive streaming application that has no outgoing connections mess with Chiaki?

I created an Issue on the Sunshine Github too: LizardByte/Sunshine#3500

@streetpea
Copy link
Owner

streetpea commented Dec 30, 2024

@beyondinfinitii you were probably using it with sdr. If you set the hdr luminance for sdr it makes the picture darker. It should be set to 203 for sdr (what auto does). If you were viewing the menu you probably noticed this but if you were actually playing hdr content it shouldn't be darker (i.e., in the stream itself).

@streetpea
Copy link
Owner

streetpea commented Dec 31, 2024

@beyondinfinitii more precisely if you adjust the peak beyond what the screen supports the image will start getting darker. The screen supports different nit levels for sdr and hdr so generally it will get lighter if beyond 203 for sdr or beyond the hdr peak. You can test it now in the stream by opening the stream menu with either l1+l3+r1+r3 or ctrl+O and then opening display settings and you can tweak it and see the changes in real time there for hdr (if you're playing an hdr game and your tv is on). The build is here: https://github.com/streetpea/chiaki-ng/actions/runs/12562414519/artifacts/2374821244 (It also should fix the other issues you mentioned)

@beyondinfinitii
Copy link

@beyondinfinitii more precisely if you adjust the peak beyond what the screen supports the image will start getting darker. The screen supports different nit levels for sdr and hdr so generally it will get lighter if beyond 203 for sdr or beyond the hdr peak. You can test it now in the stream by opening the stream menu with either l1+l3+r1+r3 or ctrl+O and then opening display settings and you can tweak it and see the changes in real time there for hdr (if you're playing an hdr game and your tv is on). The build is here: https://github.com/streetpea/chiaki-ng/actions/runs/12562414519/artifacts/2374821244 (It also should fix the other issues you mentioned)

The HDR nit output jumps to ~10,000 anytime the target peak is set to 530 nits and up. My monitor is capable of up to 1600 nits for a 10% window and 1400 nits for full screen.

Also, the auto setting doesn't seem to do anything. If I have the target peak set to 520 nits then set it back to auto nothing changes. You can see both issues in the video below.

chiaki-ng.2024-12-31.15-12-05.mp4

@streetpea
Copy link
Owner

@beyondinfinitii it doesn’t let me play the video

@beyondinfinitii
Copy link

beyondinfinitii commented Dec 31, 2024

Try this

chiaki-ng.2024-12-31.15-12-05.1.mp4

@streetpea
Copy link
Owner

@beyondinfinitii this doesn’t happen with mpv?

@beyondinfinitii
Copy link

beyondinfinitii commented Dec 31, 2024

@beyondinfinitii this doesn’t happen with mpv?

Here is a test with a BT2020 video:
520 nits
bt2020 - 520nits
1600 nits
bt2020 - 1600nits
10,000 nits
bt2020 - 10,000nits

Config:
profile=gpu-hq
vo=gpu-next
gpu-api=vulkan
target-peak=(the above)

@streetpea
Copy link
Owner

@beyondinfinitii what are you using for the hdr analysis?

@beyondinfinitii
Copy link

beyondinfinitii commented Dec 31, 2024

@beyondinfinitii what are you using for the hdr analysis?

Reshade with the HDR analysis tool from https://github.com/EndlesslyFlowering/ReShade_HDR_shaders/tree/2024.12.22

@streetpea
Copy link
Owner

I believe for the auto thing it should be 10,000 because that’s the peak for the trc function but it seems like picking the peak isn’t working properly

@beyondinfinitii
Copy link

Gotcha. Let me know when you're ready to test a fix.

@streetpea
Copy link
Owner

@beyondinfinitii try this it works correctly on my steam deck oled using the built in hdr visualizer: https://github.com/streetpea/chiaki-ng/actions/runs/12564119212/artifacts/2375162544

@beyondinfinitii
Copy link

@beyondinfinitii try this it works correctly on my steam deck oled using the built in hdr visualizer: https://github.com/streetpea/chiaki-ng/actions/runs/12564119212/artifacts/2375162544

Still happening, but now at 520 and up instead of 530 and up. Also, Auto only applies after exiting the Display Settings menu.

@Skyyblaze
Copy link
Author

@streetpea @beyondinfinitii I got a response in the Sunshine Issue that it might be caused by the Sunshine setting: "Present OpenGL/Vulkan on top of DXGI". I tested it and disabling fixes it which apparently indicates a Windows and/or driver bug.

LizardByte/Sunshine#3500 (comment)

@streetpea
Copy link
Owner

@Skyyblaze moonlight probably sets that up on start which is why reinstalling the driver temporarily fixed it until moonlight was restarted (upon system boot)

@Skyyblaze
Copy link
Author

@streetpea You mean Sunshine right? Sunshine is the Host and Moonlight the Client. But yeah that makes sense and explains what happened with the driver install.

So where are we at now, can/will Chiaki have a workaround implemented, is this something Sunshine has to fix or are we all at mercy of Nvidia drivers and Microsoft adjusting things in Windows?

@streetpea
Copy link
Owner

streetpea commented Jan 2, 2025

I mean sunshine. Wouldn’t the recommended solution be to disable present OpenGL/Vulkan on top of dxgi in your sunshine config? Based on the testing it sounds like something about the hdr data from the ps5 is causing the bug. So perhaps it’s just specific settings that aren’t working with the driver so I don’t think there is a fix for it atm.

@Skyyblaze
Copy link
Author

I did disable it and it did fix the issue yes but that impedes Sunshine's ability to stream Vulkan/OpenGL games somewhat from the explanation so it's not a 100% perfect solution either. I think a good workaround on Sunshine's side would be to disable any hooks of that sort until there's actually a established connection by a client.

@streetpea
Copy link
Owner

streetpea commented Jan 3, 2025

@beyondinfinitii so I tested on my steam deck today and was able to replicate what you were seeing on Windows. I checked the min and max Luma values (the nit configuration values sent to libplacebo) and they were correct. Then, I booted up my old save and it demonstrated the correct behavior. This leads me to believe that it’s either expected behavior or libplacebo or a bug with libplacebo that only happens under certain video conditions and the video streams of games are just hitting those conditions. The game I tested was death stranding and in the world towards the end of the game at Amelie’s beach it behaves as you said but it behaves correctly (capping nits around target peak) when in the private room in the game or in the the parts of main game world I tested outside of Amelie’s beach at a different save point

@streetpea
Copy link
Owner

streetpea commented Jan 3, 2025

@beyondinfinitii can you try taking an hdr video capture of the game that you’re playing and playing that is exhibiting this problem and then playing it back in mpv? Looking at obs it doesn’t appear my gpu is supported for hdr capture

@beyondinfinitii
Copy link

I haven't tried recording yet, but I can confirm that the target peak does indeed work, to an extent. It does seem to be game or image dependent. In some scenarios it will change step by step to match, and in others it will only change after reaching a certain target peak value.

@streetpea
Copy link
Owner

@beyondinfinitii I checked that the libplacebo backend value (hdr.max_luma) is being set correctly for the target frames colorspace (at least the same as for mpv) but sometimes it’s respected and other times it’s not depending on the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants