Sunshine & Moonlight: Switch to a Virtual Display Only, Then Restore Your Desktop
Stream your PC to a handheld, tablet, or TV in another room — while the monitors on your desk stay dark. A virtual display driver gives Sunshine something to capture, and two Monitor Profile Switcher profiles move you between the streaming layout and your real desktop.
Why Bother With a Virtual Display at All?
If you stream your PC with Sunshine and Moonlight, the naive setup works — until you notice the details. Your desk monitors light up in an empty room every time you play from the sofa. Anyone walking past can watch what you are doing. The stream’s resolution is whatever your physical monitor happens to be, which is rarely the resolution of the device in your hands: a 1440p ultrawide desktop squeezed onto a handheld, or a 1080p desk monitor feeding a 4K TV.
The fix is to give the PC a screen that does not exist. A virtual display is a display Windows believes is connected, created by a driver instead of a cable. For streaming, it is close to perfect: you switch Windows to the virtual display only, your physical monitors go dark, and the stream gets exactly the resolution you chose for the client device. When you are done, you switch back to your real desk layout.
Three pieces do three separate jobs, and keeping them straight is the key to this whole setup:
- Sunshine is the host software running on your PC; Moonlight is the client on the device you are holding. Sunshine captures a display and encodes the stream; Moonlight displays it and sends your controller, mouse, and keyboard back.
- A virtual display driver (VDD) creates the fake monitor with the resolution and refresh rate you configure.
- Monitor Profile Switcher saves the two display arrangements — virtual-only for streaming, physical for your desk — and switches between them. Get it from the download page if it is not installed yet.
The Components, Verified Against Their Own Documentation
Sunshine and Moonlight
Sunshine is LizardByte’s self-hosted game stream host for Moonlight. Per its official documentation, Sunshine on Windows is configured through a web interface at https://localhost:47990 by default; on first run you create the username and password, then pair a Moonlight client by entering the PIN Moonlight shows into Sunshine’s PIN page. Games and applications are added in that same web UI, including a plain Desktop entry if you want to stream the whole desktop rather than a single game.
The virtual display driver
The widely used open-source option is the Virtual Display Driver maintained under the VirtualDrivers organisation on GitHub. Its project wiki describes a driver that creates virtual monitors on Windows 10 and 11 which function like physical displays, explicitly lists Sunshine among the software it works with, and documents a wide range of configurable resolutions and refresh rates. Install it by following that project’s current release instructions — driver packages change often enough that you should always work from the project’s own page rather than from a screenshot in any guide, including this one.
Once installed and enabled, the virtual display appears in Windows Settings → System → Display like any other monitor. That is the moment it becomes useful to Monitor Profile Switcher: a profile can only save a display Windows can see.
Build the Two Profiles: Streaming and Desktop
- First, protect your way back. With your normal desk layout active — physical monitors on, arranged as usual — open Monitor Profile Switcher and save the current state as Desktop. If your desk layout involves disabling the virtual display, make sure the virtual display is in the state you want for desk work (typically disconnected) before you save.
- Set the virtual display’s resolution to match your client. In Windows Display Settings, select the virtual display and set the resolution your Moonlight device actually uses — the handheld’s native resolution for a handheld, the TV’s resolution for a TV. Matching matters: a virtual display at the client’s exact resolution avoids scaling blur and odd aspect ratios in the stream.
- Make the virtual display primary, then disable the physical monitors. Mark the virtual display as the main display, then set each physical monitor to “Disconnect this display.” Your desk screens will go dark; you are now looking at the PC through whatever remote view you have — so do this step while Moonlight is connected, or with the change-confirmation dialog ready to revert if you lose your view.
- Save this state as Streaming. From the tray icon, save the current arrangement as Streaming. It records the virtual display enabled and primary, and the physical displays disabled — the whole point of the exercise.
- Load Desktop and verify the round trip. Switch back, confirm every physical monitor returns in the right position with the right primary display, then load Streaming once more. A profile you have not watched restore successfully is a hope, not a profile.
- Assign hotkeys. Give Streaming and Desktop one hotkey each, following the hotkey switching guide. Remember the standing rule: Monitor Profile Switcher’s hotkeys work while its GUI is running.
If you stream to two very different clients — say a 1080p handheld and a 4K TV — save two streaming variants, such as Streaming-Handheld and Streaming-TV, that differ only in the virtual display’s resolution. Profiles do store resolution, so this is a legitimate use of them, not a hack.
The Session Workflow
Before a session: sit at the desk (or use any remote access you already have), load the Streaming profile, and watch the physical monitors go dark. Start Moonlight on your client, connect to the PC, and start the Desktop entry or the specific game you added in Sunshine. Everything you see comes from the virtual display; the desk stays dark and private, and the stream’s resolution is the one you chose.
After a session: disconnect in Moonlight, then load the Desktop profile — by hotkey if you are back at the desk, or from the tray once a physical screen is live again. Your monitors return in their saved arrangement, and the virtual display goes back to its saved desk state.
The honest limits
Monitor Profile Switcher cannot detect a Moonlight connection. Nothing in it watches Sunshine, so nothing will load the Streaming profile automatically when you connect or restore the Desktop profile when you disconnect. The switch is a hotkey or a tray click, done by you, at the start and end of a session. If you want the profile change glued to another event, the launcher patterns in auto-switching a display profile when a game launches are the closest available shape — a shortcut that loads a profile and then starts a program.
A second limit worth knowing: Sunshine captures a display, and if a stream ever shows the wrong screen, fix it in Sunshine’s own configuration or with its monitor-switching shortcuts rather than by rearranging profiles at random. Profiles decide which displays exist in Windows; Sunshine decides which one it captures.
If Something Goes Wrong
- The virtual display does not appear in Windows. The driver is not installed or not enabled — that is a VDD problem, not a profile problem. Re-check the VirtualDrivers project’s current installation steps before touching Monitor Profile Switcher.
- The stream is blurry or letterboxed. The virtual display’s resolution does not match the client. Set it in Windows to the client’s resolution and re-save the Streaming profile.
- You disabled every screen and can see nothing. Do not guess-click. A profile that takes out all displays is recoverable — follow the Safe Mode recovery guide, remove the bad profile, and rebuild it with Moonlight connected so you keep a view throughout.
- The desk layout comes back wrong. Load Desktop, fix the arrangement by hand once, and re-save over the profile. Profiles faithfully restore what was saved — including, unfortunately, the day you saved them in a half-awake state.
Set up carefully once, and the routine becomes genuinely pleasant: pick up the handheld, press one hotkey’s worth of intent, and play on a private, correctly sized screen while the desk sits dark. Your future self, streaming from another room, will not miss the glowing monitors at all.
Related Guides
- Auto-switch your display profile when a game launches — launcher patterns for gluing a profile change to a program start.
- Switch display profiles with a hotkey — assign the Streaming and Desktop keys this workflow uses.
- All monitors disabled? Safe Mode recovery — the way back if a streaming profile ever takes out every screen.
