ClassicOldSong / Apollo

Sunshine fork
GNU General Public License v3.0
504 stars 13 forks source link

Black Screen on starting stream #14

Closed Rumik closed 2 months ago

Rumik commented 2 months ago

Hi there,

Twice today and once yesterday I have tried to stream a game from Apollo and all I've gotten is a black screen with audio in the background. Killing the process and restarting fixes it.

Streaming via Moonlight-qt on Steam Deck.

Thanks

ClassicOldSong commented 2 months ago

Are you streaming with virtual display or just ordinary desktop mirroring? And what's your computer configuration?

Rumik commented 2 months ago

I am using a virtual display. There may have been a conflict with MoonDeck's "pass resolution to host" setting, which I have now disabled, and haven't seen the black screen again. I'll leave this open for a little longer just in case, as I intend to test this thoroughly over the next week.

Rumik commented 2 months ago

Scratch that, it just happened again. Seems to be related to the virtual display.

System: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz 3.70 GHz, 64GB RAM, GeForce RTX 3070.

ClassicOldSong commented 2 months ago

Can you run dxgi-info.exe to see which graphics card the virtual monitor is on?

Rumik commented 2 months ago

C:\Program Files\Apollo\tools>"C:\Program Files\Apollo\tools\dxgi-info.exe" ====== ADAPTER ===== Device Name : NVIDIA GeForce RTX 3070 Device Vendor ID : 0x000010DE Device Device ID : 0x00002484 Device Video Mem : 8018 MiB Device Sys Mem : 0 MiB Share Sys Mem : 32728 MiB

====== OUTPUT ======
Output Name       : \\.\DISPLAY50
AttachedToDesktop : yes
Resolution        : 1280x800

Output Name       : \\.\DISPLAY1
AttachedToDesktop : yes
Resolution        : 3840x2160

Output Name       : \\.\DISPLAY2
AttachedToDesktop : yes
Resolution        : 3840x2160

====== ADAPTER ===== Device Name : NVIDIA GeForce RTX 3070 Device Vendor ID : 0x000010DE Device Device ID : 0x00002484 Device Video Mem : 8018 MiB Device Sys Mem : 0 MiB Share Sys Mem : 32728 MiB

====== OUTPUT ======

====== ADAPTER ===== Device Name : NVIDIA GeForce RTX 3070 Device Vendor ID : 0x000010DE Device Device ID : 0x00002484 Device Video Mem : 8018 MiB Device Sys Mem : 0 MiB Share Sys Mem : 32728 MiB

====== OUTPUT ======

====== ADAPTER ===== Device Name : Microsoft Basic Render Driver Device Vendor ID : 0x00001414 Device Device ID : 0x0000008C Device Video Mem : 0 MiB Device Sys Mem : 0 MiB Share Sys Mem : 32728 MiB

====== OUTPUT ======

Press any key to continue . . .

ClassicOldSong commented 2 months ago

It seems ok, what's your streaming configuration? Which encoder are you using?

Does the black screen issue also affect other moonlight clients like Android/iOS ones?

ClassicOldSong commented 2 months ago

Does reconnecting (not killing the current process) help? Can you try when the black screen happens, exit the stream from your deck and reconnect with another client to see if it's still black?

Also please make sure you're on the latest graphics card driver.

Rumik commented 2 months ago

I'm using the NVIDIA encoder, and I'm on the latest graphics card driver. I've only tried this using the Moonlight-QT client; I don't have an android but next time I get a black screen I'll reconnecting with the ios client. FYI, I have not experienced this issue using Sunshine, even with the "Virtual Display with HDR" virtual display.

ClassicOldSong commented 2 months ago

Maybe you can try again with their nightly build. Apollo includes their nightly changes.

By saying encoding, I mean if you're using HEVC/H264 or AV1.

Rumik commented 2 months ago

I am using all the default settings; I haven't changed anything other than adding apps that all use the virtual display.

I just got the black screen again, closed the client without killing the stream. Retried, same thing. Tried with the ios client, still black.

Rumik commented 2 months ago

I've narrowed this down a little bit... this only happens when my physical displays are turned off. If they're on, then the stream connects fine, although the game window isn't on the right display. When they are turned off, the black screen issue happens. Disconnecting the session in the client restores the resolution just fine when the physical displays are on. When they are off and the black screen happens, disconnecting the client does not restore the previous resolution.

ClassicOldSong commented 2 months ago

Hmmm, is the virtual display still connected when the black screen issue happens? Could you check the driver status showed both on audio/video tab and in device manager when the black screen happens?

By the term "turn off", did you turn the monitor off physically or just in Windows Setting? It seems you have 2 physical monitors, which one are you turning off?

Would you enable Headless Mode in audio/video settings and try again?

You can use Win+P and select Extended to make both the built in display and virtual monitor work.

Sorry for so much questions but I need more information to locate the source of the issue.

ClassicOldSong commented 2 months ago

Does this still happen now? If it still happens, can you confirm that this happens on a clean installation of Window?

As far as I know, this is the only case with this issue, it's likely that it's related to your setup. There's another user group not on GitHub, but no one reported similar issues.

Rumik commented 2 months ago

I've actually just got a new PC so I've been setting it up and testing it. So far I have not seen this issue, but I haven't had a lot of opportunities to try. It's probably fine now :)