BulletProofX

Revision 11 as of 2006-12-29 06:15:57

Clear message

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.

Summary

The goal of the bullet proof X specification is to ensure that there is always a way to load the X server, by falling back, automatically or manually, on a working video mode if the default one failed.

Rationale

A lot of people are capable of configuring their systems (or getting help to do so) via a graphical interface but don't have a clue when it comes to the command line interface.

Use cases

Scope

Design

How things works, before this spec

At Grub level

"Start Ubuntu in safe graphics mode" option of the LiveCD, make xforcevesa added to the kernel boot parameters, which is fine for manually choosing safe mode, but not for automatically detecting bad X configuration. The debconf script of xserver-xorg, when executed, sees that "xforcevesa" flag is in use and sets vesa as the default driver.

On installing the system

At each configuration of the server

When Gnome starts

[http://www.icims.csl.uiuc.edu/~lheal/doc/gdm/x155.html Some GDM doc] GDM try to call X. If it fails, FailsafeXServer of gdm.conf is called. Obviously, this FailsaveXServer should be used to set some sure VESA mode! If even that failed, then XKeepsCrashing (by default etc/gdm/XKeepsCrashing) is called. XKeepsCrashing script will try to use the XKeepsCrashingConfigurators (first of /usr/bin/X11/XF86Setup /usr/bin/X11/Xconfigurator that will works).

When Kubuntu starts

Each time X is started

Some applets to change video mode?

When logging off from a user in GNOME

Normally, the X server is reinitialised, but if AlwaysRestartServer=true then gdm will just kill the existing server and start over. See UnresolvedIssues down, to why we may want to set it true.

When logging off from a user in Kubuntu

High-Level Design

VESA mode 800x600x256 is hereafter called safeMode1. 'Safe Mode' is written on safeMode1 screen.

safeMode1 is triggered in any of the following circumstances:

  • gdm detects that the X server is failing to start (XKeepsCrashing)
  • grub have been booted with option safe mode boot (rather than normal boot)

Low-Level Design

Design discussion

The configuration fall back process should be:

  • safeMode1, which is sane given the current state of hardware out there, and Windows XP and above also use 800x600 in their safe mode.
    • run dpkg-recnofigure by passing an environment variable
    • xserver-xorg.config should check for an environment variable which behaves the same as xforcevesa
  • If that fails, provide an error on the console.
    • We discussed falling back to vga (safeMode2) instead of just provide an error to the console, but that would introduce another mode switch and delay before the error is shown, and vesa is very well established nowadays.

UI should offer the following options:

  • attempt automatic reconfiguration of video settings
    • can we do this first, and only prompt the user to accept/reject if the auto-config is different from their existing configuration? If yes, they should be prompted to restart in test mode, if no, continue in safe mode.
  • dpkg-reconfigure
  • if that produces a different configuration, allow the sure to test by logging them out and allowing the display manager to restart X
  • give up and use this mode: 'Use these video settings for your normal use'?
  • display diagnostics of what failed - for giving to technical support/showing their local 'computer expert.'

I suggest to do like Windows, that is when xserver is reconfigure or configured for the first time, ask the user if he/she should continue to use that video mode, or fallback on safeMode1. (The "Can you read this?" question on Windows) --Paul Dufresne

Implementation

[This section should show how the implementation is different than the design section]

Code

Data preservation and migration

Unresolved issues

Until [https://launchpad.net/distros/ubuntu/+source/xorg/+bug/59618 bug #59618] patch is not released, then grub 'Safe mode' won't work.

From Forum topic [http://ubuntuforums.org/showthread.php?t=318142] ...sometimes logging out results in a black screen and a system freeze. None of the exit shortcut keys work, and I can't restart X.

I found a very reliable fix to this issue was changing the following line (line 96) in the /etc/gdm/gdm.conf file to this:

This forces GDM to restart X completely before returning to the login screen...

I propose to make this into the default configuration in Feisty Fawn.

In my opinion, a bug should be opened if not already done with previous mentioned problem [http://ubuntuforums.org/showthread.php?t=318142], and then removed as being outside the scope of this specification. --Paul Dufresne

Future work:

  • Fall back for thin clients
  • Kubuntu

BoF agenda and discussion


CategorySpec