Upgrading from 4.4 to 4.5 breaks X11


Upgrading OpenBSD on a machine is usually a pain less process, but, sometimes, X11 finds itself badly broken.

For instance, here is the message I had when upgrading recently a desktop machine from 4.4 to 4.5:

(EE) Module ABI major version (2) doesn't match the server's version (4)
(EE) Failed to load module "vga" (module requirement mismatch, 0)
(EE) No drivers available.
Fatal server error:
no screens found

And, after this cryptic message, X11 failed miserably and stopped without even displaying the traditional grey background. Not good... :-(

Searching Google did not yield any significant results, which was disappointing, except for some FreeBSD mailing list in which users advised each other to recompile the different modules.

Any good UNIX system administrator is lazy. Lazy means "no recompiling, unless absolutely necessary", so recompiling was out. :-)

The OpenBSD FAQ to the rescue!

Fortunately, the FAQ held the answer (Click here for the relevant section), and here is how I did it:

1. Make a backup copy

Hey, you never know!

As root:

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BROKEN

2. Launch auto-configuration

To do this (still as root):

# X -configure

Here, your X server should display the grey steepled background, with a large X for a mouse cursor.

Press Ctrl+Alt+Backspace to kill the server, and you should have the following message:

Your xorg.conf file is /root/

To test the server, run 'X -config /root/'

Test the server, with the above command, to make sure it is OK. If necessary, check the log in /var/log/Xorg.0.log.

4. Move the configuration in the correct directory

Of course, this should be done only when you are satisfied your configuration is correct:

# cp /root/ /etc/X11/xorg.conf

Once you have done that, your X11 server should be ready to go...

5. Launch X with the command startx

If everything works OK, you should be done!

See Also: