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 .ut2004 (dot ut2004). I'd already got the ut2004-bin-linux-amd64 executable from the linux 3369 patch (https://miasma.rocks/downloads/ut2004-lnxpatch3369-2.tar.bz2). Made it executable:
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:
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 ./openal.so
4. Created a file "cdkey" in ~/.ut2004/System directory containing my CD Key
5. Edited UT2004.ini for opengl and alaudio:
[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. Text to speech (optional):
Under [SDLDrv.SDLClient] in ~/.ut2004/System/UT2004.ini:
[SDLDrv.SDLClient]
TextToSpeechFile=/home/youruserid/tts.txt
As a one-off create the file:
touch ~/tts.txt
In the command line, before starting UT:
echo "Starting" > ~/tts.txt; tail -f ~/tts.txt | while read line; do echo "$line" | festival --tts; done;
8. 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:
sudo cpupower frequency-set --governor performance
Run:
cd ~/.ut2004/System/
./ut2004-bin-linux-amd64
Updated with a link to the v3369 linux patch. That has both the 32 bit and 64 bit versions of both client and server.
Here's an update for 32 bit UT2004 on 64 bit Ubuntu, and for running either that or 64 bit UT:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libstdc++5:i386 libsdl1.2-compat:i386 libopenal1:i386 libgl1:i386
edit: When I lost sound, after having it working fine for ages, I fixed it by adding adding drivers=alsa in to /etc/openal/alsoft.conf, which made it start working again. You'll need to sudo edit the file. For me the drivers section was about line 54
To run 32 bit, I execute this:
#!/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:
#!/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 ./openal.so
./ut2004-bin-linux-amd64
To make it even smoother you can run this before UT:
sudo cpupower frequency-set --governor performance
and this afterwards, to return to power saving mode:
sudo cpupower frequency-set --governor powersave
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:
sudo cpupower -c 1 frequency-set --governor performance
#!/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:
sudo cpupower -c 1 frequency-set --governor powersave
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...
Quote from: dk uk 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...
RealvNc is also available for Linux:https://www.realvnc.com/de/connect/download/viewer/linux/ (https://www.realvnc.com/de/connect/download/viewer/linux/)
How to Change Default Boot OS in Dual Boot: Linux or Windows
Quote from: dk uk 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...
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.
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...
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...
:)
You should be able to set Windows as default in grub:
https://help.ubuntu.com/community/Grub2#Configuring_GRUB_2
small instructions:
e.c. current boot order:
(https://i.ibb.co/vqWdh6c/01-Grub-Boot-Order.png)
Open a terminal ("CTRL" + "ALT" + "T.") and enter the command.
sudo nano /etc/default/grub
Change default value:
GRUB_DEFAULT=2
Since 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.
(https://i.ibb.co/2gXM7Pt/02-Grub-Editor.png)
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.
sudo update-grub
grub menu after boot:
The preselection is set to 'Windows Boot Manager' in the GRUB boot menu.
(https://i.ibb.co/N76024F/03-Grub-Boot-Men.png)
Quote from: Gil-galad on February 21, 2023, 01:12
So, aside from text to speech (doesn't work in Linux),
Under [SDLDrv.SDLClient] in UT2004.ini:
[SDLDrv.SDLClient]
TextToSpeechFile=/home/youruserid/tts.txt
In the command line, before starting UT:
echo "Starting" > ~/tts.txt; tail -f ~/tts.txt | while read line; do echo "$line" | festival --tts; done;
Quote from: Piglet on November 09, 2024, 22:31
...
sudo cpupower -c 1 frequency-set --governor powersave
This doesn't work correctly, at least on my system.
Even though the governor is changed, the CPU keeps boosting until I toggle the power plans.
Same behavior with a single core or all cores. I suggest you check it. You can use `turbostat` to see the package power or my Core Temp utility for that or any other hardware monitor utility I guess.
Here are a few screenshots, note Power, Frequency and VID fields.
Before doing anything, idle, Balanced power plan:
(https://i.imgur.com/K0vMPuU.png)
While UT is in main menu (core 14):
(https://i.imgur.com/FryvABD.png)
After exiting game and calling 'sudo cpupower -c 14 frequency-set --governor powersave'
(https://i.imgur.com/aqIyluS.png)
After toggling power mode:
(https://i.imgur.com/AjMwJSo.png)
It depends on BIOS and kernel - if you have CPPC1+2 enabled in BIOS, i believe the latest versions of the kernel will use amd_pstate+schedutil as default governor, in this case powersave will not disable boost
If you want the "legacy" behavior, you will have to disable CPPC from BIOS
edit: legacy is called acpi-cpufreq
I have no intention of switching to legacy behavior.
I'm no Linux pro, but if you can switch the power profile from the UI, it should be possible to toggle it the same way with a command.
I tried looking for how it's done, and found this:
https://ubuntuhandbook.org/index.php/2023/10/command-cpu-power-mode-ubuntu-22-04/
Haven't tried it myself yet. You either need to install powerprofilesctl or run a convoluted command, I guess this isn't really an issue as this would be executed as a script anyway.
This works for me:
gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'power-saver'>"
sleep 0.1
gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'balanced'>"
@The_Coolest, what utility is that you're using to see the information?
it seems to change the "Bzy_MHz" for me. This with UT running on thread 5:
sudo turbostat -c 5
....
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 183 7.60 2411 3400 1.41 2789 0 2440 0.00 92.66 0.54 27.18
5 5 183 7.60 2411 3400 1.41 2789 0 2440 0.00 92.66 0.54 27.18
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 1464 62.24 2352 3400 1.48 9392 0 5605 0.00 38.46 1.33 29.28
5 5 1464 62.24 2352 3400 1.48 9392 0 5605 0.00 38.46 1.33 29.28
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2884 99.95 2886 3400 1.28 5426 0 10 0.00 0.05 2.92 30.83
5 5 2884 99.95 2886 3400 1.28 5426 0 10 0.00 0.05 2.92 30.83
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2884 100.00 2884 3400 1.26 5400 0 0 0.00 0.00 2.90 31.06
5 5 2884 100.00 2884 3400 1.26 5400 0 0 0.00 0.00 2.90 31.06
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2863 99.71 2871 3400 1.29 5446 0 73 0.00 0.29 2.88 30.77
5 5 2863 99.71 2871 3400 1.29 5446 0 73 0.00 0.29 2.88 30.77
sudo cpupower -c 5 frequency-set --governor performance
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 3644 100.00 3644 3400 1.26 5407 0 0 0.00 0.00 5.61 36.55
5 5 3644 100.00 3644 3400 1.26 5407 0 0 0.00 0.00 5.61 36.55
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 4418 100.00 4418 3400 1.24 5407 0 0 0.00 0.00 8.28 42.82
5 5 4418 100.00 4418 3400 1.24 5407 0 0 0.00 0.00 8.28 42.82
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 4413 100.00 4413 3400 1.24 5404 0 3 0.00 0.00 8.25 42.32
5 5 4413 100.00 4413 3400 1.24 5404 0 3 0.00 0.00 8.25 42.32
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 4408 99.96 4410 3400 1.24 5395 0 4 0.00 0.04 8.22 42.11
5 5 4408 99.96 4410 3400 1.24 5395 0 4 0.00 0.04 8.22 42.11
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 4209 100.00 4209 3400 1.25 5399 0 0 0.00 0.00 7.53 41.00
5 5 4209 100.00 4209 3400 1.25 5399 0 0 0.00 0.00 7.53 41.00
sudo cpupower -c 5 frequency-set --governor powersave
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2882 100.00 2882 3400 1.29 5400 0 0 0.00 0.00 2.89 30.89
5 5 2882 100.00 2882 3400 1.29 5400 0 0 0.00 0.00 2.89 30.89
Core CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2882 100.00 2882 3400 1.29 5407 0 0 0.00 0.00 2.89 31.03
5 5 2882 100.00 2882 3400 1.29 5407 0 0 0.00 0.00 2.89 31.03
^CCore CPU Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ POLL C1 POLL% C1% CorWatt PkgWatt
- - 2903 99.81 2908 3400 1.29 3541 0 10 0.00 0.20 3.14 32.29
5 5 2903 99.81 2908 3400 1.29 3541 0 10 0.00 0.20 3.14 32.29
It's Core Temp, it's WIP being ported to Linux.
If you want to check it out, feel free (check README for instructions) and note that the current build spams dmesg.
https://www.alcpu.com/CoreTemp/CoreTemp-1-19-4-Linux.zip
When I lost sound on 32 bit UT, after having it working fine for ages, I fixed it by adding adding drivers=alsa in to /etc/openal/alsoft.conf, which made it start working again. You'll need to sudo edit the file. For me the drivers section was about line 54
Note to self: To set specific frequency range on the core used for UT
sudo cpupower -c 5 frequency-set -d 4450MHz -u 4550MHz -g performance
Favorites::ImportText: Bad termination in: (ServerID=0,IP="80.4.151.145",Port=4777,QueryPort=4778,ServerName="@@[��M��i��A@@] ��W��A��R��F��A��R��E xxNkko ]]BPPeCCr55s((e��r
appMsgf(): Your CD key appears to be invalid. You will need to reinstall the game and enter your CD key to fix this problem.
Signal: SIGTRAP [trap]
Aborting.
any ideas how to fix the above - i didnt know what file type piglet used for the cdkey so i used a .txt file - what should i have used????
4. Created a file "cdkey" in ~/.ut2004/System directory containing my CD Key
You can ignore the "bad termination" line. That just lets you know there's a duff line in favourites that isn't being parsed. I just edited/removed lines that game that that sort of output
i have change my libraries to 32bit game now loads but i have insanely low fps -- 20fps and ideas what is wrong???
I've just had a quick look through this thread, and I'm pretty impressed - I've tried running games like UT on Linux before, and it's never worked without agony and suffering.
I might give this a go, considering how I have a laptop that won't support Windows 11, and I don't feel entirely comfortable keeping it on Windows 10 since support ends October this year (AFAIK).
Whilst these instructions should work for the versions of linux specified in the notes, do be careful not to get a much more recent version of Ubuntu than detailed as some of the libraries needed would need additional work to get running - they're not available in later versions. i.e. you may need to go back to source and recompile them yourself!
Or install windows 11 with cpu and tpm2 check disabled on install.
Doesn't patched Windows 11 (with TPM requirements removed) have issues with things such as getting important updates?