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.
Here's the diff where the change was made http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c.diff?r1=1.55&r2=1.56 http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c
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.
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)
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.
So it does :o) Magic. Thanks for this.
I'll probably package up some libSDL for ut2003 at least