Add Fake Display when No Monitor is Plugged In

Solution 1:

Found a way to do it without requiring a dummy plug: Ubuntu Headless VNC VESA 800x600 Resolution Fix ~ Andy Hawkins @ June 12, 2011

Basically install a dummy driver:

sudo apt-get install xserver-xorg-video-dummy

Then write it in the /usr/share/X11/xorg.conf.d/xorg.conf (or possibly /etc/X11/xorg.conf) file (create one, if it does not exist):

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection

Then restart the computer.

Solution 2:

Specify the resolution on a Ubuntu 14.04 desktop without a monitor connected:

From the xrandr man page:

--fb widthxheight
   Reconfigures the screen to the specified size. All configured 
   monitors must fit within this size. When this option is not 
   provided, xrandr computes the smallest screen size that will 
   hold the set of configured outputs; this option provides a 
   way to override that behaviour.

Therefore use the command after connecting:

xrandr --fb 1280x1024

Solution 3:

Hardware Solution

This is a hardware solution/workaround which may work for some graphics hardware/driver. Also could be better, if you need to plug physical monitor frequently, so you don't have to restart X Server like with dummy/vesa/fb driver (static configuration).

  • Either you buy a Dummy VGA (or DVI analog) plug or some calling it Dummy Dongle.

  • Or just build it, use 3 resistors of around 75 Ohm (a standard) at the VGA output: 1→6, 2→7, 3→8.

    +/- 10 Ohm may work without any problem. Some cards work with just one resistor. (Like my Intel, 2→7 or 3→8, will detected as a monitor). By the way, this is standard impedance which implemented in the VGA monitors.

Reference: How to create dummy plugs for your graphics cards.

Users who are curious to read more about monitor & its resolution detection, I would recommend reading about VESA DDC & EDID too.

Solution 4:

Consider Xvfb which is probably least likely to mess up the display when you actually plug in a real monitor

The following commands will start lightdm on a fake display with ID 1 and resolution 1024x76

export DISPLAY=:1
Xvfb :1 -screen 0 1024x768x16 &
sleep 1

#exec gnome-session & # use gnome-session instead of lightdm
exec lightdm-session &