this is useful if using something like, for example Deskreen to mirror a secondary display on another device when no other physical secondary display exists. original source
sudo apt install evdi-dkms
sudo modprobe evdi initial_device_count=4
xrandr
you'll see some virtual DVI ports available. Choose one to be your enabled port. For this example we'll choose DVI-I-2-1
with format DVI-I-x-y e.g. x=2 y=1xrandr --addmode DVI-I-2-1 "1920x1080"
cvt 2048 1536
will return Modeline "2048x1536_60.00" 267.25 2048 2208 2424 2800 1536 1539 1543 1592 -hsync +vsync
xrandr --newmode 2048x1536_60.00" 267.25 2048 2208 2424 2800 1536 1539 1543 1592 -hsync +vsync
sudo sh -c "echo on > /sys/kernel/debug/dri/2/DVI-I-1/force"
note x=2 y=1 in this example