Sunshine
Sunshine copied to clipboard
[ERROR] Fatal: Unable to find display or encoder during startup (Windows 24H2)
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your issue described in the documentation?
- [X] I have read the documentation
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Describe the Bug
The Moonlight client (Apple TV 4K) consistently fails to connect with the host (windows 11 24h2), eventually displaying the message to check if the display is plugged in and turned on. On the Sunshine webUI, I get two errors:
Fatal: Unable to find display or encoder during startup. Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
The only fix is to MANUALLY restart Sunshine from the host (Delayed start on the Sunshine Service doesn't work)
Expected Behavior
I expect moonlight client to be able to connect with the Windows 11 24h2 host. I have reliably used Moonlight + Sunshine for years, and nothing has changed except for updating to Windows 11 24H2 and using the Nvidia App
Additional Context
Steps I have tried (but no dice!):
- re-installed windows 11 24h2 thrice
- tried manually setting up sunshine as a startup app, disabling the service
- tried delayed start on the Sunshine service
NOTE: As always I have been using Nonary's Resolution Automation v3.0. The issues persists without Nonary's mod.
The only fix is to manually restart moonlight. Fix works consistently.
Host Operating System
Windows
Operating System Version
24H2 (OS Build 26100.2605)
Architecture
amd64/x86_64
Sunshine commit or version
v2024.1211.191744
Package
Windows - installer (recommended)
GPU Type
NVIDIA
GPU Model
GeForce RTX 4090
GPU Driver/Mesa Version
566.36
Capture Method
None
Config
output_name = {fa234220-b6e3-5a0f-8558-e6a9629492ab}
upnp = enabled
address_family = both
origin_web_ui_allowed = wan
external_ip = 73.37.173.199
wan_encryption_mode = 0
hevc_mode = 3
av1_mode = 3
encoder = nvenc
global_prep_cmd = [{"do":"powershell.exe -executionpolicy bypass -file \"C:\\Program Files\\Sunshine\\ResolutionAutomation\\StreamMonitor.ps1\" -n ResolutionMatcher","elevated":"false","undo":"powershell.exe -executionpolicy bypass -file \"C:\\Program Files\\Sunshine\\ResolutionAutomation\\Helpers.ps1\" -n ResolutionMatcher -t 1"}]
Apps
No response
Relevant log output
[2024-12-12 15:44:00.733]: Info: Sunshine version: v2024.1211.191744
[2024-12-12 15:44:00.733]: Info: Package Publisher: LizardByte
[2024-12-12 15:44:00.733]: Info: Publisher Website: https://app.lizardbyte.dev
[2024-12-12 15:44:00.733]: Info: Get support: https://app.lizardbyte.dev/support
[2024-12-12 15:44:00.733]: Info: Provided workaround settings for SettingsManager:
{
"hdr_blank_delay": null
}
[2024-12-12 15:44:00.737]: Info: Currently available display devices:
[
{
"device_id": "{c394926f-1c13-5779-952b-e85e03c58c61}",
"display_name": "\\\\.\\DISPLAY5",
"friendly_name": "EP-HDMI-RX",
"info": {
"hdr_state": "Disabled",
"origin_point": {
"x": 7680,
"y": 0
},
"primary": false,
"refresh_rate": {
"type": "rational",
"value": {
"denominator": 1001,
"numerator": 60000
}
},
"resolution": {
"height": 720,
"width": 1280
},
"resolution_scale": {
"type": "rational",
"value": {
"denominator": 100,
"numerator": 100
}
}
}
},
{
"device_id": "{fa234220-b6e3-5a0f-8558-e6a9629492ab}",
"display_name": "\\\\.\\DISPLAY1",
"friendly_name": "Odyssey G95NC",
"info": {
"hdr_state": "Enabled",
"origin_point": {
"x": 0,
"y": 0
},
"primary": true,
"refresh_rate": {
"type": "rational",
"value": {
"denominator": 1000,
"numerator": 119997
}
},
"resolution": {
"height": 2160,
"width": 7680
},
"resolution_scale": {
"type": "rational",
"value": {
"denominator": 100,
"numerator": 200
}
}
}
}
]
[2024-12-12 15:44:00.875]: Info: nvprefs: No need to modify application profile settings
[2024-12-12 15:44:00.875]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2024-12-12 15:44:00.898]: Info: Compiling shaders...
[2024-12-12 15:44:00.909]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.924]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.933]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.939]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.956]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.960]: Warning: include/base_vs.hlsl(28,13-36): warning X3556: integer modulus may be much slower, try using uints if possible.
[2024-12-12 15:44:00.960]: Info: Compiled shaders
[2024-12-12 15:44:00.974]: Error: Couldn't get default audio endpoint [0x80070490]
[2024-12-12 15:44:00.985]: Info: Trying encoder [nvenc]
[2024-12-12 15:44:01.009]: Info: ddprobe.exe 1 \\.\DISPLAY1 --verify-frame-capture returned 0x00000000
[2024-12-12 15:44:01.009]: Info: Set GPU preference: 1
[2024-12-12 15:44:01.525]: Error: Failed to locate an output device
[2024-12-12 15:44:02.033]: Error: Failed to locate an output device
[2024-12-12 15:44:02.742]: Error: Failed to locate an output device
[2024-12-12 15:44:03.248]: Error: Failed to locate an output device
[2024-12-12 15:44:03.454]: Info: Encoder [nvenc] failed
[2024-12-12 15:44:03.454]: Error: Couldn't find any working encoder matching [nvenc]
[2024-12-12 15:44:03.454]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024-12-13 01:49:10.173]: Info: Trying encoder [quicksync]
[2024-12-13 01:49:11.234]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:12.195]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:12.203]: Error: Failed to locate an output device
[2024-12-13 01:49:12.637]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:12.789]: Info: System tray created
[2024-12-13 01:49:13.651]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:13.659]: Error: Failed to locate an output device
[2024-12-13 01:49:14.315]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:15.276]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:15.285]: Error: Failed to locate an output device
[2024-12-13 01:49:15.718]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:16.677]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:16.684]: Error: Failed to locate an output device
[2024-12-13 01:49:16.897]: Info: Encoder [quicksync] failed
[2024-12-13 01:49:16.897]: Info: Trying encoder [amdvce]
[2024-12-13 01:49:17.338]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:18.284]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:18.290]: Error: Failed to locate an output device
[2024-12-13 01:49:18.726]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:19.673]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:19.680]: Error: Failed to locate an output device
[2024-12-13 01:49:20.333]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:21.277]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:21.283]: Error: Failed to locate an output device
[2024-12-13 01:49:21.716]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:22.648]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:22.654]: Error: Failed to locate an output device
[2024-12-13 01:49:22.854]: Info: Encoder [amdvce] failed
[2024-12-13 01:49:22.854]: Info: Trying encoder [software]
[2024-12-13 01:49:23.281]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:24.240]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:24.247]: Error: Failed to locate an output device
[2024-12-13 01:49:24.680]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:25.634]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:25.641]: Error: Failed to locate an output device
[2024-12-13 01:49:26.286]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:27.236]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:27.243]: Error: Failed to locate an output device
[2024-12-13 01:49:27.670]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:28.628]: Error: DuplicateOutput() test failed [0x887A0004]
[2024-12-13 01:49:28.634]: Error: Failed to locate an output device
[2024-12-13 01:49:28.836]: Info: Encoder [software] failed
[2024-12-13 01:49:28.836]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2024-12-13 01:49:28.836]: Fatal: Unable to find display or encoder during startup.
[2024-12-13 01:49:28.836]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2024-12-13 01:49:28.836]: Error: Video failed to find working encoder
[2024-12-13 01:49:28.846]: Info: Configuration UI available at [https://localhost:47990]
[2024-12-13 01:49:29.623]: Info: Registered Sunshine mDNS service
[2024-12-13 01:49:30.916]: Error: Failed to map TCP 48010: 718
[2024-12-13 01:49:30.924]: Error: Failed to map UDP 47998: 718
[2024-12-13 01:49:30.932]: Error: Failed to map UDP 48000: 718
[2024-12-13 01:49:30.939]: Error: Failed to map UDP 47999: 718
[2024-12-13 01:49:30.947]: Error: Failed to map TCP 47989: 718
[2024-12-13 01:49:30.954]: Error: Failed to map TCP 47984: 718
[2024-12-13 01:49:30.964]: Info: Completed UPnP port mappings to 192.168.1.237 via http://192.168.1.1:37089/rootDesc.xml
[2024-12-13 01:49:44.037]: Info: Opening UI from system tray
[2024-12-13 01:49:44.043]: Info: Resolved user-provided command 'https://localhost:47990' to '"C:\Users\sinmu\AppData\Local\Mozilla Firefox\firefox.exe" -osint -url "https://localhost:47990"'
[2024-12-13 01:49:44.047]: Info: https://localhost:47990 running with PID 17716
[2024-12-13 01:49:44.047]: Info: Opened url [https://localhost:47990]
[2024-12-13 01:49:44.116]: Info: Web UI: [127.0.0.1] -- not authorized
[2024-12-13 01:51:49.108]: Error: Failed to map TCP 48010: 718
[2024-12-13 01:51:49.116]: Error: Failed to map UDP 47998: 718
[2024-12-13 01:51:49.125]: Error: Failed to map UDP 48000: 718
[2024-12-13 01:51:49.134]: Error: Failed to map UDP 47999: 718
[2024-12-13 01:51:49.142]: Error: Failed to map TCP 47989: 718
[2024-12-13 01:51:49.149]: Error: Failed to map TCP 47984: 718
[2024-12-13 01:54:07.305]: Error: Failed to map TCP 48010: 718
[2024-12-13 01:54:07.312]: Error: Failed to map UDP 47998: 718
[2024-12-13 01:54:07.320]: Error: Failed to map UDP 48000: 718
[2024-12-13 01:54:07.327]: Error: Failed to map UDP 47999: 718
[2024-12-13 01:54:07.335]: Error: Failed to map TCP 47989: 718
[2024-12-13 01:54:07.345]: Error: Failed to map TCP 47984: 718
[2024-12-13 01:56:25.502]: Error: Failed to map TCP 48010: 718
[2024-12-13 01:56:25.510]: Error: Failed to map UDP 47998: 718
[2024-12-13 01:56:25.518]: Error: Failed to map UDP 48000: 718
[2024-12-13 01:56:25.526]: Error: Failed to map UDP 47999: 718
[2024-12-13 01:56:25.533]: Error: Failed to map TCP 47989: 718
[2024-12-13 01:56:25.541]: Error: Failed to map TCP 47984: 718
[2024-12-13 01:58:43.694]: Error: Failed to map TCP 48010: 718
[2024-12-13 01:58:43.702]: Error: Failed to map UDP 47998: 718
[2024-12-13 01:58:43.710]: Error: Failed to map UDP 48000: 718
[2024-12-13 01:58:43.717]: Error: Failed to map UDP 47999: 718
[2024-12-13 01:58:43.725]: Error: Failed to map TCP 47989: 718
[2024-12-13 01:58:43.733]: Error: Failed to map TCP 47984: 718
Having this issue on Ubuntu 24.04.1 LTS
Having this issue on Ubuntu 24.04.1 LTS
Hey there, so the problem is with the Sunshine Service. Not sure how things work on the Ubuntu end but with Windows the problem goes away as long as the Sunshine service is delayed a start from a cold boot (this is becoming impossible to accomplish as the AutoDelayedStart reg edit seems to be broken on Windows 11).
The only recourse is to use a remote setup like Unified Remote to do a system restart (NOT a shutdown-startup, but a restart EACH time you cold start your machine)
TL;DR: post cold start, try restarting your system using a remote restart utility as that seems to work on Windows 11. The problem is with the Sunshine Service which starts too soon on cold boots and has no way of delaying its start (Delayed Start will not work).
A painful but working workaround I have had success with is using Remmina. Log into a RDP session, and start/restart sunshine from the RDP session. If you have trouble connecting with the name of the computer in Remmina, you can use moonlight to get the IP of the computer, put that in the server field of Remmina, connect, restart sunshine, exit RDP, connect via moonlight.
Same issue on Windows 11 Pro 24H2.
Can confirm this issue is exclusive to 24H2, for the moment it is struggling with being able to stream from a Lock Screen.
I’m honestly not sure what can be done to fix this issue for now other than to suggest users to revert back to 23H2 for the time being.
Sunshine uses the windows API to capture the screen, therefore if it is broken, it would need to be fixed on Microsoft’s side. As far as I’m aware they have not published any new guidelines for DXGI for developers.
Just for info I'm running Windows 11 Pro 21H2 and I too have this issue.
Just for info I'm running Windows 11 Pro 21H2 and I too have this issue.
Likely not the same issue. This issue can also happen on laptops with hybrid graphics, but it’s not the same.
Hm, if you're sure that's good to know. I'm not using a laptop (server side), but I will open a new issue if I can gather more useful diagnostic info. I have had trouble updating windows and NVIDIA drivers recently, might be linked.
Hm, if you're sure that's good to know.
I'm not using a laptop (server side), but I will open a new issue if I can gather more useful diagnostic info. I have had trouble updating windows and NVIDIA drivers recently, might be linked.
Don't open a new issue, post the logs and question on either the sunshine discord or moonlight one in sunshine channel.
Issues are meant for confirmed bugs essentially, as opposed to technical support.
Hm, if you're sure that's good to know. I'm not using a laptop (server side), but I will open a new issue if I can gather more useful diagnostic info. I have had trouble updating windows and NVIDIA drivers recently, might be linked.
Don't open a new issue, post the logs and question on either the sunshine discord or moonlight one in sunshine channel.
Issues are meant for confirmed bugs essentially, as opposed to technical support.
Duly noted, thanks.
Can confirm this issue is exclusive to 24H2, for the moment it is struggling with being able to stream from a Lock Screen.
I’m honestly not sure what can be done to fix this issue for now other than to suggest users to revert back to 23H2 for the time being.
Sunshine uses the windows API to capture the screen, therefore if it is broken, it would need to be fixed on Microsoft’s side. As far as I’m aware they have not published any new guidelines for DXGI for developers.
Hi Nonary, I use many of your tools! THANK YOU!
I want to stress that mine isn’t a lock-screen issue. I use Autologon bypassing lockscreen. This seems to be a sunshine service issue, and specifically at COLD START. A restart right after a cold start fixes the issue. NOTE: Delaying a service and task scheduler is fundamentally broken in 24H2 so there is no ready fix. However, I tried a bunch of unorthodox things to zero down to the Sunshine Service. Here is what I tried:
-
installed a bunch of startup programs and pray for Sunshine Service to get delayed during startup… and it worked! Streams at first request. I noticed that the Sunshine icon would pop up a bit later in the tray, even at cold start (previously, sunshine icon was the first or second icon to pop up in the tray. Curiously this behavior doesn’t pop up when you simply restart a system. The Sunshien icon appears as either the last or second last icon)
-
went back to my original lean configuration (windows reinstall); issue returned at cold start. This time around I began using Unified Remote to remotely restart the system.
TL;DR: this issue has something to do with the Sunshine Service and the way it starts at cold boots (win 11 24H2). I think it is loading before any dependencies at cold start. For some reason this behavior is not repeated when the system is restarted. For those experiencing this issue, use Unified Remote to initiate a restart following a complete cold boot.
An easier solution is probably a scheduled task that restarts the service automatically once the computer boots up (even before login is complete) would probably work.
Or have a scheduled task start the service, instead having it start automatically.
Can confirm this issue is exclusive to 24H2, for the moment it is struggling with being able to stream from a Lock Screen. I’m honestly not sure what can be done to fix this issue for now other than to suggest users to revert back to 23H2 for the time being. Sunshine uses the windows API to capture the screen, therefore if it is broken, it would need to be fixed on Microsoft’s side. As far as I’m aware they have not published any new guidelines for DXGI for developers.
Hi Nonary, I use many of your tools! THANK YOU!
I want to stress that mine isn’t a lock-screen issue. I use Autologon bypassing lockscreen. This seems to be a sunshine service issue, and specifically at COLD START. A restart right after a cold start fixes the issue. NOTE: Delaying a service and task scheduler is fundamentally broken in 24H2 so there is no ready fix. However, I tried a bunch of unorthodox things to zero down to the Sunshine Service. Here is what I tried:
- installed a bunch of startup programs and pray for Sunshine Service to get delayed during startup… and it worked! Streams at first request. I noticed that the Sunshine icon would pop up a bit later in the tray, even at cold start (previously, sunshine icon was the first or second icon to pop up in the tray. Curiously this behavior doesn’t pop up when you simply restart a system. The Sunshien icon appears as either the last or second last icon)
- went back to my original lean configuration (windows reinstall); issue returned at cold start. This time around I began using Unified Remote to remotely restart the system.
TL;DR: this issue has something to do with the Sunshine Service and the way it starts at cold boots (win 11 24H2). I think it is loading before any dependencies at cold start. For some reason this behavior is not repeated when the system is restarted. For those experiencing this issue, use Unified Remote to initiate a restart following a complete cold boot.
I've seen the issue occur even after restarting the service shortly after a cold boot, sometimes leading to errors like 0x887A0005 (access denied)—especially when it's at the lock screen.
Honestly, I’m not sure how to fix this since DXGI is part of the Windows API. Microsoft will likely address these issues over time or release documentation for developers on how to handle or work around them (if there's a new intended method going forward).
For now, if you need maximum stability, I recommend reverting back to 23H2 as soon as possible.
An easier solution is probably a scheduled task that restarts the service automatically once the computer boots up (even before login is complete) would probably work.
Or have a scheduled task start the service, instead having it start automatically.
I tried this. Here is what happens:
-
you make Sunshine Service manual, schedule a task with a delay of 15/30/60/
… and it magically still starts right before everything else on a cold boot! Absolute mystery. The most rogue, eager-to-start service I ever dealt with hah -
you disable Sunshine Service, launch sunshine through a scheduled task (sunshine.exe) and you get a cmd prompt window infinitely waiting for Sunshine Web UI to launch.
-
you do not install Sunshine Service, and Sunshine refuses to launch.
-
you try launching Sunshine as an .exe and you get a cmd prompt lecturing you to let Sunshine launch through its Service (I could be misremembering a bit about the message that appears).
Updating this thread with a fix: Turn off Fast boot. cold boot works fine consistently. Tried it numerous times. DISREGARD previous fixes.
Further (non-scientific) testing shows that SunshineService’s uber-aggressive startup behavior causes issues at cold boot. 24H2 may have changed some fast boot parameters which don’t work well with SunshineService at cold boot. Suggestion: put some sort of a startup timer option in Sunshine app. Seems like this issue has been discussed on Reddit as well, way before 24H2 so happens with certain software/hardware setups.
@erwan-privat tagging you here as your solution was downright painful. Hope this works for you.
@Sinmurv Cold boot doesn't actually free RAM from loaded NT kernel and other important things for Windows. A restart on the other hand is the actual HARD RESET for the system.
@Sinmurv Cold boot doesn't actually free RAM from loaded NT kernel and other important things for Windows. A restart on the other hand is the actual HARD RESET for the system.
This is very interesting! Switching off fast boot fixed the issue for me. Is that related to what you are saying? My uneducated guess would be that it does, and that’s why it fixed my cold boot Sunshine woes
I am not really convinced it has anything to do with fast boot or services, I still think it is DXGI bugs and the issue is likely to return
I am not really convinced it has anything to do with fast boot or services, I still think it is DXGI bugs and the issue is likely to return
I have been testing this for the last 36 hours. It is the service, and there are threads on Reddit pre-dating 23H2 talking about either same or similar problems. The service was also the culprit then in those cases. Again, this is very much system dependent so YMMV.
I turn on fast boot, the issue comes back with every cold boot without fail. I turn off fast boot, the issue goes away and the system streams happily. Both ways the result is 100% consistent.
The tip off for me was that at cold boot, with fast boot on, the Sunshine service despite being set to manual would be one of the first services to turn on completely circumventing the task scheduler delay parameters of 60 seconds.
Fast boot, on or off, doesn’t affect restarts so the behavior with restart was consistent either way. Task scheduler would work fine and Sunshine would start and streaming would be possible.
Unsurprisingly turning off fast boot fixed all issues.
I do agree with you that 24H2 changed something that affected the fast boot parameters and in my specific case Sunshine didn’t like it. I also agree that the Lock Screen issue is there as well which is related to DXGI limitation as per you. But this specific issue in my case was Sunshine Service related and I hope that a built-in startup delay feature, especially as the service functions with Fast boot, should be considered.
EDIT: cleaned up some wording.
After further testing, I have some bad news about how 24H2 handles displays.
As suspected, the issue is tied to the display being offline, detached, or in deep sleep. In 23H2, this wasn’t a problem because DXGI checks would still pass, allowing Sunshine to execute the necessary do and undo commands. This was particularly helpful for users relying on dummy plugs, like those using my MonitorSwapAutomation script.
However, starting with 24H2, these DXGI checks no longer pass. As a result, Sunshine stalls and eventually flags a missing display. Any attempts to start a stream trigger these checks again, preventing the execution of scripts that could otherwise resolve the issue by swapping displays.
Even if we extend Sunshine to support pre-processing scripts—scripts that run before streams and encoder tests—there’s another problem. Microsoft now appears to block display topology changes while the screen is locked. This means you’d need to remotely unlock your machine first, activate the dummy plug, and then start Sunshine.
Unfortunately, there’s no easy workaround for this except to stay on 23H2. That said, I’m working on a guide to set up SSH scripts on your phone. These scripts would let you remotely unlock your machine, activate the dummy plug, and get Sunshine working again. This is for users who have no choice but to upgrade beyond 23H2.
Another option is to add pre-processing script support to Sunshine and advise users to disable their lock screen entirely—but that’s not a great solution in general.
After further testing, I have some bad news about how 24H2 handles displays.
As suspected, the issue is tied to the display being offline, detached, or in deep sleep. In 23H2, this wasn’t a problem because DXGI checks would still pass, allowing Sunshine to execute the necessary do and undo commands. This was particularly helpful for users relying on dummy plugs, like those using my MonitorSwapAutomation script.
However, starting with 24H2, these DXGI checks no longer pass. As a result, Sunshine stalls and eventually flags a missing display. Any attempts to start a stream trigger these checks again, preventing the execution of scripts that could otherwise resolve the issue by swapping displays.
Even if we extend Sunshine to support pre-processing scripts—scripts that run before streams and encoder tests—there’s another problem. Microsoft now appears to block display topology changes while the screen is locked. This means you’d need to remotely unlock your machine first, activate the dummy plug, and then start Sunshine.
Unfortunately, there’s no easy workaround for this except to stay on 23H2. That said, I’m working on a guide to set up SSH scripts on your phone. These scripts would let you remotely unlock your machine, activate the dummy plug, and get Sunshine working again. This is for users who have no choice but to upgrade beyond 23H2.
Another option is to add pre-processing script support to Sunshine and advise users to disable their lock screen entirely—but that’s not a great solution in general.
Or just turn off fast startup. Dude. I have not had this issue since I turned off fast startup. It’s been months. Not sure why you are so worried about displays. I have all of my three desktops, similar hardware configs, on 24H2. Fast startup and sunshine’s over eager service are to blame.
After further testing, I have some bad news about how 24H2 handles displays.
As suspected, the issue is tied to the display being offline, detached, or in deep sleep. In 23H2, this wasn’t a problem because DXGI checks would still pass, allowing Sunshine to execute the necessary do and undo commands. This was particularly helpful for users relying on dummy plugs, like those using my MonitorSwapAutomation script.
However, starting with 24H2, these DXGI checks no longer pass. As a result, Sunshine stalls and eventually flags a missing display. Any attempts to start a stream trigger these checks again, preventing the execution of scripts that could otherwise resolve the issue by swapping displays.
Even if we extend Sunshine to support pre-processing scripts—scripts that run before streams and encoder tests—there’s another problem. Microsoft now appears to block display topology changes while the screen is locked. This means you’d need to remotely unlock your machine first, activate the dummy plug, and then start Sunshine.
Unfortunately, there’s no easy workaround for this except to stay on 23H2. That said, I’m working on a guide to set up SSH scripts on your phone. These scripts would let you remotely unlock your machine, activate the dummy plug, and get Sunshine working again. This is for users who have no choice but to upgrade beyond 23H2.
Another option is to add pre-processing script support to Sunshine and advise users to disable their lock screen entirely—but that’s not a great solution in general.
Or just turn off fast startup. Dude. I have not had this issue since I turned off fast startup. It’s been months. Not sure why you are so worried about displays. I have all of my three desktops, similar hardware configs, on 24H2. Fast startup and sunshine’s over eager service are to blame.
Or just use Apollo.
This specific scenario has nothing to do with fast startup. I've replicated the issue many times and have fast start up disabled.
I also can't replicate the issue with fast start up enabled as well.
I know exactly what causes this issue and why, and specifically it will only impact users who have displays that go into deep sleep after an extended period of inactivity, which is most often TV monitors (like the LG C2-4)
Because the fast start up issue cannot be replicated, I doubt this issue will ever be officially resolved or closed out. I'm just keeping it open because there is another 24H2 specific issue that impacts users with the exact same symptoms (but different error code)
I have created a script for those that are impacted by this issue, for more information please read: https://github.com/Nonary/24H2DummyFix/releases/latest
Please note the workaround script has a dependency to the monitor swap script: https://github.com/Nonary/MonitorSwapAutomation/releases/latest
As this issue requires a lot of changes to Sunshine in order to resolve, so these workaround scripts will be an interim solution for now.
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
Removing stale tag because this issue is still relevant, to fix will require a lot of changes in Sunshine as well as the monitor swap code inside Sunshine itself. I have developed a workaround script (mentioned earlier) as an interim solution for now and keeping this issue open allows it to be found on search.
Yeah, switching display issue started with 24H2, it was fine in 23H2. The option to "Deactivate other displays and activate only the specified display" does not work correctly anymore, the screen flickers, but stays on Monitor 1.
A simple workaround for now that worked for me, albeit with slight annoyance is to add Do and Undo commands using Windows built-in program DisplaySwitch from command prompt.
Do:
DisplaySwitch.exe /External
Undo
DisplaySwitch.exe /Internal
No need for elevation to admin to run these commands.
The issue (annoyance) is that Moonlight connects and the display switches to external (Virtual Display for me). But after 2-3 seconds, I get error that "No video received from Host" in Moonlight. Simply trying to reconnect again will work fine since the monitor is already switched to the external and did not revert to the internal yet (we disconnected session, but we did not end or "Quit" the session, thus the Undo command did not run yet).
To completely revert to the Internal monitor, tap and hold on the Desktop or Steam or whatever app you have in Moonlight and choose to Quit session from the menu.
To completely fix the issue, a preprocessing Do and Undo commands that run prior to try to probe the encoders will fix this. The reason I have to run the session twice for my method to work is to make sure the monitor has already switched to the designated one.
I have these commands in 2 separate batch files since I do other things like mute and unmute audio while choosing to play audio in PC and Moonlight simultaneously to avoid audio disappearing when disconnecting session while playing games when reconnecting. I use SetVol small command line program found here on GitHub for this.
Maybe this is related? I confirm that updating windows BREAKS sunshine
Maybe this is related? I confirm that updating windows BREAKS sunshine
Having the same udp issue, sunshine + moonlight broke after the update.. can't seem to figure out why.
Maybe this is related? I confirm that updating windows BREAKS sunshine
Having the same udp issue, sunshine + moonlight broke after the update.. can't seem to figure out why.
https://github.com/ClassicOldSong/Apollo/issues/640#issuecomment-2898843001 this is how you fix it
Maybe this is related? I confirm that updating windows BREAKS sunshine
Having the same udp issue, sunshine + moonlight broke after the update.. can't seem to figure out why.
ClassicOldSong/Apollo#640 (comment) this is how you fix it
changing mtu acc worked damn, thanks a lot mate!!