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

Moonlight throwing error: "No video received from Host" when using Virtual Display #9

Open
Nevs123 opened this issue Nov 28, 2023 · 17 comments

Comments

@Nevs123
Copy link

Nevs123 commented Nov 28, 2023

I am trying to run Moonlight on a Steam Deck using this virtual display, but keep hitting an error. This error only occurs for the virtual display. If I adjust to using one of my "real" monitors, it works fine.

  1. Ensured that options.txt has 1280x800 at 60hz
  2. installed the driver as shown in the instructions
  3. The display shows up under Display settings. It is configured to 1280x800 at 60hz by default
  4. tools\dxgi-info.exe is showing the following name for this display: \.\DISPLAY10
  5. I set \.\DISPLAY10 as the Output Name in Sunshine
  6. I set the virtual display as my primary monitor
  7. I have also tried rebooting a couple of times, along with uninstalling/reinstalling the driver.

Issue: When attempting to launch Desktop, Steam Big Picture, or Playnite through Moonlight, I get the following:

  1. Connection goes through
  2. I always get a black screen no matter what I launch (Desktop/Big Picture/Playnite). At no point do I get a visual
  3. When launching Playnite, I can hear the launcher's music playing on the steam deck
  4. After a few seconds, I get a disconnect with the following error:
No Video received from host
Check your firewall and port forwarding rules for port(s): UDP 47998, UDP 48000

I believe this may be an issue with my Sunshine configuration settings, but I'm unsure what exactly is wrong. If I switch the display to one of my other 3 "real" displays, Moonlight connects and works just fine. This only appears to happen on the virtual display.

@yoshi43
Copy link

yoshi43 commented Dec 6, 2023

Do you have something like iGPU Multi-Monitor enabled in your bios? I am having this same issue with that enabled on my ASUS motherboard, but if I disable it I have no issues.

@Nevs123
Copy link
Author

Nevs123 commented Dec 8, 2023

Apologies if this is the wrong place to ask this question. I'm happy to post it elsewhere if needed.

@yoshi43 Unfortunately I do not see a setting like this in the BIOS. I may just be missing the setting however.

  • Motherboard: Gigabyte B650I Aorus Ultra
  • CPU: AMD Ryzen 7 7800X3D with integrated graphics
  • Discrete GPU: NVIDIA GeForce RTX 4090

I think I'm seeing a couple of errors in the Sunshine logs. If i'm reading this correctly, Sunshine is trying to use my integrated graphics to run this virtual display. If I force it to run using the 4090 in Sunshine setting, I get a different error. Is a Dummy Plug required to make this work with a 4090?

When initiating Sunshine, I immediately see the error below related to the virtual display:

[2023:12:08:13:02:13]: Info: nvprefs: No need to modify application profile settings
[2023:12:08:13:02:13]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2023:12:08:13:02:13]: Info: Sunshine version: 0.21.0
[2023:12:08:13:02:13]: Info: Compiling shaders...
[2023:12:08:13:02:13]: Info: System tray created
[2023:12:08:13:02:13]: Info: Compiled shaders
[2023:12:08:13:02:15]: Info: Trying encoder [nvenc]
[2023:12:08:13:02:15]: Info: ddprobe.exe [1] [\\.\DISPLAY10] returned: 0x00000000

When connecting and forcing the virtual display in Sunshine settings, I can see a black screen, hear Playnite Audio, and can register controller inputs from the steam deck for a few seconds. I even get a mouse cursor on the screen for a moment just before it disconnects. After the disconnect, I found this in the logs:

[2023:12:08:13:07:10]: Info: HDR color coding [Rec. 2020 + SMPTE 2084 PQ]
[2023:12:08:13:07:10]: Info: Color depth: 10-bit
[2023:12:08:13:07:10]: Info: Color range: [JPEG]
[2023:12:08:13:07:10]: Info: 
[2023:12:08:13:07:10]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:12:08:13:07:10]: Info: 
[2023:12:08:13:07:10]: Info: Found H.264 encoder: h264_amf [amdvce]
[2023:12:08:13:07:10]: Info: Found HEVC encoder: hevc_amf [amdvce]
[2023:12:08:13:07:10]: Info: Executing: ["C:\Users\mattn\AppData\Local\Playnite\Playnite.FullscreenApp.exe" --hidesplashscreen --startfullscreen] in ["C:\Users\mattn\AppData\Local\Playnite"]
[2023:12:08:13:07:10]: Info: "C:\Users\mattn\AppData\Local\Playnite\Playnite.FullscreenApp.exe" --hidesplashscreen --startfullscreen running with PID 11976
[2023:12:08:13:07:10]: Info: nvprefs: No need to modify application profile settings
[2023:12:08:13:07:10]: Info: nvprefs: No need to modify global profile settings
[2023:12:08:13:07:10]: Info: CLIENT CONNECTED
[2023:12:08:13:07:10]: Info: Gamepad 0 will be Xbox 360 controller (default)
[2023:12:08:13:07:10]: Error: DuplicateOutput() test failed [0x887A0004]
[2023:12:08:13:07:11]: Error: DuplicateOutput() test failed [0x887A0004]
[2023:12:08:13:07:11]: Error: DuplicateOutput() test failed [0x887A0004]

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented Dec 20, 2023

i experience similar issue on my hyper-v GPU-P setup running this driver. attempting to connect multiple times in a row eventually allows moonlight to connect to the stream coming from sunshine. this happened for all the idd drivers i tested (usbmmidd, iddriver original, parsec).

it looks more like a bug with sunshine when there is no real display. my guess - it tries other adapter first and eventually after some retries it flags it as unusable. then, the display name is passed to another adapter (might be the duplicate warning) which allows eventually to connect.. quite confusing i know and i might be wrong

what i found helping, at some extent is to:

  • ofc allow any firewall: outbound on source and inbound on destination for LAN connections (or ports forwarded if connecting from external network)
  • disable lockscreen (on the remote) + also enable autologin passwordless
  • disable uac
  • you must set display settings to only show on the idd one (I had to blindly left arrow + enter to confirm change or else the timer would go too fast while screen freezing while switching from extended)
  • in my case, i can replicate bug by: shutdown vm, fresh start, then connect to it through moonlight. I never connect before through hyper-v enhanced RDP which might mess with display naming. also in my case had to disable 'microsoft hyper-v video' display adapter
  • made a script and set it in scheduled task to periodically simulate pressing enter to keep awake
  • while initially i also tried setting up the display name manually in sunshine, i decided to leave the field unset on auto

! However I still get firewall warnings on first connection attempts, but at least no more black screens of death. I am usually able to connect after 3-4 attempts which is a bit of an annoyance but eventually connects and stays connected (stable/ no crash unlike with parsec).
! Also, after disconnecting moonlight, i can jump right in without the bug this way. So what i usually do, is to put the VM on pause whenever i want and resume it just like that. I can even pause VM (to free GPU/CPU) during gameplay and resume right after.

Result for me is pretty good. On my RTX 2060 OC, i am able to play cyperpunk in VM almost maxed out at around 40-60 fps with some drops in dogtown (though no raytracing, no DLSS/DLAA but xess or fsr instead) on full hd 120 hz with HDR. stream is done on 2K resolution with vsync on 60 mbps H.265 via moonlight through NAT (internal hyper-v switch)

Running win 11 23h2 patched with all updates and latest moonlight/sunshine, idd driver and nvidia driver

@FangLecheng
Copy link

Disabling the core graphics will do the trick

@TsaiTung-Chen
Copy link

TsaiTung-Chen commented Jan 7, 2024

Disabling the core graphics will do the trick

This works for me.

In my case, the integrated graphic card does not need to be always disabled. It still works if I re-enable it. However, I will have to disable and re-enable it everytime if I reboot my PC.

@Theauxm
Copy link

Theauxm commented Apr 3, 2024

Disabling the core graphics will do the trick

This worked for me! Thanks!

  • CPU: AMD 7900
  • GPU: AMD 7900xtx
  • MOBO: ASUS x670e-i ROG Strix

Device Manager -> Display Adapters -> Disable AMD Radeon(TM) Graphics -> Restart

@ds0tr0
Copy link

ds0tr0 commented Jul 28, 2024

I have the same problem. But i have a amd 5600x so no integrated graphics to disable. Any suggestions. Thanks. Im also using the monitor swap automation. Without it and choosing the \.\display5 directly on sushine settings the problem was even worse. Sunshine didnt even find a monitor

@Nonary
Copy link

Nonary commented Aug 10, 2024

I've fixed this issue on sunshine, commenting here to keep track of which issues to notify once the PR gets approved.

@mtaanquist
Copy link

I am seeing this happen as well on a CPU with no integrated graphics (AMD Ryzen 5 5600X) and no toggle in BIOS to disable it. @Nonary, do you believe that your fix would correct this as well? Can I help test that somehow?

@Kilvearn
Copy link

I also encounters the same problem.
I also have a second one : When it tries connecting to Sunshine, I have a message specifying that "AV1" codec is not available from my GPU. But I have a RTX 3070Ti and it works correctly with my primary monitor (not the virtual one)...

@Nonary
Copy link

Nonary commented Aug 27, 2024

Sorry forgot to tag this after submitting the PR.

Right now it still under code review but have had already multiple confirmed reports from users it fixes the issue for them

You can download the version of sunshine that contain the fix from this link

Artifact download URL: https://github.com/LizardByte/Sunshine/actions/runs/10527479630/artifacts/1847524623

@Nonary
Copy link

Nonary commented Aug 27, 2024

Link to PR: LizardByte/Sunshine#3002

Adding this so it shows it as referenced on both sides

@Kilvearn
Copy link

Thanks @Nonary , I will try it as soon as possible :)
Should it also solve the problem of AV1 not working ? (I assume it was because of the integrated card ?)

@Kilvearn
Copy link

Kilvearn commented Aug 27, 2024

@Nonary I tried your version of Sunshine, it now correctly opens the desktop on the virtual monitor. Unfortunately, the resolutions seems extremely low (maybe 640x480)... But in Windows, I put the resolution to 4k 120Hz, and also in Moonlight settings.

If I remove the "do" and undo" commands :
Do :
displayswitch.exe /external
Undo :
displayswitch.exe /extend

it displays at the correct resolution (but opens Steam on first monitor...)
Not sure why it is a problem...

@Nonary
Copy link

Nonary commented Aug 27, 2024

@Nonary I tried your version of Sunshine, it now correctly opens the desktop on the virtual monitor. Unfortunately, the resolutions seems extremely low (maybe 640x480)... But in Windows, I put the resolution to 4k 120Hz, and also in Moonlight settings. Not sure what causes the problem...

Make sure you use https://github.com/Nonary/MonitorSwapAutomation to swap monitors, it works much better than the sunshine one currently (which will eventually be updated to do the same thing as the script linked above is doing)

@Kilvearn
Copy link

Make sure you use https://github.com/Nonary/MonitorSwapAutomation to swap monitors, it works much better than the sunshine one currently (which will eventually be updated to do the same thing as the script linked above is doing)

Thanks a lot for your advice ! It worked perfectly with MonitorSwapAutomation ! :-)
Thanks again for your help !

@naman2341
Copy link

Link to Pre-release https://github.com/LizardByte/Sunshine/releases/tag/v2024.1012.170838 that includes @Nonary 's fix.

It finally works for me!

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