> I'm new to Linux. I'm running Linux (Red Hat 4.1) on a Pentium, which was setup
> by somebody else. I'd like to find out what resolution & refresh rate is being
> used, then see if I can come up with a better setting. I've tried digging
> through documentation; but all I can find is references to an XFConfig86 file,
> and hits that there's a program that could help me solve the problem ... I can
> find a configuration file (actually, more than 1 configuration file), but no
> program. I haven't spent a lot of time looking through the configuration file,
> but it looks like there's a lot of information there specifying video
> parameters! So without trying to translate this further, I'm not sure what's
> relevant.
> I may end up replacing the monitor with something better, in which case I'll
> need to deal with this in even more detail, perhaps.
> What's the best way to deal with this?
Yep, the XF86Config file (or Xconfig for Metro-X or Xaccel.ini for Accelerated
X) contains the video parameters. The X docs should contain more explanations
of exactly what the numbers mean. If you are using XFree 3.2, or later, the
xvidtune program allows to dynamically change the values.
Another way to calculate the values is to use the following perl script I
coverted from awk (the defaults are the current ones I'm using with a Nokia
447X monitor and Imagine 128 series 2 video card -- the monitor is actually
capable of going slightly faster, but I'm running it through a monitor
switcher, and it looks fuzzy):
#! /usr/bin/perl -w
# Perl rewrite of xconfig.awk.
#
# xconfig.awk - awk script for calculating Xconfig parameters for
# XFree86, given the monitor specs and dot clock frequencies.
# The default values are for the Nokia 447x monitor.
#
sub prompt {
if (!$ans) {
print "$msg [$default]? ";
chomp ($ans = <STDIN>);
}
$ans = $default if (!$ans);
$ans + 0;
Quote:}
# Main program
{
# Defaults are set up for a Nokia 447X monitor
$HR = &prompt (1152, "How many horizontal dots to you want to use");
$VR = &prompt (864, "How many veritical dots to you want to use");
$DCF = &prompt (110, "What dot clock frequency do you want to use");
$HSFMAX = &prompt (82, "What is the maximum horizontal frequency of the monitor");
$VSFMAX = &prompt (110, "What is the maximum vertical frequency of the monitor");
$HFrontMIN = &prompt (0.50, "Horizontal Front Porch Minimum (us)");
$HsyncMIN = &prompt (1.20, "Horizontal Sync Pulse Width Minimum (us)");
# $HBackMIN = &prompt (1.25, "Horizontal Back Porch Minimum (us)");
$HBlankMIN = &prompt (4.00, "Horizontal Blank Period Minimum (us)");
$VFrontMIN = &prompt (0.0, "Vertical Front Porch Minimum");
$VsyncMIN = &prompt (45.0, "Vertical Sync Pulse Width Minimum");
$VBackMIN = &prompt (500.0, "Vertical Back Porch Minimum");
$VBlankMIN = &prompt (600.0, "Vertical Blank Period Minimum");
$verbose = 0;
# Horizontal Scan Lines:
$Hfront = $HFrontMIN * $DCF + $HR;
# if( (Hfront - HR) < HFrontMIN * DCF ) Hfront += 8 ;
$Hfront = 8 * (1 + int($Hfront / 8)) if ($Hfront % 8);
$Hsync = $HsyncMIN * $DCF + $Hfront;
$Hsync = 8 * (1 + int($Hsync / 8)) if ($Hsync % 8);
$Hblank = $HBlankMIN * $DCF;
$HFL = $HR + $Hblank;
$HFL = 8 * (1 + int($HFL / 8)) if ($HFL % 8);
# Vertical:
$Vtick = $HFL / $DCF; # us
$Vfront = $VR + $VFrontMIN / $Vtick;
$Vsync = $Vfront + $VsyncMIN / $Vtick;
$Vback = $VBackMIN / $Vtick;
$Vblank = $VBlankMIN / $Vtick;
$VFL = $Vsync + $Vback;
$VFL = $VR + $Vblank if ($VFL < $VR + $Vblank);
$RR = 1000000 * $DCF / ($HFL * $VFL);
$HSF = 1000 * $DCF / $HFL;
# Done: generate some output:
if ($verbose) {
printf "\n# Horizontal:\n";
printf '# Front Porch = %.2f us, Sync = %.2f, Back Porch = %.2f, ',
($Hfront - $HR) / $DCF, ($Hsync - $Hfront) / $DCF, ($HFL - $Hsync) / $DCF;
printf "Blank = %.2f\n\n", ($HFL - $HR) / $DCF;
}
printf "# Refresh Rate: %.2f Hz, Horizontal Sync Frequency: %.2f kHz\n", $RR, $HSF;
printf " \"%dx%d\"\t%.2f\t%d %d %d %d %d %d %d %d\n", $HR, $VR, $DCF, $HR,
$Hfront, $Hsync, $HFL, $VR, $Vfront, $Vsync, $VFL;
print "\nWarning: the Horizontal sync frequency may be too high for the monitor!\n"
if ($HSF > $HSFMAX);
print "\nWarning: this refresh rate may be too high for the monitor!\n"
if ($RR > $VSFMAX);
Quote:}
# HISTORY
# $Log: xconfig,v $
# Revision 1.1 1997/05/22 18:13:25 meissner
# Initial version
#
--
Michael Meissner, Cygnus Solutions (East Coast)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA