Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19234 - xfree 4.3.0-r2 refresh rates
Summary: xfree 4.3.0-r2 refresh rates
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-13 07:34 UTC by Michael Fitzpatrick
Modified: 2003-04-18 07:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fitzpatrick 2003-04-13 07:34:10 UTC
xfree 4.3.0-r2 has extra modes / refresh rates by default which cause
games that switch mode to get lower refresh rates

I suspect the new xrandr added these extra modes by design. Perhaps the real bug
is the things which want to change mode should be more intelligent with the new
behaviour in X? 

The change that caused this is in
/var/tmp/portage/xfree-4.3.0-r2/work/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c

line 1523 validateAllDefaultModes = TRUE; is
validateAllDefaultModes = FALSE; in xfree-4.2.xx


Reproducible: Always
Steps to Reproduce:
1. install xfree4.3
2. run xrandr - observe the modes output something like this:-
 SZ:    Pixels          Physical       Refresh
*0   1024 x 768    ( 347mm x 260mm )  *84  75  70  60
 1    800 x 600    ( 347mm x 260mm )   85.. etc etc
 2    640 x 480    ( 347mm x 260mm )   85...etc etc
.. and 3, 4 and so on

3. Start ut2003 / descent3_demo. When it switches to the resolution you
have set in the game config, it is using the lowest of the above refresh rates.

4. Change the line in xf86Modes.c described to say
validateAllDefaultModes = FALSE;
5. qmerge X with that change.
6. Observe the output from xrandr shows just
the modes you have defined in your XF86Config-4 file something like this :-
 SZ:    Pixels          Physical       Refresh
*0   1024 x 768    ( 347mm x 260mm )  *84
 1    800 x 600    ( 347mm x 260mm )   85
 2    640 x 480    ( 347mm x 260mm )   85
Actual Results:  
See steps

Expected Results:  
Questionable. The new functionality is probably better than the old Modes "" line, 
it's annoying to get 56 and 60hz flickering displays in games though.

A workaround is to change the resolution (with ctrl-alt-+/- or xrandr -s prior
to launching the game - this works where the game uses a single resolution.
descent3 titles and menus use 640x480 though, if you use a higher resolution for
the game, that second switch will end up at 60hz.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-14 05:42:08 UTC
michael, I have put a new libsdl into portage (1.2.5-r2)  Please test that with your games and check on the refresh rates issue.
Comment 3 Michael Fitzpatrick 2003-04-14 08:26:22 UTC
This works well for games like cube and tuxracer which link against libsdl.so dynamically.

ut2003 + descent3 (demo) aren't fixed with this - I suspect purely because they link statically.

q3demo and wolf (full) continue to work fine. I'm guessing that q3 + wolf use DGA?

Is this just sdl games? SDL uses the VidMode extension to change the mode, maybe there are no games that use vidmode directly, so this fixes it (so long as the statically linked games issue patches)
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-15 08:27:06 UTC
Magnade in #gentoo-dev reports that if you replace the libSDL.so file in the ut2003 /System directory with the patched libSDL.so file from here, and make a symlink with the name of the file you deleted, then all this goes away nicely.
Comment 5 Michael Fitzpatrick 2003-04-15 09:13:17 UTC
So it does :o)

Magic. Thanks for this.
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-18 07:15:12 UTC
I'll probably package up some libSDL for ut2003 at least