From: Upholder@uiuc.edu (THE Upholder of Truth)
Subject: X11 Config hints (was: Wanted:clocks.exe for X11-SVGA-config.???)
Reply-To: Upholder@uiuc.edu (THE Upholder of Truth)
Organization: The University of Illinois at Urbana-Champaign (UIUC)
Date: Wed, 12 Aug 1992 15:57:17 GMT

arnd@informatik.rwth-aachen.de (Arnd Gehrmann (Tel:21205,Raum:4203)) writes:

>Where can be found the DOS-program clocks.exe
>used for detecting the SVGA-clock-rates?
>I need it for configuring an SVGA-card for X11 /X386.
>Has someone experience in configuring
>X11 under Linux for an SVGA:EIZO VA-41
>and Monitor:EIZO 9070 with 1024x786-resolution?

actually, I have found that clocks.exe lies about the clocks.
(or more accurately, it doesn't find them all).

Oren wrote a guide to setting up X11 for me and has granted permission
for me to repost it (he even said I could take the credit for it.. but
I won't.. =)

It is included below:

======== cut here ========

From oren@chaos.cs.brandeis.edu Thu Aug  6 14:03:18 1992

Howdy,
-=-=-

     Well, here's a hopefully descriptive enuf way for you to get X11 up
and running on your machine.  The most important file in this case is the
file /usr/lib/X11/Xconfig.  This file has fields in it that tell X11 where
to find some of the hardware and screen measurements.  I'll go thru those
that you might need to change from the default Xconfig to get X11 configured
properly.

First variable in Xconfig you should check is the FontPath variable.  This
variable tells X11 where to find the fonts information it needs to be able
to display things.  Since I have the 75dpi font package installed, I use:

FontPath	"/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"

if you don't have the 75dpi font package installed, make sure to use:

FontPath	"/usr/lib/X11/fonts/misc/"

[Note: you need the 75dpi fonts to use olvwm -- Open Look Virtual Window
 Manager -- but I installed it so I can have a more ``complete'' X11 system].

You shouldn't have to touch anything relating to the Keyboard section of the
Xconfig.  I didn't and so I don't know much about it.

Next comes the mouse configuration.  In this section, the most important thing
to do is get the right type of mouse and the device its installed on!  If you
look at the default stuff it should look something like this:

Microsoft       "/dev/ttys0"
#MouseSystems   "/dev/ttys2"
#MMSeries       "/dev/ttys2"
#Logitech       "/dev/ttys2"
#MouseMan       "/dev/ttys2"
#Busmouse       "/dev/ttys2"
  BaudRate      1200
#  SampleRate   150
  Emulate3Buttons

Since I have a serial, 2 button Microsoft mouse I use the Microsoft entry.  I
also used the MCC-interim 96c release and my mouse is on COM1 == device with
major 4, minor 64.  On the MCC installation, this translates to /dev/ttys0:

crw-rw-rw-   1 root     root       4,  64 Aug  5 01:10 /dev/ttys0

The Emulate3Buttons came with the default Xconfig and should probably be left
alone (same goes for the BaudRate).  The Emulate3Buttons variable tells X11
that the mouse is a 2 button mouse and when both buttons are pressed, it should
emulate the third button (as normally X11 uses 3 button mice :).

Finally we come to the most important section -- the one that most people have
trouble with -- the screen stuff.  [this is the vga256 section]

Ok... as you said, you have the clock.exe program that you used to get your
clock values from.  I didn't particularly find it that useful... especially
with X11 v1.1.  See, at the time, I had to use the HiColor (hiclock?) hack
to get things to work properly.  Anyway, v1.1 seems to figure out the clock
values correctly and sends the info out to stderr (I think :).  So, what you
should do is:

startx 2> startx.clks

I don't know what yer current situ is with X -- how far you have it working or
non-working... but as soon as you exit it, take a look at startx.clks.  In my
case it looks like:

waiting for X server to shut down X386 Version 1.2 / X Windows System
 [linux v1.1] (protocol Version 11, revision 0, vendor release 5000)

VGA256: et4000 (mem: 1024k clocks: 25 28 56 70 78 71 57 62 14  0 33 36 40 30
  0 32)

Notice obviously how the chipset is an et4000 with 1 meg on the card and then
the clock values X11 was able to find.  These are the clock values I use on
the "Clocks" line.  So, the beginning of my vga256 section looks like:

vga256
  Virtual       1024 768
  ViewPort      0 0
  Modes         "640x480" "800x600" "920x690" "1024x768i"
  #Modes                "1024x768"
  #Clocks 25 28 57 72 78 68 50 62
  Clocks 25 28 56 70 78 71 57 62 14 0 33 36 40 30 0 32
  #Staticgray
  #Grayscale
  #Staticcolor
  #Pseudocolor
  #Truecolor
  #Directcolor
  Chipset       "et4000"
  #Chipset      "et3000"
  #Chipset      "gvga"
  #Chipset      "pvga1"
  #Displaysize	1024 768
  #Screenno	0
  #Vendor	"legend"
  Videoram	1024

The "Virtual" section translate to how big you want your desktop to be.  For
example, when I use a 640x480 screen, when I reach the borders, since the
desktop of 1024x768 can't be seen on a screen of only 640x480, the window
slides downward and sideways.  So you can only see a 640x480 into the desktop
at any time.  ViewPort should probably be left alone (from the default).  Modes
tells X11 which display modes you have available.  The above 4 all work for me,
so once I'm in X I can use the CTRL+ALT+<NumericPad +> and <NumericPad -> to
go to the next and previous modes, respectively.  As you can see, the next few
variables I left as they came in the default Xconfig, and uncommented the
Chipset variable to tell X11 I'm using an et4000 chipset.  After a few more
variables that I left commented out, Videoram is set to 1024 == 1024K == 1meg
(which is how much memory I have on the card).  That's it for that.  Next comes
the ModeDB (Mode DataBase) section.  In my case I have:

ModeDB
# clock  horzontal timing      vertical timing
 "640x480"   0      640  672  768  800    480  490  492  525
 "640x480"   25     640  672  768  800    480  490  492  525
 
 "800x600"   71     800  832  1096  1128  600  600  613  630
 
# "800x600"   40     800  816  952 1056    600  608  610  633
#             36     800  832  966  966    600  600  609  631
#             39     800  872  968 1104    600  600  606  624
#             36     800  864  896 1008    600  600  606  624
 
 "920x690"   71     920  952 1088 1168    690  688  718  724
 
 "1024x768i" 40    1024 1064 1224 1264    768  777  785  817   Interlace
 
# "1024x768"  28    1024 1092 1220 1344    768  786  791  810
#             62    1024 1096 1272 1328    768  776  778  808
#             62    1024 1072 1176 1272    768  778  779  804
#             62    1024 1072 1200 1240    768  766  782  786
 
 "1152x900"  57    1152 1184 1288 1360    900  898  929  939   Interlace

What these translate to is which clock belongs to which type of screen.  As
you can see, both the 0 and 25 clocks will let me view a 640x480 screen
well.  Also, while both the 71 and 40 clocks let me view 800x600 well, I
decided that the 71 clock showed had a sharper image.  I clock field is
really the one you should play with to get the right nicest looking screen.
I admit I did this with trial and error, but there is a better way to do this.
Remember that the Mode and Clocks lines looks like:

  Modes         "640x480" "800x600" "920x690" "1024x768i"
  Clocks 25 28 56 70 78 71 57 62 14 0 33 36 40 30 0 32

and lets say the 800x600 stuff looks likes:

 "800x600"   71     800  832  1096  1128  600  600  613  630

so what you can do is use:
 Modes		"800x600x1" "800x600x2" "800x600x3" "800x600x4"..."800x600x16"

 [note that I use the elipse cause I'm lazy... cause it won't work in the
  modes line, as far as I know, and you need to enter all of them :-]

Next you enter in the ModeDB part:

 "800x600x1"   25     800  832  1096  1128  600  600  613  630
 "800x600x2"   28     800  832  1096  1128  600  600  613  630
 "800x600x3"   56     800  832  1096  1128  600  600  613  630
 "800x600x4"   70     800  832  1096  1128  600  600  613  630
 [...]
 "800x600x16"   32     800  832  1096  1128  600  600  613  630

I think you get the picture :-)  What this lets you do is go into 800x600 mode
with every clock you have and use CTRL+ALT+<NumericPad +> (and -) to switch
back and forth between clocks to see which one lets you view 800x600 clearly.
Make yourself a little chart so that you know which clock value you are at
at any time.  With the above, I'd enter X11 with a clock of 25 then after the
first CTRL+ALT+<NumericPad +> I'd be put in clock 28, then 56, and so forth.
After you decide which one is the best for you can exit X and delete the others
and do the same for "1024x768", etc.  Also, BEFORE you move on to the next
screen (from 800x600 -> 1024x768) you might wanna try to put the Interlace
keyword with all the entries and try it, like:

 "800x600x1"   25     800  832  1096  1128  600  600  613  630	Interlace
 "800x600x2"   28     800  832  1096  1128  600  600  613  630	Interlace
 "800x600x3"   56     800  832  1096  1128  600  600  613  630	Interlace
 "800x600x4"   70     800  832  1096  1128  600  600  613  630	Interlace
 [...]
 "800x600x16"   32     800  832  1096  1128  600  600  613  630 Interlace

And try to see if you get a better interlaced picture than you do
non-interlaced.  I, for example, can't seem to have non-interlaced 1024x768
mode.  Hence I use interlaced (my "1024x768i" -- the i is only there to tell me
that its interlaced not X11, for X11 to know that the Interlaced keyword is
placed at the end of the line as above).  After you are done playing around
with all this you can delete any extra stuff (or comment it out) and put the
ones you like in the Mode line so you can switch back and forth between them
while you are in X.  I find it useful, for example, to usually work with only
640x480 screen [especially since I use olvwm and have a virtual desktop] or
800x600 screen and only flip to a higher resolution when I need it -- like when
trying to view a DVI with xdvi.  But, I guess you'll make up your mind after
you play around with things a bit :-)

Well, hope this clears up some questions you might have/had... Hope you get
things to work properly so you can X to your heart's content :-)  [I'm a non
graphics/ascii guy, m'self :-].  And if you have any questions, you know
where to reach me!

G'luck and have a good one,
			Oren.
-- 
Oren Kastner                           E-mail address:
Brandeis University                    oren@chaos.cs.brandeis.edu


====== end cut here =======

If you have any further problems, you can try and get ahold of
me on IRC or mail me at Upholder@uiuc.edu

-- 
The Upholder of Truth		  	    I am not only ready to
Upholder@uiuc.edu (BSD/ASCII mail)          retract this, but also
jar42733@sumter.cso.uiuc.edu (NeXT mail)    deny I said anything.  =)
wi.4173@wizvax.methuen.ma.us (anon. mail)   This is *NOT* CCSO's opinion.
Newsgroups: comp.os.linux