From: Stephen Tweedie (sct@dcs.ed.ac.uk)
Date: 01/14/93


From: sct@dcs.ed.ac.uk (Stephen Tweedie)
Subject: Re: new to linux and X11 problem
Date: 14 Jan 1993 17:05:54 GMT

In article <1993Jan13.185807.29226@qucis.queensu.ca>, dean@qucis.queensu.ca (Thomas Dean) writes:

> We just purchased a machine and installed linux .98p5 on it.
> I'm *very* impressed. Almost everything worked right out of
> the box. The only problem we have is with the mouse buttons.
> The mouse tracks fine, but the mouse has to be moved after
> the button press and the button release for X to detect the
> button changes. If the button is pressed and released without
> moving the mouse, the button is only detected about 20% of the
> time.

There IS a deliberate feature of Xfree86 which might be what you are
observing. PCs are often supplied with two-button mice, whereas X
requires 3 buttons. So, Xfree86 can emulate a three button mouse:
pressing both buttons simultaneously is interpreted as a middle button
press. To permit this, Xfree86 does not process single button-down
events immediately; it waits to see if the next event is a press on
the other button, in case both buttons are about to be pressed.

The visible effect of this is that X only responds to a mouse press
after receiving another mouse event. If you actually do have a three
button mouse, you should remove the offending Xconfig command
("Emulate3Buttons" or something like that).

> By the way, is there any simple way to determine the refresh rate
> from the numbers in the Xconfig file. I read the tutorial, but it
> is set up in the opposite directions. I took the lines form the
> Xconfig.sample for the 1024x768 NI, but the dot clock needed
> did not match one on the card. I took what I thought to be the
> correct formulas from the tutorial to calculate the new refresh
> rate and the monitor seems to sync on it okay. I would appreciate
> it if someone could send me some simple formulas that given the
> numbers from Xconfig give the horiz, vert refresh rates and
> real times of the sync signals so that I can see how close we
> are to the limits of the monitor.

Congratulations on getting it to work. The general rule-of-thumb here
seems to be "guess and adjust"...

Anyway, given the Xconfig clocks, you should be able to work out
horizontal and vertical refresh rates:

If your dot clock frequency (in Hz: the values in Xconfig are in MHz)
is f, the total scan-lines per vertical refresh is ny and the total
dots per scan-line is nx (use the LARGEST of the four vertical or
horizontal clock numbers from XConfig), then the horizontal refresh
rate, fx, is f/nx, and the vertical rate fy is fx/ny. You might end
up a factor of two out if you have interlace on, tho.

Regards,
 Stephen Tweedie.