-   Linux - Games (
-   -   Unreal Tournament running too fast (

gamelord12 03-23-2009 07:16 PM

Unreal Tournament running too fast
I've got Unreal Tournament installed natively (not through WINE), and it runs, but it runs twice as fast as it should. I've seen games do this in Windows, where they're using both cores of my CPU instead of just one (I've got a Core 2 Duo, and dual cores weren't on PCs in 1999). In Windows, I would right-click on the process in the task manager, and I could set the processor affinity. I've tried various commands to launch the game using only one core, but none of them have worked yet. They execute without any errors in the terminal, but the game still suffers from running too fast. I've tried taskset, schedutils, and a few others even using sudo, following all the documentation for getting a process running on one core, but they don't seem to be working. How can I get this running on one core, guaranteed? I'm on Ubuntu 8.10 64-bit.

rizzy 03-24-2009 02:57 AM

this happens cuz UT depends on CPU clock to time itself. Try adding vSync=True to ut.ini or force vSync through grafix drivers. Also worth checking that BIOS CPU speed controls are off - like Asus Cool n Quiet options.
On my laptop, the only thing i could do to run it normal speed was running laptop on batteries and loading CPU 100% before launching the game - pain , i know :)

gamelord12 03-24-2009 10:40 AM

That's not really a solution, so much as a work around. Loading up the processor while on batteries isn't a good way to handle that at all. I just want the processor affinity to work.

rizzy 03-24-2009 01:36 PM

The solution is to disable speed stepping of CPU, if BIOS doesnt allow it , i use work around.

If you find a better way, please, let me know

rizzy 04-18-2009 10:54 AM

found a nice script that finally solves this problem for me

run the script in UnrealTournament dir

gamelord12 04-19-2009 11:12 AM

I found that this problem also applies to Hitman (the conversations get interrupted because the timing is off). Can this script be easily modified to fix any binary giving me trouble?

rizzy 04-19-2009 12:04 PM

i suppose it can be adapted, you only need this part of it and edit the bit where it refernces to ut-bin:

# Flood the CPU for four seconds so that it is running at the currect speed
RandomFork () {
while [ "$SECONDS" -le "4" ]; do
RandomFork &

# Let's boogie!
if [ -x "${UT_DATA_PATH}/ut-bin" ]
echo -n "Sleeping for 1 second... ";sleep 1s;echo "done - launching UT"
cd "${UT_DATA_PATH}/"
exec "./ut-bin" -log $*
echo "Couldn't run Unreal Tournament (ut-bin). Is UT_DATA_PATH set?"
exit 1

gamelord12 04-22-2009 08:33 AM

Now I feel like this script should be something that every noob should have access to (I haven't tried it yet, but I'm assuming it works for the time being) and perhaps someone, maybe myself, should write a GUI program to generate it based on what game or program you want to run at the correct speed.

gamelord12 04-22-2009 08:35 AM

Speaking of being a noob, to run a script, you just do "sh <filename>", right? And when I save this script, is there a common file extension I should be using? Sorry, I've never done this before.

rizzy 04-22-2009 12:35 PM

save as
make executable chmod +x
run it ./

You can make it even neater - create another script in /usr/local/bin
name it ut without extentions
the script is something like this:
cd /usr/local/games/unrealtournament

also chmod new script chmod +x ut

Now you can just type ut anywhere in terminal to start ut. it's cool as well as usefull.

gamelord12 04-22-2009 06:43 PM

I got these errors:

andrew@lappyc2d:~/ut$ sh
: not found5:
: not found7:
: not found10:
: not found14: { 100: Syntax error: end of file unexpected (expecting "then")
andrew@lappyc2d:~/ut$ ./
bash: ./ /bin/bash^M: bad interpreter: No such file or directory

rizzy 04-23-2009 01:12 PM

Could it be that you use 64bit system? I've never used 64bit myself and don't know if the script requires adaptations for it.
Instructions here may be of more use to you:

CaptainInsane 04-28-2009 11:37 PM

I would suspect it is related to the 64 bit kernel.

I have been running UT native in both client and server installs without any such issues. All on 32-bit kernels.
Using P4 HT cpu's (linux see's as 2 cpus) and on a supermicro server system with 2 physical cpus.

No issues with program running too fast.

rizzy 04-29-2009 12:55 PM

No, running too fast isn't linked to 64 bit, but to newer computers, imo. P4 HT is still old architecture so UT would run fine on it. However UT on my AMD X2 overspeeds in linux and winXP, also my GF's Sony Vaio Pentium M overspeeds in winXP - it has laptop speedstepping for CPU which messes up UT.

Did anyone managed to run UT native in 64bit? I've not seen one account on it, UT is fussy enough to run nowdays on ANY modren system , nevermind 64 :|

All times are GMT -5. The time now is 02:09 AM.