How to increase update frequency in XFree 4.0.2

How to increase update frequency in XFree 4.0.2

Post by Michael Gutbie » Wed, 23 May 2001 22:18:38



Hello,

since I updated to XFree 4.0.2 - to be able to use my new Matrox
Millennium G450 - the screen update frequency is very low:

75Hz at 1152x864

How can I change this to a reasonable value?

Please notice:
1) The G450 is powerful enough to do this
2) My screen can do 96kHz and has a 160MHz bandwidth

Okay, I know that this only can be configured in
/etc/X11/XF86Config-4 but how?

Please help me!

Greetings

Michael

 
 
 

How to increase update frequency in XFree 4.0.2

Post by George Shapovalo » Thu, 24 May 2001 02:20:31


Add modeline in the screen section. xfree86 4.0.x installs seem to
provide/produce XF86Config without modelines. This is sometimes nice, as
the default mode of vcard/pnp-monitor gets executed, and sometimes is
not.
Read modeline-howto to understand what is going on. You don't really
need to do all this insane stuff of calculating it. Just find some (the
3.3.x one will work) XF86Config which contains modelines, copy the one
with the proper resolution (even better a few, so you can select better
one) to the same section as it was sitting in. Then use xvidtune (after
starting X) to fine-tune the appearance. To actually change the
frequency you need to modify first number in the modeline.
Also check that you set correct hfreq/vfreq for your monitor. If X
detects that you have mga but you say you use it with something that
won't do better then 67 kHz hfreq, X won't even try pushing you card in
order not to fry your monitor. Basically look-up specs of your monitor
and change values in screen section (above all the modelines, where
specs of monitor are) accordingly.


> Hello,

> since I updated to XFree 4.0.2 - to be able to use my new Matrox
> Millennium G450 - the screen update frequency is very low:

> 75Hz at 1152x864

> How can I change this to a reasonable value?

> Please notice:
> 1) The G450 is powerful enough to do this
> 2) My screen can do 96kHz and has a 160MHz bandwidth

> Okay, I know that this only can be configured in
> /etc/X11/XF86Config-4 but how?

> Please help me!

> Greetings

> Michael


 
 
 

How to increase update frequency in XFree 4.0.2

Post by Michael Gutbie » Thu, 24 May 2001 05:05:09


Thanks for your answer, George!


> Add modeline in the screen section. xfree86 4.0.x installs seem to
> provide/produce XF86Config without modelines. This is sometimes
> nice, as the default mode of vcard/pnp-monitor gets executed, and
> sometimes is not.

Yes, that's right.
Sorry that I've posted a question that fast. Probably it wasn't
necessary but anyway...

This is what I've done then:
First I looked up these mode lines in my xf86setup-generated
XF86Config-6.3.
It contains numerous useful "Modelines" for my purposes.
I simply copied the mode lines I needed into my XF86Config-4's
monitor section and then I restarted my X-server.

Now it works as good as with XFree86 3.3.6 - nothing one hadn't have
expected.

CU - Michael

 
 
 

How to increase update frequency in XFree 4.0.2

Post by H Dziardzi » Thu, 24 May 2001 08:04:37




Quote:>This is what I've done then:
>First I looked up these mode lines in my xf86setup-generated
>XF86Config-6.3.
>It contains numerous useful "Modelines" for my purposes.
>I simply copied the mode lines I needed into my XF86Config-4's
>monitor section and then I restarted my X-server.

>Now it works as good as with XFree86 3.3.6 - nothing one hadn't have
>expected.

>CU - Michael

This is a great site:
http://www-sop.inria.fr/cgi-bin/koala/nph-colas-modelines
 
 
 

How to increase update frequency in XFree 4.0.2

Post by Michael Meissne » Fri, 25 May 2001 02:41:55



> Add modeline in the screen section. xfree86 4.0.x installs seem to
> provide/produce XF86Config without modelines. This is sometimes nice, as
> the default mode of vcard/pnp-monitor gets executed, and sometimes is
> not.
> Read modeline-howto to understand what is going on. You don't really
> need to do all this insane stuff of calculating it. Just find some (the
> 3.3.x one will work) XF86Config which contains modelines, copy the one
> with the proper resolution (even better a few, so you can select better
> one) to the same section as it was sitting in. Then use xvidtune (after
> starting X) to fine-tune the appearance. To actually change the
> frequency you need to modify first number in the modeline.
> Also check that you set correct hfreq/vfreq for your monitor. If X
> detects that you have mga but you say you use it with something that
> won't do better then 67 kHz hfreq, X won't even try pushing you card in
> order not to fry your monitor. Basically look-up specs of your monitor
> and change values in screen section (above all the modelines, where
> specs of monitor are) accordingly.

You could fire up xvidtune, play with the tunings to find one that you like,
and then hit show, to have the current modeline output.  That's a lot faster,
then generating the modlines, restarting X, etc.

If you still want to calculate the frequencies yourself, the following perl
script will do the grunt work:

#! /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 (! defined $ans) {
                print "$msg [$default]? ";
                chomp ($ans = <STDIN>);
        }

        $ans = $default                 if (!$ans);
        $ans + 0;

Quote:}

# Main program
{
        $HSFMAX = undef;
        $VSFMAX = undef;
        if (open (XCONFIG, "</etc/X11/XF86Config")) {
                while (<XCONFIG>) {
                        chomp;
                        $HSFMAX = $1                    if (!defined ($HSFMAX) && /^\s*HorizSync.*-\s*([\d.]+)\s*($|\#)/);
                        $VSFMAX = $1                    if (!defined ($VSFMAX) && /^\s*VertRefresh.*-\s*([\d.]+)\s*($|\#)/);
                }

                close (XCONFIG);
        }

        # Defaults are set up for a ViewSonic VP181 LCD monitor
        $HR = &prompt (1200, "How many horizontal dots to you want to use");
        $VR = &prompt (1024, "How many veritical dots to you want to use");
        $DCF = &prompt (112, "What dot clock frequency do you want to use");
        $HSFMAX = &prompt ((defined $HSFMAX) ? $HSFMAX : 95, "What is the maximum horizontal frequency of the monitor");
        $VSFMAX = &prompt ((defined $VSFMAX) ? $VSFMAX : 75, "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.4  2001/05/23 17:40:44  meissner
# Update to ViewSonic VP181.
#
# Revision 1.3  1999/03/12 19:55:22  meissner
# Distinguish between 0 and no argument.
#
# Revision 1.2  1998/12/06 17:01:51  meissner
# Read defaults for horizontal/vertical frequencies from first monitor entry in /etc/X11/XF86Config if it exists.
#
# Revision 1.1  1997/05/22 18:13:25  meissner
# Initial version
#

--
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA


 
 
 

1. Increase the frequency of timer interupts

I need to increase the frequency of timer interrupts (which is by
default set to 10 ms) up to 1 ms ; I read that somewhere in the source
code for linux there is such a definition of a global variable:

#define HZ 100

which sets the frequency to 10 ms

To set the frequency to 1 ms I should change such a definition to:

#define HZ 10

Yes, but then what have I got to do in order for the change to have
effect?

Is it enough to run 'menu xconfig' and recompile the kernel without
changing any option?

2. PCI Configuration

3. update plug-ins in netscape 6.1

4. What is unistd.h and why does it give me grief?

5. fixed frequency monitor/ati mach64/xfree

6. ISDN router for Linux

7. Fixed frequency monitor & XFree?

8. running win98 with WINE on RH 6.0? has anyone done it??

9. Load Average Update Frequency

10. XFree 86 increase in resoulution?

11. How to increase the number of Virtual Desktop in Xfree?

12. Anyway to increase dotclock? Xfree limit of 80Mhz!??

13. increase mem -> increase cpu performance ?