Troubleshooting guide
Moonlight Black Screen After Sleep: Wake, Display, Encoder — A Technician's Step-by-Step Fix
Category: Game Streaming
You wake your Sunshine host from sleep, reconnect Moonlight, and get a black frame instead of your desktop. This guide walks you through a controlled diagnosis of the wake, display, and encoder chain so you can restore the stream.
Check the Wake State First
After sleep, the host may not fully resume. On the Sunshine machine, open a terminal and run systemctl status sleep.target or check Event Viewer for wake errors. If the host is still in a low-power state, press a key or move the mouse to force a full wake. Result interpretation: if the host responds to input and the display turns on, proceed. If not, the issue is at the OS wake layer, not Moonlight.
Verify the Display Output
A sleeping host often disables its GPU output. Connect a monitor or use a dummy plug, then confirm the display is active in OS settings. On Windows, check Settings > System > Display; on Linux, run xrandr and look for a connected output. If the display shows as disconnected or resolution is reset, the black frame is caused by the host not rendering. Re-enable the display and set the correct resolution.
Test the Encoder
With the display active, restart the Sunshine service. Then reconnect Moonlight. If the stream is still black, check the Sunshine logs for encoder initialization errors. A common fix is to switch the encoder (e.g., from NVENC to software) in Sunshine’s configuration and restart. This isolates whether the hardware encoder failed to recover from sleep.
Verification Test
After each change, disconnect and reconnect Moonlight. A successful test shows your desktop within 5 seconds. If the black frame persists, note which step failed and revert that change before trying the next.
Rollback and Recovery
If a configuration change breaks streaming entirely, restore your previous Sunshine settings from backup or reset to defaults. For persistent issues,

Ask for help with your logs. This Moonlight Black Screen After Sleep: Wake, Display, Encoder check should resolve most post-sleep black frames.