Documenting installing UT2004 64-bit on linux Ubuntu  (Read 794 times)

Piglet

  • 1337
  • *
  • Posts: 3244
  • Country: gb
Documenting installing UT2004 64-bit on linux Ubuntu
« on: October 31, 2024, 22:38 »
1. Installed Ubuntu - I used Ubuntu 24.04.1 LTS from here: https://ubuntu.com/download/desktop

2. Copied across my entire UT2004 directory from Windows, on a USB stick, to my home directory on Linux, and renamed it
Code: [Select]
.ut2004 (dot ut2004). I'd already got the ut2004-bin-linux-amd64 executable from the linux 3369 patch. Made it executable:

Code: [Select]
chmod +x ut2004-bin-linux-amd64

3. Grabbed the 64-bit libraries needed for UT to run.

From the ~/.ut2004/System directory I ran the following commands to install and create a symlink to each. This gets you libSDL-1.2.so.0 & libstdc++.so.5 &  Openal for sound: and creates a symlink for them in the System directory:

Code: [Select]
sudo apt-get install libsdl1.2debian
ln -sf /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0  .

sudo apt-get install libstdc++5
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.5  .

sudo apt-get install libopenal1
ln -sf  /usr/lib/x86_64-linux-gnu/libopenal.so.1.23.1 ./openal.so

4. Created a file "cdkey" in ~/.ut2004/System directory containing my CD Key

5. Edited UT2004.ini for opengl and alaudio:

Code: [Select]
[Engine.Engine]
RenderDevice=OpenGLDrv.OpenGLRenderDevice
AudioDevice=ALAudio.ALAudioSubsystem

6. Slightly late, changed to using KDE, as without it the in-game display sliders for contrast, brightness and saturation didn't work: https://linuxcapable.com/how-to-install-kde-plasma-on-ubuntu-linux/

7. Two commands that are useful (from Holyspam):

Mesa drivers have mesa_glthread flag which enables multi-threading on their OpenGL driver implementation: https://linuxcapable.com/how-to-install-kde-plasma-on-ubuntu-linux/


Set up CPU for performance:
Code: [Select]
sudo cpupower frequency-set --governor performance


Run:
Code: [Select]
cd ~/.ut2004/System/
./ut2004-bin-linux-amd64
« Last Edit: Yesterday at 22:28 by Piglet »

Piglet

  • 1337
  • *
  • Posts: 3244
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #1 on: November 01, 2024, 15:23 »
Updated with a link to the v3369 linux patch. That has both the 32 bit and 64 bit versions of both client and server.

Piglet

  • 1337
  • *
  • Posts: 3244
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #2 on: November 05, 2024, 23:39 »
Here's an update for 32 bit UT2004 on 64 bit Ubuntu, and for running either that or 64 bit UT:

Code: [Select]
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libstdc++5:i386 libsdl1.2-compat:i386 libopenal1:i386 libgl1:i386


To run 32 bit, I execute this:

Code: [Select]
#!/bin/bash

export MESA_GLTHREAD=TRUE

cd ~/.ut2004/System/

ln -sf /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 .
ln -sf /usr/lib/i386-linux-gnu/libstdc++.so.5 .
ln -sf /usr/lib/i386-linux-gnu/libopenal.so.1 ./openal.so
ln -sf /usr/lib/i386-linux-gnu/libGL.so.1 ./libGL.so.1


./ut2004-bin

To run 64 bit UT2004 I execute this:

Code: [Select]
#!/bin/bash

export MESA_GLTHREAD=TRUE

cd ~/.ut2004/System/

ln -sf /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0  .
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.5  .
ln -sf  /usr/lib/x86_64-linux-gnu/libopenal.so.1.23.1 ./openal.so


./ut2004-bin-linux-amd64


To make it even smoother you can run this before UT:

Code: [Select]
sudo cpupower frequency-set --governor performance
and this afterwards, to return to power saving mode:

Code: [Select]
sudo cpupower frequency-set --governor powersave

Piglet

  • 1337
  • *
  • Posts: 3244
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #3 on: Yesterday at 22:31 »
Small update, rather than boosting all cores, you can set the game to run on a specific one that you boost - e.g. core 1:

Code: [Select]
sudo cpupower -c 1 frequency-set --governor performance

Code: [Select]
#!/bin/bash

export MESA_GLTHREAD=TRUE

cd ~/.ut2004/System/

ln -sf /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 .
ln -sf /usr/lib/i386-linux-gnu/libstdc++.so.5 .
ln -sf /usr/lib/i386-linux-gnu/libopenal.so.1 ./openal.so
ln -sf /usr/lib/i386-linux-gnu/libGL.so.1 ./libGL.so.1


taskset -c 1 ./ut2004-bin

and afterwards can set the core back to normal:

Code: [Select]
sudo cpupower -c 1 frequency-set --governor powersave