# Refresh rate set for each resolution?

## analpain

I was wondering how i would get my monitor to work properly. I want to get the refresh rate up a little and configur the XF86config in a way that i have a refreshrate set for each resulution. So that when a start a game in a diffrent resolution it would also change the refreshrate.

Any ideas? thx  :Smile: 

----------

## MasterX

If, for example, the maximum refresh rate at 1024x724 is 85Hz then in /etc/X11/XF86COnfig in section Screen, in the line which is about modes type "1024x768/85" 

If for resolution 800X600 the refresh rate is 100hz then the above line should be like this

1024x768/85"  "800x600/100"

----------

## analpain

When i do that kde doesnt start, the screen just flicker for about 10 sec and it doesnt start...

Section "Screen"

    Identifier  "Screen 1"

    Device      "Geforce 4 MX440"

    Monitor     "Dell P991"

    DefaultDepth 16

    Subsection "Display"

        Depth       8

        Modes       "1152x864/100" "1024x768/100" "800x600/120" "640x480/120"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

        Modes       "1152x864/100" "1024x768/100" "800x600/120" "640x480/120"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

        Modes       "1152x864/100" "1024x768/100" "800x600/120" "640x480/120"

        ViewPort    0 0

    EndSubsection

EndSection

----------

## fleed

Maybe you're setting your rates too high?

----------

## MasterX

 *fleed wrote:*   

> Maybe you're setting your rates too high?

 

I agree. The other thing that I noticed is that you can increase the defaultdepth to 24. Keep only one display and remove the line that talkes about depth. They are redundant

----------

## fleed

I've also noticed that if you set your monitor correctly, the server tries to use the highest available refresh rate for it. I don't know if this is specific to the nvidia drivers but it's nice!

----------

## analpain

Well this refresh rate worked in windows so it should work in Linux also, im sure the monitor supports it..and i cant see why it should be bad to have all the modes in XF86config?

Ye and the /number is vsync right?

----------

## squanto

 *analpain wrote:*   

> Well this refresh rate worked in windows so it should work in Linux also

 

Don't be super sure of this, as I have a monitor that refuses to run at 85Hz at 1600x1200 in Linux but will do it fine in Windows. 

Linux (Xfree) caps me to 84.8Hz and it looks horrid for some unknown reason.  85Hz in windows looks fine though.

Also, I can't make my monitor run at certain refreshes in Linux that are possible in Windows, such as: 72Hz, 80Hz, 90Hz.  I am capped at 85 regardless of my res, so maybe keep that in mind.  Try some lower refresh values, and see if it works.  Give 85Hz and 75Hz a try rather than 100Hz.

----------

## fleed

In my experience X can do more refresh rates and weird resolutions than windows. You just have to set it up properly. If it's capping you at 84.8, maybe that's because of the settings in your monitor sections of XF86Config? Try upping the values a bit. Also, if you want different resolutions/refresh rates, you might have to create your own modelines.

----------

## squanto

 *fleed wrote:*   

>  you might have to create your own modelines.

 

I tried many different modelines, but none helped me.  I have vert refresh from 60-120Hz, and my horiz is 30-115kHz, which is as high as my monitor will go. Its an xfree / nvidia problem. 

But the reason that I mentioned it was because I have had experiences where xfree didn't like to run at particular refreshes, and thought that rather than trying to force it at 100Hz that analpain might try something lower.

BTW, what kind of name is that?   :Confused:   :Laughing: 

----------

## Malakin

If you can't get the resolution/refresh rate you want try out these modeline generators, one always works for me.

http://xtiming.sourceforge.net/cgi-bin/xtiming.pl

http://koala.ilog.fr/cgi-bin/nph-colas-modelines

 *Quote:*   

> In my experience X can do more refresh rates and weird resolutions than windows.

 This is definitely true. There are lots of weird resolutions I'm able to do in Linux and I'm able to bump the refresh rate up bit by bit instead of windows where you're usually stuck with 60/72/75/85/100/120 or something like that.

----------

## analpain

Could you show me how you're Screen section looks like with those modelines....was trying them out and they didnt work. Or where u put those modelines?

----------

## neenee

put the modelines in the "Monitor" section.

----------

## squanto

OK, now I'm confused.

I thought that I might try to get my resolutions to how I want them again, but have been unsuccessful.

I used the second modeline generator listed in Malakin's post, and put in the correct values for my monitor.  It generated lots of modelines for me, and I copied them into my XF86Config file in the monitor section.

Then in the screen section, I only have 24bit depth un-commented, and list 1400x1050 as my mode.  According to the modelines, this should give me 1400x1050 @ 103Hz, which would be nice  :Wink: 

But, when I start xdm, it comes up as 1280x1024 @85Hz.  I don't even have a modeline for that res listed, as its not a 4/3 aspect, and the modeline generator didn't give me a listing for it.

I have commented out the horiz and vert ranges from the monitor section.

Can anyone explain that one to me?

I am using a geforce3 card with nvidia drivers, version 4496-r3 kernel and 4496 glx. I have a NEC FE2111 monitor, and xfree version  4.3.0-r3

Thanks. I guess I have the same problem as analpain, now that I look at it...   :Confused: 

EDIT: 1024x768 works at 130Hz no problem, but I can't go any higher than that via the modelines.  If I try, I end up with a res which isn't what I selected, but a pretty good refresh.

EDIT again: If I try some modelines, it defaults to 1280x1024 @ 85Hz

```

XFree86 Version 4.3.0

Release Date: 27 February 2003

X Protocol Version 11, Revision 0, Release 6.6

Build Operating System: Linux 2.4.21-pre4-ac6 i686 [ELF] 

Build Date: 16 November 2003

        Before reporting problems, check http://www.XFree86.Org/

        to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

         (++) from command line, (!!) notice, (II) informational,

         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/XFree86.0.log", Time: Thu Nov 20 18:15:43 2003

(==) Using config file: "/etc/X11/XF86Config"

Using vt 7

(II) [GLX]: Initializing GLX extension

/etc/X11/xdm/Xsetup_0: line 7: /usr/kde/3.1/bin/kdmdesktop: No such file or dire

ctory

sessions: SessionTypes=Gnome,Xsession,enlightenment,fluxbox,icewm,kde-3.0.4,kde-

3.1,kde-3.1.1a,kde-3.1.2,kde-3.1.4,kde-3.1_rc6,

Changing kdmrc in /usr/kde/3

Changing kdmrc in /usr/kde/3.1

Changing kdmrc in /usr

/etc/X11/xdm/Xsetup_0: line 25: cd: /usr/share/config/kdm: No such file or direc

tory

Changing kdmrc in /usr/kde/3.1

GetModeLine - scrn: 0 clock: 157500

GetModeLine - hdsp: 1280 hbeg: 1344 hend: 1504 httl: 1728

              vdsp: 1024 vbeg: 1025 vend: 1028 vttl: 1072 flags: 5

```

----------

## squanto

Ah, I fixed my problem! I used gtf to generate my modelines, and now 1400x1050 works nicely at 100Hz  :Wink: 

the modeline generators that malakin listed just didn't quite work for me.

----------

## neenee

i did not see a link mentioned, so perhaps this

 is useful to others: online version of gtf.

----------

## squanto

 *neenee wrote:*   

> i did not see a link mentioned, so perhaps this
> 
>  is useful to others: online version of gtf.

 

if you have xfree, just run "gtf" in a term  :Wink:  gtf comes with xfree.

```
 $ gtf

usage: gtf x y refresh [-v|--verbose] [-f|--fbmode] [-x|-xf86mode]

            x : the desired horizontal resolution (required)

            y : the desired vertical resolution (required)

      refresh : the desired refresh rate (required)

 -v|--verbose : enable verbose printouts (traces each step of the computation)

  -f|--fbmode : output an fbset(8)-style mode description

 -x|-xf86mode : output an XFree86-style mode description (this is the default

                if no mode description is requested)

----------

## neenee

ah. i see. lol. thanks for that  :Wink: 

----------

## squanto

 *neenee wrote:*   

> ah. i see. lol. thanks for that 

 

No problem, I thought it was a pretty neat utility  :Wink: 

But, Analpain, have you solved your problem yet?

heres some from my XF86Config file:

```

# **********************************************************************

# Monitor section

# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

Identifier  "big"

Modeline "1360x1020_100.00"  202.18  1360 1464 1616 1872  1020 1021 1024 1080  -HSync +Vsync

Modeline "800x600_120.00"  83.95  800 856 944 1088  600 601 604 643  -HSync +Vsync

Modeline "640x480_120.00"  52.41  640 680 744 848  480 481 484 515  -HSync +Vsync

Modeline "1024x768_120.00"  139.05  1024 1104 1216 1408  768 769 772 823  -HSync +Vsync

EndSection

# **********************************************************************

# Screen sections

# **********************************************************************

Section "Screen"

    Identifier  "Screen 1"

    Device      "gf3"

    Monitor     "big"

    DefaultDepth 24

    Subsection "Display"

        Depth       24

        Modes "1360x1020_100.00" "1024x768_120.00" "800x600_120.00" 

       ViewPort    0 0

    EndSubsection

EndSection

```

----------

## analpain

Well I used the gtf util and put the modelines i think in the right places but it didnt work in kde. So i didn use the modelines for the resolution for kde and let the others stay (res for games) and it worked there. Kinda weird, that it wrks in games but not on the desktop....

----------

## Drewgrange

wow! I never knew about all this, I've always just set the single refresh rate range. It's been killing my eyes and I finally went looking for a solution. Now running at a much more eye friendly 80Hz.

----------

## Vu

analpain - you said you put the modeline in the Monitor section, but did you put the corresponding resolution in the screen section?

maybe that might help - but I'm no X expert.

Vu.

----------

## drwebpat

How can you tell what your resolution and refresh rate is when you load up X?

----------

## neenee

run xvidtune.

----------

