Sunshine Setup
ZeroVDD integrates directly with upstream LizardByte Sunshine with no forks or community wrapper scripts. When a Moonlight client connects, ZeroVDD creates a virtual display matching the client’s exact resolution, refresh rate (including fractional 59.94, 119.88, and 239.76 Hz), and HDR setting, then restores your physical monitors automatically when the stream ends or if Sunshine crashes.
Prerequisites
Section titled “Prerequisites”- ZeroVDD is installed and
zerovdd doctorreportszerovdd-svcrunning and connected. See Installation. - Upstream LizardByte Sunshine is installed (default config:
C:\Program Files\Sunshine\config\sunshine.conf).
Configure sunshine.conf
Section titled “Configure sunshine.conf”-
Preview edits with a dry run:
Terminal window zerovdd sunshine configureIf
sunshine.conflives in a non-default location, pass--config <PATH>or setsunshine_config_pathunder[sunshine]in%ProgramData%\zerovdd\config.toml. -
Apply edits (and clear pinned
output_nameif warned):Terminal window zerovdd sunshine configure --apply --clear-output-nameBefore writing
sunshine.conf, ZeroVDD saves a timestamped backup next to the file (sunshine.conf.bak.<epoch>). Applying makes three idempotent updates:global_prep_cmd: Adds a Do/Undo entry calling"<install-dir>\zerovdd.exe" sunshine startand"<install-dir>\zerovdd.exe" sunshine stopwith"elevated": "false". Re-running updates the entry in place without disturbing other prep commands.dd_configuration_option = disabled: Disables Sunshine’s built-in display switcher so it cannot race with ZeroVDD’s CCD topology and HDR transitions.--clear-output-name: Removes any pinned physicaloutput_name(such as\\.\DISPLAY1) so Sunshine captures whichever primary display is active during streaming.
-
Restart Sunshine: Restart the Sunshine Windows service or application so the updated
sunshine.conftakes effect. -
Verify status:
Terminal window zerovdd sunshine status
How a Streaming Session Runs
Section titled “How a Streaming Session Runs”When Moonlight starts a stream, Sunshine runs zerovdd.exe sunshine start:
- Reads Sunshine’s client environment variables:
SUNSHINE_CLIENT_WIDTHandSUNSHINE_CLIENT_HEIGHTSUNSHINE_CLIENT_FPS(integer or fractional Hz, e.g.59.94,90,119.88)SUNSHINE_CLIENT_HDR(true/1orfalse/0)SUNSHINE_CLIENT_UUID(preferred) orSUNSHINE_CLIENT_NAME(fallback"default-sunshine-client") to derive a deterministicMonitorGuid(MonitorContainerId) so Windows remembers per-client display layout across reconnects.
- Walks the ancestor process tree to locate
sunshine.exeand records(pid, creation_time), skipping transientcmd.exewrapper shells. - Sends
StartSessiontozerovdd-svcover\\.\pipe\zerovdd-svc:- Snapshots current physical layout, modes, primary
(0, 0)origin, and independent HDR/ACM state to%ProgramData%\zerovdd\topology-backup.json(if no session is active yet). - Creates the virtual display with a client-specific EDID 1.4 + CTA-861-G block (or
sunshine.default_edid_pathif configured) sized to realistic ~96-110 PPI. - Runs
zerovdd.exe internal-ccd applyin the active console session (Session > 0) to applyisolateorextendtopology and HDR state.
- Snapshots current physical layout, modes, primary
When Moonlight disconnects, Sunshine invokes zerovdd.exe sunshine stop, departing the virtual display and restoring physical monitors from topology-backup.json.
Manual Testing & Overrides
Section titled “Manual Testing & Overrides”You can test Sunshine sessions from the CLI without connecting Moonlight:
# Inspect active session and service healthzerovdd sunshine status
# Start a manual test session owned by a specific PIDzerovdd sunshine start --width 2560 --height 1600 --fps 90 --hdr true --client-id my-tablet --owner-pid <PID>
# Force-stop an active session from a different terminalzerovdd sunshine stop --forceCrash, Lock Screen & Reboot Recovery
Section titled “Crash, Lock Screen & Reboot Recovery”sunshine.execrash ortaskkill /F:zerovdd-svcmonitors the recordedsunshine.exe(pid, creation_time)handle. If Sunshine exits without callingsunshine stop,zerovdd-svcremoves the virtual display and restores physical topology fromtopology-backup.jsonautomatically.- Back-to-back client switches: If a second
StartSessionarrives while an earlier session is active,zerovdd-svcpreserves the original physicaltopology-backup.jsoninstead of overwriting it with a virtual-only snapshot. - Lock Screen (
Win+L) & UAC desktop: Becausezerovdd-svclaunchesinternal-ccdwith a session-retargetedLocalSystemtoken into the active console session (WTSGetActiveConsoleSessionId()), display switching and restoration work on bothwinsta0\defaultandwinsta0\winlogon. - Unexpected reboot / BSOD: If
topology-backup.jsonremains on disk whenzerovdd-svcstarts, it restores physical monitors immediately or as soon asSERVICE_CONTROL_SESSIONCHANGEfiresConsoleConnect,SessionLogon, orSessionUnlock.
What to Read Next
Section titled “What to Read Next”- Headless Hosts if your streaming host has no physical monitor connected.
- EDID, HDR, and Color for Windows 11 24H2 split HDR/ACM behavior and custom EDIDs.
- Configuration Reference to tune
[sunshine]and[hdr_defaults]inconfig.toml.