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

Piglet

  • 1337
  • *
  • Posts: 3258
  • 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: November 09, 2024, 22:28 by Piglet »

Piglet

  • 1337
  • *
  • Posts: 3258
  • 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: 3258
  • 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: 3258
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #3 on: November 09, 2024, 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

dk uk

  • Newbie
  • *
  • Posts: 9
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #4 on: November 17, 2024, 22:26 »
Hi Pig,
I've installed Ubuntu with dual boot - but my system now boots into Linux by default. Any ideas how I can change this to default to Windows 11?
I'm not clued up on linux and haven't got to the copying UT file bits over. It's just I sometimes use RealVNC and want it to boot to Windows as default...

-Adler-

  • Junior Member
  • *
  • Posts: 47
  • Country: 00
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #5 on: November 21, 2024, 18:21 »
Hi Pig,
I've installed Ubuntu with dual boot - but my system now boots into Linux by default. Any ideas how I can change this to default to Windows 11?
I'm not clued up on linux and haven't got to the copying UT file bits over. It's just I sometimes use RealVNC and want it to boot to Windows as default...

RealvNc is also available for Linux:
https://www.realvnc.com/de/connect/download/viewer/linux/


How to Change Default Boot OS in Dual Boot: Linux or Windows
« Last Edit: November 21, 2024, 18:25 by -Adler- »
-----------------------------------------------------------------
Sorry, but I don't trust anything that bleeds for five days and doesn't die.

Stealer

  • 1337
  • *
  • Posts: 299
  • Country: gb
    • 76561197992159424
    • StealerNinja
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #6 on: November 21, 2024, 21:15 »
Hi Pig,
I've installed Ubuntu with dual boot - but my system now boots into Linux by default. Any ideas how I can change this to default to Windows 11?
I'm not clued up on linux and haven't got to the copying UT file bits over. It's just I sometimes use RealVNC and want it to boot to Windows as default...
Off the top of my head I believe you have to press F8 or F6 to bring up the boot menu, during power on or hard reset. If you've got the OS's on different drives/partitions you can just select your boot preference in your bios [del] key on boot.
Stealer.T32

Piglet

  • 1337
  • *
  • Posts: 3258
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #7 on: November 21, 2024, 21:45 »
For me it's delete of F2 to get into the bios and then select the drive I want to boot from (if it's not the default one).

Annoyingly if I want to boot to Linux I find that I have the default set to windows - so after a few boots I get round to changing it. Then I want windows a few times in a row. Rinse and repeat...

dk uk

  • Newbie
  • *
  • Posts: 9
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #8 on: November 27, 2024, 20:54 »
Thanks for all the answers.
I've changed Bios to boot into Windows - I was just hoping that I could select Windows as default using the Linux boot menu (Grub?)

I suppose it's no great hardship as I'm likely to be infront of my PC on the ocassions I need Ubuntu...

  :)

Piglet

  • 1337
  • *
  • Posts: 3258
  • Country: gb
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #9 on: November 28, 2024, 10:03 »
You should be able to set Windows as default in grub:

https://help.ubuntu.com/community/Grub2#Configuring_GRUB_2

-Adler-

  • Junior Member
  • *
  • Posts: 47
  • Country: 00
Re: Documenting installing UT2004 64-bit on linux Ubuntu
« Reply #10 on: December 01, 2024, 11:21 »
small instructions:

e.c. current boot order:


Open a terminal (“CTRL” + “ALT” + “T.”) and enter the command.
Code: [Select]
sudo nano /etc/default/grub
Change default value:
Code: [Select]
GRUB_DEFAULT=2Since Windows is placed 3rd in the boot order and the order starts with 0, in the special case you change GRUB_DEFAULT from 0 to 2.



save changes:
Close the file with the F2 key and confirm saving with “Y” (Yes).
And also confirm “File name to save” with the ENTER key.

update grub:
After saving, the values ​​are written to the boot manager using the following command. A restart now results in Windows booting automatically.
Code: [Select]
sudo update-grub
grub menu after boot:
The preselection is set to 'Windows Boot Manager' in the GRUB boot menu.

-----------------------------------------------------------------
Sorry, but I don't trust anything that bleeds for five days and doesn't die.