PDA

View Full Version : XFree86 4.3 Resolution Switch Problem


A.T. Hun
03-27-03, 11:33 AM
I just upgraded to Mandrake 9.1 from 9.0. I had the 4191 drivers working flawlessly with the NWN beta, UT2K3, Q3A, RtCW, and other games. Since I upgraded to 9.1, I've run into some problems.

Usually when I play UT2K3, I play at 800x600 (my desktop is 1024x768). When the game starts, my refresh rate drops to 72Hz (it should be 85hz, my monitor can display it), so the picture is skewed to the left side of the monitor. I discovered that if I use ctrl/alt/- to change my desktop to 800x600 before running UT2K3, the game runs fine and the refresh rate stays at 85Hz where it belongs. If I run a game at 1024x768, it runs fine with no refresh rate problems. The same problem happens with NWN.

I even tried using my XFree86-4 file from my 9.0 installation just to make sure I didn't mess anything up in there. Same problem.

I assume that there's something in the new XFree86 4.3 code that allows you to change resolutions on the fly that is not playing nicely with the NVIDIA drivers. Any thoughts or possible solutions?

Update: I just noticed that Q3A and RtCW work fine switching resolutions. Is this maybe a SDL problem?

bwkaz
03-27-03, 12:00 PM
Could be SDL, I don't know.

There is something new in X 4.3, though. It's called XRandR, the Resize and Rotate extension. It's basically support for resizing the root window without restarting X, so you can do true resolution-swapping (without the virtual desktop panning issues).

Although I'm using X 4.3 and not having any problems with SDL in general, UT, or UT2k3. But then again, I do play those games at full desktop resolution (1280x1024, 75Hz), so that might be why.

Yeah, it does seem to be part of it. When I load up UT (the original), no matter which entry in the list of video modes I choose (there are, for example, 4 different 1024x768's, for the 4 modes of that size with different refresh rates that my X server has validated), I get the same 60Hz refresh rate (as reported by my monitor's OSD, that is).

Is your monitor OSD reporting anything different when you switch to 800x600 first?

I have a feeling that UT, et al. don't bother with the refresh rate, they just set it to whatever they come across first.

A.T. Hun
03-27-03, 12:05 PM
Originally posted by bwkaz
Yeah, it does seem to be part of it. When I load up UT (the original), no matter which entry in the list of video modes I choose (there are, for example, 4 different 1024x768's, for the 4 modes of that size with different refresh rates that my X server has validated), I get the same 60Hz refresh rate (as reported by my monitor's OSD, that is).

Is your monitor OSD reporting anything different when you switch to 800x600 first?

I have a feeling that UT, et al. don't bother with the refresh rate, they just set it to whatever they come across first.

When I switch to 800x600 first, the refresh rate doesn't change at all when I start a game. I tried LBreakout2 and Frozen Bubble and got the same problem. This issue was mentioned on the libSDL mailing list but I don't know if anything was done about it. This is almost certainly an SDL issue.

Wolfman [TWP]
03-27-03, 07:56 PM
You could try adding the following line in your UT2K3 homedir/.ut2003/System/UT2003.ini file. In the [SDLDrv.SDLClient] section.

DesiredRefreshRate=75

I don't know wether that can be done with the other games, but it's worth a shot for UT2K3 at least.

Wolf

A.T. Hun
03-27-03, 08:17 PM
Originally posted by Wolfman [TWP]
You could try adding the following line in your UT2K3 homedir/.ut2003/System/UT2003.ini file. In the [SDLDrv.SDLClient] section.

DesiredRefreshRate=75

I don't know wether that can be done with the other games, but it's worth a shot for UT2K3 at least.

Wolf

I just tried that. Unfortunately, it didn't help. I joined the libSDL mailing list and made a post about this. Hopefully they can fix this.

Petersen
03-27-03, 08:55 PM
To A.T. Hun:

It's really funny, your article is nearly exactly the same I planned to post here some days ago... :-) Somehow, I had others things to do and forgot it, but I am glad someone wrote about it in the meantime. I had already done an extended google search, but didn't find anything interesting. Therefore, I didn't know, others made the same experience with xfree 4.3.0.

Yes, I have exactly the same problem, not with the same game - in my case, it is quake2, but the problem is identical.

And yes, I noticed it after having upgraded from xfree 4.0.2 to 4.3.0. For my desktop, I use a custom resolution of 960x720, and for quake2 I wanted to use 800x600. I noticed that the image got flickering, didn't have 85 Hz any longer (proven by my monitor's OSD as well).

And I also found that switching to 800x600 manually (via control-alt-+ or control-alt--) before launching the game gave me my usual 85 Hz!

That I use a custom resolution of 960x720 for my desktop is irrelevant. It also happens if I use 1024x768 and when the game by itself switches to 800x600, by the way.

This is not a really a big problem to me, I can live with it, it is just a little uncomfortable having to always switch the resolution manually before starting the game. I decided on running the game in 960x720 as well... ;-)

But I found something interesting in this thread that I wasn't aware of:
SDL!
Yes, in my case, this is also an sdl game, because I compiled an sdl version of quake2.

If someone in this thread knows/finds a solution to this small issue, please, let us know about it. Thanks.

What I also find is that 2d performance is somewhat mediocre under xfree 4.3.0: When scrolling longer listboxes in the browser "opera" I see that screen redraws are slow, really slow. Don't remember I had this with xfree 4.0.2 and the same (latest) nvidia drivers.
Someone else gets worse 2d performance with xfree 4.3.0 (and basically, the same settings in XF86Config as before)?


Regards
Petersen

Petersen
03-29-03, 08:14 AM
Me again :)

I tried xrandr, it is really useful as workaround when playing games in a lower resolution than one's desktop resolution.

By integrating xrandr in a game script, you don't need to manually switch to the lower resolution before launching the game.

Example: (desktop: 960x720, game: 800x600)
#####
xrandr -s 800x600
quake2 $*
xrandr -s 960x720
####

works perfectly :) Not a fully satisfying solution to this new 4.3.0 problem, but it does its job.


Petersen