Originally Published: Wednesday, 2 May 2001 Author: Anurag
Published to: learn_articles_firststep/General Page: 1/1 - [Std View]

Troubleshooting the X Install

Do you Fear the Blank Screen of X? If so, Check out Today's Troubleshooting Article on the X Install.

What is X?

Early versions of Unix were text based with only a few computer geeks as users. The year 1986 saw the first commercial release of Unix, and today after 15 years, the Unix/Linux is still working to achieve its goal of having a windows-based interface (preferably known as graphical user interface, or a GUI) system, running on every possible hardware in the market. 'X' the name given to the collection of programs that form the graphical user interface for Unix (and Linux) performs the function of inter-linking hardware and user input. A good place to learn more about X and the history of the project is the XFree86.org site, one of the leading sites in the free 'X' project. The site has been providing support, news, documentation and downloads since the first release. The site lacks a lot in terms of design, perhaps ironic for an interface site, but with the massive amount of information the site contains, who needs an artistic site to browse?

Setting up X has been a daunting task in the past. First the Intel's i810 chip set created a few problems and then compatibility with the umpteen video cards that flood the market proved to be a major hassle in setting up X. Today, thanks to efforts taken by the Linux Community including major players such as RedHat, SuSE, the process is a bit simplified. In this article I shall attempt to guide you through an X setup on your system. We'll first look at the basics of a simple install, and then try to cover as many potential problems as possible. We've tried to find a solution for every "blank screen" problem we can find.

The Simple Way: "Good Evening! It's a pleasant Saturday evening and I am trying my hand at installing Linux with X."

Each and every distribution of Linux that exists on planet earth now offers a GUI based setup. The steps mentioned here will not be exactly the same for your distribution, but the process is similar enough that this guide should still be able to help you install X.

During every Linux installation you will eventually come to an option called something like "Use Graphical logging in." Once the selection has been made, the install program will try to auto-detect your graphics card. If the setup program has a problem here try to locate the option for "Customize Graphical Login." This is necessary because your graphic card will support not every color mode and resolution. Then click on preview/test this configuration option. If everything seems to be fine, you will get a confirmation box with a self-timer. Clicking on "Yes" will commit these settings as your default options.

If your screen goes blank press "Ctrl-Alt-Backspace" and the X server shall be killed. Select some other low resolution and/or color mode. Setting up X at times is a trial and error process and there are no hard and fast rules defined for it.

Getting a bit tougher

Once the installation is complete and you reboot your system (the rebooting procedure is done automatically by your distribution, don't forget to remove the Linux CD before rebooting) you can await a graphical login interface.

Again at this stage it is also possible that your monitor will go blank This time press "Ctrl-Alt-F1" and a shell based login prompt pops up. Give your root login and password, and type reboot at the prompt. After rebooting, type "linux init 2" at the LILO prompt.

LiLo (Linux Loader): If a system has more than one OS (Operating System) the LiLo gives the user a choice between booting into each system. It gives us the luxury of having two or more OS'es and forms an integral part of the system.

This command shall force LiLo to login using shell mode, similar to booting Microsoft Windows in "safe mode". At this stage you can try the setup utility that comes with the distribution itself. Like "setup" for RedHat or "YaST" for SuSE. Try tweaking around with these utilities by changing the resolution, color mode or horizontal/vertical frequency of your monitor. This could solve the blank screen problem.

Bah! Nothing seems to work: "It's 4.00 am in the morning and this Linux thing refuses to work....".


There's another way to tame the penguin. This way does require you to collect some data about your system before beginning. First make sure that you know the chip set of the graphic card that you are using, the monitor make, along with the monitor specs such as Horizontal and Vertical frequency. Record your monitor's maximum possible color depth. Knowing the chip set is useful because it determines what kind of server to use whilst configuring X. You might want to think about keeping your monitor's manual near you during installation.

Since RPM (RedHat Package Managers) is the most widely used installation method, we also recommend you use RPM when installing X. Install all the XFree86 RPM's from the installation CD. In this way the dependancy problems are solved plus some other useful utilities also get installed such as the "xconfigurator". Type:

rpm -ivh --force XFree* "

This command will install the requisite number of RPM's for setting up X.

Now type XF86Setup at the prompt and a graphical interface for setting up X windows will pop up. Select "No" if it asks you to use your previous settings.

In the Card Option select the appropriate card. Use the Detailed Setup option only if your card is not listed in the database.

In the color selection option use "Super VGA-1024*768@87 Hz interlaced 800*600@56 Hz".

Use ModeSelecion for selecting a resolution (640*480 recommended), Color Selection (8 bit grey).

Press "Apply".

An attempt to start X is then made. If the problem of a blank screen still persists, press "Ctrl-Alt-Backspace" and then "Ctrl-C". This time try reducing your screen resolution to 640*480. Choosing a low resolution won't make you happy with your screen contents, but it may enable you to boot X. Once it gets going and we have some basic parameters in our hand, we can build from that base and tweak around with some other options. In this case it is possible you will encounter the screen appearing too big or the mouse appearing only at one corner of the screen. This only indicates that one has not selected a proper server. Try your hand at some of the methods mentioned below.

After staring at a pleasant gray colored dialog box over a decent blue background, the 'xvidtune' color scheme with black text on a white background may shock you. 'xvidtune' offers more functionality than just scaring the user by it's appearance however. It is a client interface to the XFree86 X server video mode extension. It is used to adjust the display settings for a particular existing mode. What it does is it just change the display size by making it smaller, wider or even moving the screen in the left/right dimension in relation to your monitor. So, don't like the pesky buttons that appear on your monitor, here's another way to adjust things.

The Final Hope: "It's 6.00 am, I haven't slept the entire night and this thing still refuses to work!"

Before hitting the sack, try this final option. Once again, reboot your computer and type "linux init 2" at the LiLo prompt. After you login in as root, type "xf86config" at the prompt and then make the selections shown below. "xf86config" is used to setup the mouse and keyboard as well as the X server. Listed below are the details for mouse, keyboard and X Windows setup.

Read the first page that tells you some of the details of what xf86config actually does. Press Enter to continue or Ctrl-C if you wish to abort.

Starting from here, only the options that should be entered are given. These are the best options that will suit almost any PC in existence. However there are no hard and fast rules and you should feel free to experiment if you still have problems. A brief explanation of what the option means is given in brackets. Enter only the string/number before the "(" bracket.

Protocol number: 1 (MS Compatible 2 button protocol for mouse)

Enable Chord Middle: n (No)

Emulate 3 buttons: n (No)

Path Name for mouse Mouse Device: Just press enter (Uses default mouse device)

Do you want to use XKBY? Press Enter (Uses default keyboard map)

Pre-configured keymaps: 1 (Standard 101-key US Coding)

Setting up the monitor specifications: Choice for Horizontal Sync Range: 1

Choice for Vertical Sync Range: 1

For the Identifier, Vendor and Model enter the whatever values you feel comfortable with. Since these values are entered only in the "xf86config" file they are mostly used only for the users reference.

Do you want to search the card database: y (Yes) Enter number that corresponds to the card that you own.

Choosing the Server: 1 (Selects the basic XF86 Mono Server)

symbolic link: y (Yes)

Select RAM: Select the option that best matches the amount of RAM your video card has.

In the next section, once again just use names you are comfortable with since they are used for the user reference only.

ClockChip Setting: Press Enter

x-probe: n (No)

Write to /etc/x11/XF86Config? y (Yes)

At this point all the changes you have made are written in the above specified file. Type "startx" at the prompt and the X Windows interface should now appear.

Keeping your Fingers Crossed: "Phew! It's 8.00 am in the morning and something tells me that my X is going to start functioning."

Agreed, that should do it. However, if you have tried your best in making X work and still it doesn't work the way it should our advice at this point is, to take a few hours nap and try your hands at it again in the morning. You might also try typing "man X" at the command line to get the "X" manual.