Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

See also:


This specification describes a new failsafe mode that will be used if X fails to start up. It will be in a reduced (VESA 800x600/256 or VGA 640x480/16) graphics environment running a single application (displayconfig-gtk) for configuring the graphics devices.

The goal of this specification is to eliminate the need for users to need to run apt-get reconfigure on the commandline. That approach is confusing and too technical for many users, so moving away from that will solve a key pain point for users.

Release Note

This is a failsafe mode for X that will launch if the /etc/X11/xorg.conf file does not result in a working graphical environment due to Xorg failing to start. It can also be invoked manually by specifying 'xforcevesa' via grub's kernel cmdline option, by setting the XORG_FAILSAFE_MODE environment variable to a non-empty string, or by selecting the Failsafe option from the Greeter.


Xorg sometimes fails to launch for some users, typically due to failure to detect hardware properly during installation or when the user has changed monitors or graphics cards.

Currently Ubuntu support has the user re-run dpkg-reconfigure, but this is confusing and too technical for many users, who complain about this. So the sooner we can move away from requiring that, the better.

Use Cases



GDM Failsafe Server

The failsafe mode will be initiated by gdm if it fails to start X, or if an environment variable or command-line option is passed in. This should also permit forcing vesa mode via the boot parameters.

Failsafe mode runs with administrative permissions since it will likely need to alter the user's xorg.conf. Because of this, the user will need to authenticate. However, care must be taken to ensure the user notices that this is an abnormal situation; the authentication request must not be confused with the standard login screen.

In this mode, the current xorg.conf will be ignored; instead a VESA 800x600/256 configuration will be used. In some (rare) cases, hardware may not support VESA, in which case a VGA 640x480/16 mode will be the fallback, or framebuffer if that won't work either. These cases will be tracked by means of a blacklist file.

When launched into failsafe mode, a single application will be presented to the user: gtk-displayconfig. A window manager will be needed since gtk-displayconfig has some popup dialogs, but even a simple window manager should suffice. This application will provide several functionalities:

KDM Failsafe Server

KDM currently does not support a failsafe server as GDM does, so support for this capability on KDM-based distros will be deferred until this has been implemented. Assuming a design similar to GDM is adopted, the above design can be used here as well.

Live CD

The above failsafe mode won't be used on the Live CD for Gutsy. If there is an Xorg startup failure when running the live-cd, then it should directly go to vesa mode without requiring any configuration step.


  1. Create shell script for gdm to run if the X server crashes
    • /etc/gdm/failsafeXServer
  2. In /etc/gdm/gdm.conf indicate this failsafe server
    • FailsafeXServer=/etc/gdm/failsafeXServer

      AlwaysRestartServer=true # Maybe, only if GDM isn't forcing a complete X restart

  3. Also provide access to the failsafe session via the greeter
  4. Configure gdm to also invoke the FailsafeXServer script in any of the following cases:
    • If the previous X session crashed (i.e., gdm never got the signal back from the X server that it started up).
    • Environment variable XORG_FAILSAFE_MODE is defined
    • /proc/cmdline contains option xforcevesa
    • If the user selects the Failsafe option from the chooser
  5. When failsafe mode is activated, check the blacklist for systems we know do not support VESA 800x600/256
    • Use EDID + PCI IDs as key to lookup (Can get PCI IDs from discover)
    • If the display does not give EDID info, then use VGA 640x480/16 mode
    • If a matching entry is found, then use VGA 640x480/16 mode
  6. Start up the failsafe X session using their regular user account
  7. Launch displayconfig-gtk (gnome) or displayconfig (kde) application, under gksu
    • Initiate it using an option to let it know we're using it in failsafe mode
    • Make sure to pass along environment variables for hardware preferences
    • Provide welcome screen text explaining why the user is in this mode and what they have to do to solve the issue encountered.
    • Provide a button that allows user to skip configuration and just launch Xorg with the VESA (or VGA) mode.
    • Provide checkbox "Never prompt for reconfiguring"
  8. If user chooses to skip configuration, launch X using the temporary failsafe xorg.conf, one time
  9. If the user selects the "Never prompt for reconfiguring" option, then set the following in /etc/gdm/gdm.conf:
    • FailsafeXServer=

Test/Demo Plan

Acceptance Testing

  1. Install Failsafe X package for testing
  2. Reboot and use each available mechanism to force failsafe mode
    • Set environment variable
    • Option specified in /proc/cmdline
    • Failsafe mode selected from chooser
    • Deliberately misconfigured X (mismatched kernel/X drivers, bad resolutions, wrong refresh rates, invalid options, etc.)
  3. Check that the /etc/X11/xorg.conf file is not being used
  4. Verify screen comes up as 800x600/256
  5. Verify mouse and keyboard work properly and that keyboard layout matches that listed in /etc/X11/xorg.conf
  6. Verify displayconfig-gtk is running
  7. Check that help text and interface is internationalized appropriately
  8. Check if displayconfig-gtk identifies the hardware correctly and selects the correct driver
    • - Especially check restricted drivers, including fglrx and nvidia - Also test when specifying hardware selection preferences using environment variables
  9. Verify the GUI provides the correct listing of resolutions and refresh rates for the selected configuration
  10. Verify that the system can drop to lower resolutions such as 640x480.
  11. Verify that the system can go to the maximum resolution supported by the hardware
  12. Verify that the xorg.conf is written with the options selected through the GUI
  13. When writing out the xorg.conf, it must preserve any data that existed beforehand. Ideally, it must preserve formatting of this data as well, so diffs will show only meaningful lines changed.

Fault Handling Testing

Also test the following situations to make sure they're handled appropriately:

Usability Testing

Deferred Capabilities



BulletProofX (last edited 2008-08-06 16:35:43 by localhost)