ClassicOldSong / Apollo

Sunshine fork - The easiest way to stream with the native resolution of your client device
GNU General Public License v3.0
2.3k stars 38 forks source link

Minimum Luminance not 0.00 #385

Closed LonkoStonko closed 1 week ago

LonkoStonko commented 4 weeks ago

Is it possible to change the minimum luminance for the virtual display to be 0 nits instead of 0.0657 nits?

With this min luminance, it appears that my black levels are elevated. For reference, I am using a Steam Deck OLED as the client device. The issue is most present when in HDR mode, all black screens have a slightly grey appearance and it's clear that the OLED pixels are not actually off as they should be at true 0 nits.

LonkoStonko commented 4 weeks ago

Actually just to clarify, the issue is also visible when in SDR mode. All black screens have an elevated black level..

ClassicOldSong commented 4 weeks ago

It's not related to minimum luminance. I noticed the same problem too but I think it's compression artifact that might not be able to eliminate.

ClassicOldSong commented 4 weeks ago

https://github.com/LizardByte/Sunshine/issues/1337#issuecomment-2558626504

Related, and I just disabled HDR on my client and stream SDR it's fine, but 8 bit color is a little worse than 10 bit...

ClassicOldSong commented 4 weeks ago

Or enable SDR 10 bits and HDR 12 bits: https://github.com/SudoMaker/SudoVDA#config no it's not working...

LonkoStonko commented 4 weeks ago

I tested with enabling SDR 10 Bit and HDR 12 bit earlier today but did not have any luck.

It's extremely bizarre but I did not have elevated black levels before upgrading to Windows 11 24H2. I installed the Windows update this past Friday, 2/14 and something broke ever since then. Windows Auto HDR isn't activating now for games it was previously activating for and black levels are elevated. I think something must have changed within Windows that is changing the way that HDR interacts with Virtual Displays.

I even tried a fresh Windows install to see if that would resolve it but it did not make any difference.

Would it be possible to test with a Sudo Virtual display configured for 0 min luminance?

ClassicOldSong commented 4 weeks ago

I just tested, no luck, even with real monitors the elevated black level is the same(greenish result on my client).

LonkoStonko commented 4 weeks ago

Any chance you should share the Sudo Virtual Display config so I can test with it? I do not have the same experience with using real monitors. I have a couple OLED displays and none of the actual monitors are sharing the same elevated black level as the virtual display.

LonkoStonko commented 4 weeks ago

Actually I take it back, the issue is still there if I stream a mirror of my existing display instead of using the virtual display.

ClassicOldSong commented 4 weeks ago

Try this:

SudoVDA-zero-minimum-black-level.zip

LonkoStonko commented 4 weeks ago

That actually made a huge difference in SDR - OLED pixels did not turn on when displaying a true black screen.

But when enabling HDR, it did not make any difference.

LonkoStonko commented 4 weeks ago

Also, just a side note - I was able to get 10 bit SDR and 12 bit HDR to work using the registry edits. The key is that you cannot have both HDR 12 bit and SDR 10 bit enabled at the same time.

I tested both settings and confirmed that increasing to 10 bit/12 bit respectively did not make any difference with elevated black levels in HDR mode or SDR mode.

But this 0 nit min luminance driver you provided definitely has made a difference with SDR.

ClassicOldSong commented 4 weeks ago

Interesting, it doesn't affect anything functionally so I'll include the new driver in the next release.

LonkoStonko commented 4 weeks ago

Sounds great! Thanks for being so communicative and quick to troubleshoot.

Do you have any ideas as to what else could be potentially influencing the HDR black level uplift? Since the SDR uplift was solved for me with this new driver, it seems that it's most likely not compression artifacts. It's almost as if something is preventing the HDR black level from getting to true 0 nits.

ClassicOldSong commented 4 weeks ago

It makes no difference to me when streaming in 10bit mode, no matter SDR or HDR. The HDR toggle in clients actually enables 10bit mode for SDR.

The minimal luminance field in EDID is only valid for HDR actually, so you might have disabled HDR on your client and the stream fall back into 8bit mode, and in 8bit mode I didn't see the greenish background.

LonkoStonko commented 4 weeks ago

I did some additional testing - SDR doesn't have raised black levels in 8 bit or 10 bit mode. To achieve 10 bit SDR mode, I made sure to turn off HDR in Windows and kept HDR on in the moonlight client. This allows for an AV1 10 bit SDR signal to passthrough to my Steam Deck OLED.

I'm curious, do you see elevated black levels when in 10 bit SDR mode or does it look the same as 8 bit?

For me the moment I enable HDR in Windows, in 10 bit or 12 bit mode, this is when the elevated black levels show up.

ClassicOldSong commented 4 weeks ago

Probably encoder related, I use HEVC for 444 support. Only in 10bit mode the green background appears.

ClassicOldSong commented 1 week ago

Already shipped in the latest version. SDR10bit issue will continue to investigate, closing this issue for now.