This is an old revision of the document!
Create a virtual display in Linux
this is useful if using something like, for example Deskreen to mirror a secondary display on another device such an iPad when no other physical secondary display exists. original source
- Extensible Virtual Display Interface (EVDI) module:
sudo apt install evdi-dkms - load module:
sudo modprobe evdi initial_device_count=4 - now if you do
xrandryou'll see some virtual DVI ports available. Choose one to be your enabled port. For this example we'll chooseDVI-I-2-1with format DVI-I-x-y e.g. x=2 y=1 - add resolutions as you need:
- existing resolution:
xrandr --addmode DVI-I-2-1 "1920x1080" - create a resolution. Example: 2048×1536:
cvt 2048 1536will returnModeline "2048x1536_60.00" 267.25 2048 2208 2424 2800 1536 1539 1543 1592 -hsync +vsync- then do:
xrandr --newmode 2048x1536_60.00" 267.25 2048 2208 2424 2800 1536 1539 1543 1592 -hsync +vsync
- force virtual port as connected:
sudo sh -c "echo on > /sys/kernel/debug/dri/2/DVI-I-1/force"note x=2 y=1 in this example - From here use the standard display tools (GUI or otherwise) to set the monitor position etc.
- on trixie (Debian 13.3) standard display tools didn't work. Instead:
xrandr --output DVI-I-2-2 --mode 1920x1080 --pos 1920x0(or similar)
Sunshine
Sunshine can run on the host machine to show the virtual display on another machine
- install with flatpak
- there appears to be no way to accept the pairing request from the KDE notification. Instead, before attempting to pair in Moonlight:
- go to Sunshine UI at
localhost:47990/and log in - in the menu choose
PIN
- you may need to choose the virtual display in the configuration
- find the display ID in the terminal output. It will look something like:
[2026-06-09 09:30:24.680]: Info: Detected display: DVI-I-3-2 (id: 4)DVI-I-3-2 connected: true - in
Configuration→Audio/Videoenter the ID inDisplay IDbox
Moonlight
- run Moonlight on the machine which will be the secondard monitor
- under Moonlight settings shut off on-screen controls and set a custom resolution.