How change video resolution & refresh?

How change video resolution & refresh?

Post by David Morgenlend » Wed, 21 May 1997 04:00:00



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?

Dave Morgenlender

 
 
 

How change video resolution & refresh?

Post by Craig Beckerle » Wed, 21 May 1997 04:00:00



> 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?

> Dave Morgenlender


When you are running X you change resolutions by hitting <CTRL><ALT><+>
and <CTRL><ALT><->
using the + and - keys on the keypad.  The order is specified in the
/etc/XF86Config file.  As
far as setting the refresh rate you can change that in the XF86Config
file as well.  But be
warned!  Dont set the refresh higher than what your monitor/ card can
handle else you risk
damaging them.  Check the specs before you do this.  If you start X and
it looks like total
garbage, hitting <CTRL><ALT><Backspace> will kill the X window manager
automatically (kinda
like a panic button) and bring you back to the prompt.

You can specify the refresh without digging thru the ever-inutuituve
XF86Config file by
running the xf86config program (must be done as root).

Hope I answered your question.
Craig

 
 
 

How change video resolution & refresh?

Post by Mike Meissne » Fri, 23 May 1997 04:00:00



> 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

 
 
 

How change video resolution & refresh?

Post by Clone Rang » Mon, 26 May 1997 04:00:00



> (snip)
> 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

In order for you to setup X, you need to provide info on the following
hardware:
1.video card: chipset, vendor name and model, amount of video RAM.
2.monitor: the range of acceptable horizontal synch frequencies, the
range of allowable synch rates (vertical refresh), and , if available,
the bandwith, in MHz.
3.mouse: type (microsoft, logitech, PS/2, busmouse), type of
connection between your mouse and the system (serial or bus), and the
mouse device name. You can leabe this as the generic name /dev/mouse.

To run the config program, you have to login as root and type xf86conf
at the prompt (no capitals). When you finish, you have to check the
file /etc/XF86Config.

Then you create an .xinitrc by copying (for example) the script file
/usr/X11R6/lib/X11/xinit/xinitrc.fvwm into your home dir and naming it
.xinitrc (beggining with a dot) You edit this file to add the next
line just before the line that reads "fvwm":
xterm -sb -name Linux &    (this starts a terminal window with the
name Linux on it).

If you have to kill X, just click on Ctrl+Alt+Backspace.