Department of Mathematics, Statistics
and Computer Science
Wim Ruitenburg's MSCS 206 linux learning 971101
- We put warrior on line, split the screen output signal to go to both
the monitor and the big screen projector, log in, and run X by typing
startx
A low resolution version of X appears on the screen, we guess about 640 by 480.
This resolution was installed last time. Now we want to install the best
possible resolution that our monitor offers.
- As sources of information we have the file XFree86-HOWTO.gz in
directory
/usr/doc/faq/howto
the file Modeline.gz in directory
/usr/doc/faq/howto/mini
and the manual from the manufacturer that comes with our monitor. Electronic
files that are gzipped (with names ending in .gz) can be read with the less
command by, for example, typing
less XFree86-HOWTO.gz
- The common command for installing X is XF86Setup. Run XF86Setup.
Select the generic XF86Config setting (answer no to the first question).
First hit <enter> until we are in the mouse select window. Use the tab
and <enter> keys to select our PS/2 mouse in 3-button mode, and
apply. Warning: During this phase we are not allowed to move the mouse
or press its buttons! The mouse works. It has only two buttons, left and right.
The middle button is simulated by pressing left and right at the same time.
Second, we select our video card. This information can be found beforehand by
typing SuperProbe. If you forgot, abort and do SuperProbe now. On our PC
it gives us
First video: Super-VGA
Chipset: Matrox Millennium (PCI Probed)
RAMDAC: TI ViewPoint3026 24-bit TrueColor DAC w/cursor,pixel-mux,clock
(with 6-bit wide lookup tables (or in 6-bit mode))
So (rerun XF86Setup, and) as `card' select Matrox Millennium from the
card menu. Third, we must select a monitor option. For now select the top
version from the monitor menu. It doesn't give us the highest resolution, but
it will work. Save the settings. Run startx. We have a working version.
(As an aside, it looks very nice on the big screen projector.)
- The installation just performed creates the file /etc/XF86Config. Each
time when we run startx, the program looks at this file for its
configuration information. We want to run X on our monitor in the best
resolution possible. SuperProbe tells us that we have an SVGA monitor, and the
manufacturer's manual (Panasonic E15) has a timing chart that lists its maximum
resolution as 1024x768. There are two ways to get /etc/XF86Config upgraded to
this better resolution. First, XF86Setup has the option to let you experiment
with monitor settings manually, until a nice screen appears. In our case we
didn't get very far with that. The second option, our current choice, uses the
manufacturer's manual and the file Modeline.gz mentioned above to edit the
/etc/XF86Config file `by hand.' We use a standard text editor (in this case vi)
to look at /etc/XF86Config, and then modify it below. The first and crucial
step will be adding a new `Modeline' immediately in front of the existing ones.
An example `Modeline' looks like this:
Modeline "640x480" 31.50 640 656 720 840 480 481 484 500 -hsync -vsync
What do these elements mean? The manufacturer's manual (Panasonic's PanaSync
E15) contains the following table related to the high resolution setting:
VESA 1,024x768 75 Hz
DOT CLOCK
|
78.7500 MHz
|
|
fH
|
60.024kHz
|
|
Hor A-Total period
|
16.660 us
|
1,312
|
Hor B-Blanking time
|
3.657 us
|
288
|
Hor C-Sync width
|
1.219 us
|
96
|
Hor D-Back porch
|
2.235 us
|
176
|
Hor E-Active time
|
13.003 us
|
1,024
|
Hor F-Front porch
|
0.203 us
|
16
|
fV
|
75.000Hz
|
|
Ver A-Total period
|
13.328 us
|
800
|
Ver B-Blanking time
|
0.533 us
|
32
|
Ver C-Sync width
|
0.050 us
|
3
|
Ver D-Back porch
|
0.466 us
|
28
|
Ver E-Active time
|
12.795 us
|
768
|
Ver F-Front porch
|
0.017 us
|
1
|
Sync polarity (H/V)
|
Positive/Positive
|
|
These numbers play a crucial rule in editing /etc/XF86Config. From them we
must somehow create a new `Modeline' that looks like
Modeline "1024x768" A B C D E F G H I J K
where A through K still have to be determined. Through comparisons with other
settings in the manufacturer's manual, it is clear that the last two parameters
reflect the sync polarities at the bottom of the table above, in our case
positive/positive, so they must read
Modeline "1024x768" A B C D E F G H I +hsync +vsync
By checking out Modeline.gz, and by looking at the example Modeline above, we
see that A is the dot clock in MHz, and B and F are the horizontal and vertical
resolutions. So we have
Modeline "1024x768" 78.75 1024 C D E 768 G H I +hsync +vsync
By reading Modeline.gz we see that E = (dot clock) /
(horizontal scan frequency) = (78750000/60024) = 1312. Note that this is
exactly the number (Hor A-Total period). It is a good bet to guess I = (Ver
A-Total period) = 800. (Modeline.gz says that I = (dot clock) / ((vertical
refresh rate) * E) = 78750000/(75*1312)) = 800 which confirms our guess.) So
we have
Modeline "1024x768" 78.75 1024 C D 1312 768 G H 800 +hsync +vsync
According to Modeline.gz the parameters C and D are chosen such that 1024 <
C < D < 1312; they set the apparent width of the image on the screen by
moving the left and right edge. Similarly, the parameters G and H are chosen
such that 768 < G < H < 800; they set the apparent height of the image
on the screen. One could experiment with these values to get a nice image.
Instead we discover, by looking at some examples, that good values are obtained
by adding the front porch and subtracting the back porch in the manufacturer's
table from the bounding values.So set C = 1024 + 16 = 1040; set D = 1312 - 176
= 1136; set G = 768 + 1 = 769; and set H = 800 - 28 = 772.
So the final modeline looks like
Modeline "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
Create a backup copy of /etc/XF86Config, and edit the original file by adding
this new Modeline right in front of the existing ones. We are almost done.
- So far, with the new Modeline, we tell X what the screen can do in
1024x768 mode. We must now add that we want X to select this option when
running startx. Again we must edit /etc/XF86Config. Since we have an
SVGA monitor, we go down the file to where it says
section "Screen"
Driver "SVGA"
Replace the first line
Modes "800x600" "640x480" "640x400" "512x384" "480x300" "400x300" "320x240"
"320x200"
by
Modes "1024x768" "800x600" "640x480" "640x400" "512x384" "480x300" "400x300"
"320x240" "320x200"
Save the changes. Type startx. It works. We also note that it doesn't
look very nice on the big projector screen. The projector screen apparently
prefers the VESA settings in 640x480 mode (see above) that we originally used.
Last updated: November 1998
Comments & suggestions:
wimr@mscs.mu.edu