Usually a no-signal on the TV means it is outputting a mode that the TV does not support.
Perhaps your odd workaround is really just not setting the resolution and refresh rate (randr) back and so the second launch doesn’t perform a switch when launching the app? Maybe a delay before launching might be prudent to stabilize things before the app is actually started?
What if you change the randr manually, launch the app manually, and then attempt to play HDR content? What if you change randr manually, launch via the bat? You can see where I’m going here.
The issue is not related to launching Plex HTPC via script, by using the script to first set the resolution to 2160p60 it only uncovered the following issue.
Configuration:
Plex HTPC:
refresh rate switching = on
resolution switching = off
HDR switching = on
Steps to Reproduce:
toggle HDR off (WIN + ALT + B)
set resolution in windows to 3840x2160@60Hz (2160p60)
launch Plex HTPC
play a HDR video with 23.976FPS
Result:
Audio plays
Onkyo TX-SR393 reports 2160p23
HDR was not switched on
Samsung QE65Q9FNA gives me “no signal”
stop playback
display is changed back to 2160p60
toggle HDR on with WIN+ALT+B
play the same HDR video
Result:
Video & Audio plays (HDR is on as it was toggled on already)
Onkyo TX-SR393 reports 2160p23
stop playback
display is changed back to 2160p60
toggle HDR off with WIN+ALT+B
disable refresh rate switching in Plex HTPC
play the same HDR video
Result:
Video & Audio plays
Onkyo TX-SR393 reports 2160p60 (stays at 60Hz b/c RR switching is now disabled)
So the HDR switching in Windows is a public but undocumented API (it is present in the headers and the structures/functions have public names but it’s not to be found in any documentation). Perhaps these kinds of issues are why? It seems like your TV is having issues negotiating the signal when the refresh rate and HDR are both changed (and I say the TV because your AVR seems to have figured it out).
Since you are using an NVIDIA GPU, you may want to try switching to Vulkan and turning on the HDR Metadata Passthrough setting. Vulkan can be turned on via adding gpu-context=winvk to the mpv.conf. When using Vulkan and HDR Metadata Passthrough, NVIDIA GPUs switch the output to HDR themselves in the driver outside of Windows switching. Maybe this would help your situation.
Exactly!
Only when the videofile requires Plex HTPC to change both the refresh rate and toggle HDR on, the “no signal” occurs.
Since changing just the resolution or just switching HDR on works, this would suggest that a delay between these 2 steps could prevent the problem, or?
Like a “HDR change delay” setting similar to the “refresh rate change delay” setting that is already there.
I have done that now, sadly it did not help.
I checked in the logs, and seems like Vulkan was used, so I guess I did change mpv.conf correctly. Plex HTPC.log (999.4 KB)