The virtual display feature in SCRCPY allows users to mirror a dedicated virtual display instead of the device's physical screen. This feature is particularly useful for creating custom display environments or optimizing certain workflows, such as gaming or app testing. Unfortunately, at this stage there are some issues with stability and more often than not it will crash as soon as it is launched or shortly after launching so in this guide we're going to show you some potential fixes that might solve SCRCPY crashing when using a Virtual Display.
Takeaways:
- Stop SCRCPY crashing when using a Virtual Display
- Can't use the Virtual Display feature in SCRCPY
- Virtual Displays not working in SCRCPY Solution
Table of Contents
How to Use Virtual Displays in SCRCPY
Assuming you are familiar with how SCRCPY works you can use any of the following commands to launch a virtual screen using SCRCPY (# notes that you can customise the command)
scrcpy --new-display=1920x1080 # Specify resolution
scrcpy --new-display=1920x1080/420 # Specify resolution and DPI
scrcpy --new-display # Use main display size and density
scrcpy --new-display=/240 # Use main display size and set DPI to 240
On some devices, a launcher is available in the virtual display.
Troubleshooting Virtual Display in SCRCPY
When no launcher is available, the virtual display is empty. When this happens, you must start an Android app for example:
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
By default, virtual display system decorations are enabled. However, some devices might display a broken UI. This is one of the major bugs at the moment. But you can try using the following to disable it. Note that if no app is started, no content will be rendered, so no video frame will be produced at all.
--no-vd-system-decorations
How to Fix Screen Turn-off Ignored When Using Virtual Display in SCRCPY
When using the --new-display option, you might find that turning off your phone's physical screen (via --turn-screen-off or Alt+O) doesn’t work. Instead, the virtual display also stops working. Here are steps you can take to mitigate this issue:
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc --turn-screen-off
If the problem persists, try these variations:
- Exclude --new-display to test if the issue is tied to the virtual display.
-
Use Alt+O after launching SCRCPY to manually turn off the screen.
Check Device-Specific Behavior
- Certain devices, like Xiaomi models running MIUI, might enforce restrictions that conflict with virtual display operations. Verify if this behaviour is consistent on different devices.
Experiment with System Decorations
- Disabling system decorations using --no-vd-system-decorations may help in specific scenarios.
Permanent Fixes Coming in SCRCPY 3.0.1
The SCRCPY development team has resolved this issue in the dev branch, and the fix will be included in version 3.0.1. To access the fix immediately, compile SCRCPY from the Dev-Branch. Otherwise, just wait for SCRCPY 3.0.1 to come out with a fix.