Saturday, October 13, 2007

Basic Display

====Fix My Display====
I see a lot of posts in the Linux forums about users who have just installed Linux and upon the first boot they get a blank screen and no GUI. The problem is often a misconfigured /etc/X11/xorg.conf file or a misconfigured default runlevel. Check your default runlevel first. There are three other areas that could be causing your display troubles. They are the '''Device''' section, the '''Monitor''' section and the '''Screen''' section. Following these steps will get you a basic GUI that you can work with.


[[#Runlevel|Runlevel]]

[[#Display|Display]]

[[#Monitor|Monitor]]

[[#Screen|Screen]]

=====Runlevel=====
If you boot your Fedora system and it doesn't go into GUI mode, it could be that you need to edit the '''default runlevel'''. If the '''default runlevel''' is incorrect you will be left at a command prompt with no error messages. This is runlevel 3. To boot to the GUI mode the system needs to boot to runlevel 5. To correct this malady login as root at the command prompt and type '''vi /etc/inittab'''. There will be a section that looks like this:
id:3:initdefault:
Change the line so that it looks like this
id:5:initdefault:
Save the file, exit the editor and reboot. Your Fedora system will boot to the GUI this time.

=====Display=====
Boot the computer and log in as root. At the command prompt type
vi /etc/X11/xorg.conf
Once the '''vi''' editor opens you will need to press the '''INS''' key to get into edit mode. Look for the section that is similar to this:
Section "Device"
Identifier "Videocard0"
Driver "intel"
EndSection

Change the driver to 'vesa'. Save the file with the following keystrokes: '''ESC : wq! ENTER'''. Back at the command prompt type
startx
and press enter. After a short delay while the system is working you should be presented with the graphical display that is at least ''close'' to what you expected. From there you can work to fine tune things like the proper video driver and screen resolution.

=====Monitor=====
To get the correct refresh rates for ''your'' monitor you need to edit the '''monitor''' section. Often times the screen refresh rates are incorrect and my cause an off center display or some other malady. Before you change the refresh rates make sure you know what the proper rates are for your particular monitor. These can be found on the back of the monitor, in the manual that came with the monitor or most certainly from [http://www.google.com Google]. Look for the section that is similar to this:

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30-107
VertRefresh 48-120
EndSection

Changing the HorizSync and VertRefresh numbers to ones that accurately reflect your monitor will have a drastic effect on the quality of the display. Save the file and exit the editor. That will bring you back to the command prompt. Again, as we did in the '''Device''' section, type
startx
and press enter. Again after a short delay you should see a much improved GUI display.


=====Screen=====
To further improve upon the quality of the display and to get the correct or desired screen resolution you need to edit the '''screen''' section in the /etc/X11/xorg.conf file: Before you change anything here you need to know the limitations of your monitor. What is the maximum resolution that it will display? Trying to set a resolution higher than the monitor is capable of providing can and probably will cause undesired results. The maximum resolution for your monitor can be found on the back of the monitor, in the manual that came with the monitor or by searching [http://www.google.com Google]. Once you know what your monitor is capable of then you can go ahead and try to configure the display for the resolution that you prefer. Most of today's monitors are capable of a resolution of at least 1280x1024. I'll use this resolution in this example. In the xorg.conf file look for the section that is similar to this:

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
EndSection

The part we're interested in is the Modes line(s). In the above sample the computer is configured to show a display of 1024x768 only. This will usually work well, but we want to use 1280x1024 because that is what our monitor will do and it's what we prefer. Change the Modes line so that it looks like this:
Modes "1280x1024" "1024x768"
Save the file and exit the editor. This leaves you back at the command prompt. As we did above, type
startx
and press enter. Again after a short delay you should see a much improved GUI at the desired screen resolution.

This is just a basic writeup on editing the xorg.conf file to resolve some of the issues that I see mentioned on a daily basis in the Linux forums.

No comments: