Booting Ubuntu without Monitor plugged in / switched off

There is a major issue with Ubuntu partly due to BulletproofX and the X window system, which requires the presence of a monitor for X window to start. If the monitor is switched off, or is not connected, then Ubuntu / X would not be able to detect it and thus would go into “low graphics mode”. So, basically your GDM would not start.


There are two scenarios in which the monitor is not connected / switched off

  1. You wish to save energy and thus switch off the monitor, and then remotely reboot the machine
  2. You have Ubuntu running as a Server and thus no dedicated monitor is connected to it and you remotely reboot the machine. Specially, if you have automatic login enabled along with Remote Desktop (vino/vnc) enabled, and rely on Network Manager to start your session (through Wifi perhaps). In this case, Ubuntu would go into low graphics mode, and your network manager would not be able to assign you an IP, and you have lost complete remote access to the machine. Isn’t it pathetic?


I am still not aware on how to take care of the first part, that is, monitor switched off intentionally by you.


However, if you are running Ubuntu as a server and have/need a GUI, then the solution is here. Thanks to nikgare / http://ubuntuforums.org/showpost.php?p=7681232&postcount=8 for the pointer.

  1. Modify /etc/X11/xorg.conf and remove all content and add the following

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

    Section "Monitor"
    Identifier "Generic Monitor"
    HorizSync 58-62
    VertRefresh 75-117
    EndSection

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

  2. You also may want to disable Bulletproof-X by modify /etc/gdm/gdm.conf and commenting out the line

    #FailsafeXServer=/etc/gdm/failsafeXServer


Now reboot, and X would start without monitor plugged in.