Linux - GamesThis forum is for all discussion relating to gaming in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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
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.
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?
i suppose it can be adapted, you only need this part of it and edit the bit where it refernces to ut-bin:
#!/bin/bash
# Flood the CPU for four seconds so that it is running at the currect speed
#
RandomFork () {
#
while [ "$SECONDS" -le "4" ]; do
#
let MYRND="$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM*$RANDOM$RANDOM+$RANDOM*$RANDOM/$RANDOM*$RANDOM"
#
done
#
}
#
RandomFork &
#
#
# Let's boogie!
#
if [ -x "${UT_DATA_PATH}/ut-bin" ]
#
then
#
echo -n "Sleeping for 1 second... ";sleep 1s;echo "done - launching UT"
#
cd "${UT_DATA_PATH}/"
#
exec "./ut-bin" -log $*
#
fi
#
echo "Couldn't run Unreal Tournament (ut-bin). Is UT_DATA_PATH set?"
#
exit 1
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.
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.
save as utcustom.sh
make executable chmod +x utcustom.sh
run it ./utcustom.sh
You can make it even neater - create another script in /usr/local/bin
name it ut without extentions
the script is something like this:
#!/bin/sh
cd /usr/local/games/unrealtournament
./utcustom.sh
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.
andrew@lappyc2d:~/ut$ sh unreal.sh
: not found5:
: not found7:
: not found10:
: not found14: {
unreal.sh: 100: Syntax error: end of file unexpected (expecting "then")
andrew@lappyc2d:~/ut$ ./unreal.sh
bash: ./unreal.sh: /bin/bash^M: bad interpreter: No such file or directory
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: http://fingel.com/ut/howtos/utonlinux.html
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, 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 :|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.