Is there a way to determine the specs of a monitor by trial and error?
Sure, but it's better to know what you're doig as there's a real possibility of smoking your chassis, this is specially true for some analog multisync monitors. (For fixed sync monitors, it's a good idea to connect your card through a j-pac.)
If a modeline with a horizontal frequency of 16.660 KHz works nicely, can I assume the monitor will always handle that frequency correctly (given the other values are within specifications, of course)?
Yes, that should be the case.
There's something I don't understand about the monitor_specs string: sync pulse lengths and front/back porch lengths are given as fixed values and not as ranges of values. How's that? Since each modeline has its own syncs/porches, I would expect having to specify the limits for them, as we do for H & V frequencies.
That's because we're only interested in the minimum values.
As for the sync pulses, when generating 15 KHz modes we usually just pick the ones defined for the TV standards:
- H sync pulse: 4.7 microseconds
- V sync pulse: 3 lines (0.192 miliseconds)
These ones should always work, even if modern multisync monitors can work with lower values.
Horizontal porches are not critical for picture stability, they just need to be long enough so the borders are not cropped.
For vertical front porch is usually enough to use 1 line (0.064 miliseconds)
Vertical back porch is the most important value. It accounts for the minimum time the monitor needs for vertical retrace (the time it takes for the electron beam to return to the top of the screen and stabilize itself). Usually, 18 lines is enough (1.152 miliseconds). We usually prefer monitors with fast retrace (lower values).
So this is the theory. Post some of your problematic modelines to see if we can find a logic to the problem.