Playing Unreal Tournament On Ubuntu Lucid

17 May 2010 07:16

I wanted to play Unreal Tournament on Ubuntu 10.04 (Lucid Lynx) 64-bit. Linux is theoretically supported by Unreal Tournament, by using custom installer. So this is how to do it:

Get Unreal Tournament

The most likely version to obtain is UT GOTY (Game Of The Year edition).

Get Installer

Go here:

http://www.liflg.org/?catid=6&gameid=51

There are two installers. Download both using BitTorrent client. For me the one witout "goty" worked.

Run installer like this:

sudo bash /path/to/unreal.tournament_436-multilanguage.run

Probably it won't run, because you don't have GTK 1.2. Bad news, GTK 1.2 isn't even available in system repository. The last Ubuntu version that shipped GTK 1.2 was Ubuntu Jaunty. My favorite trick to get packages from older distros is as follows:

sudo sed s/lucid/jaunty/g /etc/apt/sources.list -i
sudo aptitude update
sudo aptitude install -y libgtk1.2
sudo sed s/jaunty/lucid/g /etc/apt/sources.list -i
sudo aptitude update

Try to run the installer, it should work now.

Default options are generally OK, so you can keep them. Once "enter CD" dialog appears, you need to either enter the CD or mount the ISO image using the following command:

sudo mount /path/to/the/iso-file.iso /media/cdrom

Click OK, and the installer continues to run. If you're asked to enter CD2 and you don't have one, try the second installer (the one without "goty") from loki site.

Running UT

I had no luck in running UT:

quake@vaio ~ $ ut
Signal: SIGIOT [iot trap]
Aborting.

From this thread I've learned it could be solved by doing this:

cd /usr/local/games/ut/System
for i in ../Maps/*.uz ; do sudo ./ucc-bin decompress $i ; done
mv *.unr ../Maps

After doing this, you should be able, to run ut successfully.

Changing resolution

I was not able to change resolution (once I changed it, it was going back to 640x480 after a few seconds). Open file ~/.loki/ut/System/UnrealTournament.ini, locate "640" and "480" in it and change to desired resolution.

High speed

When I run UT it seemed going about 5 times faster than it should. After reading much about -cpuspeed option and playing with CPU downclocking I figured out that without sound it runs OK. After some experimenting it seems, that it's pulseaudio is causing it, once I killed it and prevented to run (it auto-respawns for some reason) UT finally worked at good speed.

sudo chmod -x /usr/bin/pulseaudio
killall pulseaudio
ut

The problem with this is that some process continuously tries to run pulseaudio, which causes CPU to be loaded and ut to run not smoothly.

So this should work:

sudo mv /usr/bin/pulseaudio /usr/bin/pulseaudio.original
echo -e '#!/bin/bash\nsleep 10000' | sudo tee /usr/bin/pulseaudio
sudo chmod +x /usr/bin/pulseaudio
killall pulseaudio
ut

Remember to do this after playing ut:

sudo mv /usr/bin/pulseaudio.original /usr/bin/pulseaudio

If you have some problems with sound after playing UT, log out and in again, and it should be OK.

NOTE: this trick should be equivalent to running pasuspender ut, but for some reason it does not work.

More tricks

When playing on LAN party we discovered more tricks:

To let UT correctly determine CPU speed, you need to set CPU frequency (using some applet or cpufrequtils) and disable additional cores (leaving one):

echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu4/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu5/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu6/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu7/online

(if you have 8 cores, cpu0 will be online, the rest offline).

Next trick is disabling desktop effects or window composing. For one person this meant much smoother graphics, for other it meant working sound (which is very weird, but yes, that's true).

UPDATE: Maverick Audio

It seems that on maverick the pulseaudio hack is not working, but here's what you can do instead:

  • edit /usr/local/bin/ut (may be located somewhere else, find when you installed the game)
  • find this line: ./$GAME_BINARY "$CMD_ARGS" "$@"
  • replace with: padsp ./$GAME_BINARY "$CMD_ARGS" "$@"
  • (make sure you have the padsp binary, just run try to run it)
  • then just run ut and sound works :-)

UPDATE: this works, but gives significant audio lags (200-300 ms!). This basically sucks. So the other workaround is:

  • having alsa-oss installed (program aoss)
  • having a proper .asoundrc in home directory:
ctl.!default {
  type hw
  card 0
}

pcm.dmixer  {             #this virtual device does the mixing of 
  type dmix               #the various signals
  ipc_key 1024
  slave {
    pcm "hw:0,0"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 44100
  }
  bindings {
    0 0
    1 1
  }
}

pcm.!default {             #this means that applications use the mixer
  type plug                #by default, so you can hear everything
  slave.pcm "dmixer"
}
  • having 32 bit alsa-oss libs installed (getlibs -p alsa-oss)

You need /usr/lib32/libaoss.so. Once you have it backup /usr/lib/libaoss.so and link it to the 32 bit version: /usr/lib32/libaoss.so. Then edit the ut script like before but instead of padsp use aoss. This works for me. WARNING: this overrides all ALSA applications. If you want the default configuration (that routes the audio to pulseaudio), you'll need to change .asoundrc file name after playing UT.

Previous post: Maj


More posts on this topic

Comments

Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License