UT99 Sound/UTGLR/FGLRX on Ubuntu Wily

Running UT99 natively in Linux has always been a dark art, more so of late with the increasing popularity of 64bit distributions.

The only agreed solutions for running a GL renderer seemed to be

  • Running an Nvidia card which is fine providing you already had an Nvidia card or where in the market for one.
  • The poor ATI (fglrx) users you could run the Software Driver.

Sound was interesting to set up, there are a couple of alternatives to the setup that we will list here. Our method will be done in such a way that it may be reused for other 32bit applications.

Our OS of choice is Ubuntu 64bit Wily 15.10 a Debian based distribution although the same approach should work for RPM based distributions the package names may change.

NB: When reading through this guide substitute <installpath> for the locate of your UT99 install, we cannot predict the location of each individual installation therefore we have chosen to list it as <installpath>.

Firstly lets configure UT99 to boot without sound in safe graphics mode (software) so we at least know it runs and can test everything else.

Graphics (Safe)

Edit <installpath>/System/UnrealTournament.ini => [Engine.Engine] section

GameRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice
WindowedRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice
RenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice

Launch the game from <installpath>/System/

$ ./ut-bin

This will launch the game with the software driver enabled, it’ll look like garbage but will be playable. If you game does not run, your issue is outside the scope of this guide but you are welcome to ask questions in the comments.

Once UT99 launches successfully it’s time to talk about sound, by default the system installs in a 64bit state, we will need the 32bit Pulse Audio libraries to enable sound for our 32bit UT99 (and other) applications

Configuring Sound for 32bit Applications

$ sudo apt-get install libpulseaudio:i386

Once installed we will create a new file called padsp32 in /usr/bin/ (using the existing padsp as base) this will become our application wrapper for 32bit applications

$ sudo cp /usr/bin/padsp /usr/bin/padsp32

Update our new padsp32 wrapper to use 32bit libraries locations instead of the existing 64bit

sed -i /x86_64-linux-gnu/i386-linux-gnu/g /usr/bin/padsp32

Launch UT99 (ut-bin) with our new wrapper

$ padsp32 ./ut-bin

With sound enabled we can now look at changing the renderer from software to OpenGL

Graphics (GL) UTGLR

This is what we want to use, it in the Enhanced OpenGL Renderer.

Edit <installpath>/System/UnrealTournament.ini [Engine.Engine] section

GameRenderDevice=OpenGLDrv.OpenGLRenderDevice
WindowedRenderDevice=OpenGLDrv.OpenGLRenderDevice
RenderDevice=OpenGLDrv.OpenGLRenderDevice

Once this is changed in the ini, if you try to run UT99, it will segfault (refer Technical Information on Failure Mode). To move UT99 into a working state with fglrx follow these steps,

Install the 32bit compatibility libraries – The GNU Standard C++ Library v3

 $ sudo apt-get install libstdc++5:i386

Symlink libstdc++5 to <installpath>/System/ as libstdc++6

$ ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 <installpath>/System/libstdc++6

This will stop UT99 linking to the newer libstdc library and segfaulting in Core.so

NB: While the renderer works, its worth nothing that you may boot to a black screen if you have StartupFullscreen=True or switch to fullscreen via the interface. I am currently forced to run in windowed mode when using the renderer. I am still looking into the settings to enable fullscreen play. If you have a solution please leave a comment.

Optional

Replace the shipped libSDL-1.1.so.0 with the system libSDL-1.2.so.0 for improved graphics.

$ ln -s /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 <installpath>/System/libSDL-1.1.so.0

Performing this step will do away with the washed out (or too dark) look from the standard SDL library giving more consistent colours.

From the Log

ScriptLog: Login: sairuk
Log: Possessed PlayerPawn: TMale1 CityIntro.TMale0
Init: Input system initialized for SDLViewport0
Log: Opening SDL viewport.
Log: Bound to OpenGLDrv.so
Log: Loaded render device class.
Log: Initializing OpenGLDrv...
Log: binding libGL.so.1
Log: Resizing SDL viewport. X: 1920 Y: 1080
Log: OpenGL
Init: GL_VENDOR     : ATI Technologies Inc.
Init: GL_RENDERER   : AMD Radeon HD 6900 Series
Init: GL_VERSION    : 2.1 (4.5.13416 Compatibility Profile Context 15.302)
Init: Device supports: GL_EXT_bgra
Init: Device supports: GL_ARB_texture_compression
Init: Device supports: GL_EXT_texture_compression_s3tc
Init: Device supports: GL_EXT_texture_env_combine
Init: Device supports: GL_ARB_texture_env_combine
Init: Device supports: GL_ATI_texture_env_combine3
Init: Device supports: GL_EXT_texture_lod_bias
Init: Device supports: GL_EXT_secondary_color
Init: Device supports: GL_ARB_multitexture
Init: Device supports: GL_SGIS_generate_mipmap
Init: Device supports: GL_EXT_multi_draw_arrays
Init: Device supports: GL_ARB_vertex_program
Init: Device supports: GL_ARB_fragment_program

Updates

2016-04-12 – UTGLR 3.6 Crashes when selecting servers from the server list, switched to UTGLR 3.1 201kb Version

Technical Information on the Failure Mode

Signal: SIGILL [illegal instruction]
 Aborting.

GDB with SDLGL Renderer

Program received signal SIGSEGV, Segmentation fault.
 0xf35b5908 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
 (gdb)
OpenGLDrv.OpenGLRenderDevice
Signal: SIGSEGV [segmentation fault]
 Aborting.
 Segmentation fault (core dumped)

GDB with OpenGL Renderer

Program received signal SIGSEGV, Segmentation fault.
 0xf35b5908 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
 (gdb)

ldd ./ut-bin

 linux-gate.so.1 => (0xf77ce000)
 libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7796000)
 libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xf777b000)
 libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf775d000)
 Engine.so => ./Engine.so (0xf7504000)
 Core.so => ./Core.so (0xf7395000)
 libSDL-1.1.so.0 => ./libSDL-1.1.so.0 (0xf72f6000)
 libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf72a9000)
 libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf70ed000)
 /lib/ld-linux.so.2 (0x5661b000)
 libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf6fa2000)
 libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf6f8d000)
 libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6f68000)
 libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6f64000)
 libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6f5c000)

OpenGL Renderers Available

28bb439b47b2ec27c35a4a2b809ee64c  OpenGLDrv_org.so
6cf1e3685f772142b54a0b38cb8cd609  OpenGLDrv_server.so
e4b2afac1ff7bdf90e67cb018682315c  OpenGLDrv_utglr31.so
42e1e4c5a1dbdd7f1e7f522cbede278a  OpenGLDrv_utglr31_201kb_version.so
7827b83663cbf0e18283eb3c1b403bda  OpenGLDrv_utglr36.so

My current OpenGLDrvb.so

42e1e4c5a1dbdd7f1e7f522cbede278a  OpenGLDrv_utglr31_201kb_version.so

dmesg output

[ 6192.418458] ut-bin[30957]: segfault at a6c ip 00000000f7343407 sp 00000000ffbd3240 error 4 in Core.so[f72c2000+af000]
[ 8929.575439] ut-bin[7566]: segfault at a6c ip 00000000f7417407 sp 00000000ffa0c820 error 4 in Core.so[f7396000+af000]
[ 8984.377251] ut-bin[7572]: segfault at a6c ip 00000000f73bb407 sp 00000000ff8781d0 error 4 in Core.so[f733a000+af000]
[ 9013.430918] ut-bin[7578]: segfault at a6c ip 00000000f73c7407 sp 00000000ffc5db90 error 4 in Core.so[f7346000+af000]
[ 9023.865180] ut-bin[7581]: segfault at a6c ip 00000000f7387407 sp 00000000ffb50590 error 4 in Core.so[f7306000+af000]
[ 9461.324101] ut-bin[7632]: segfault at a6c ip 00000000f740b407 sp 00000000ffee65d0 error 4 in Core.so[f738a000+af000]
[ 9639.089379] ut-bin[7668]: segfault at a6c ip 00000000f73a1407 sp 00000000ffcad990 error 4 in Core.so[f7320000+af000]
[ 9662.563195] ut-bin[7676]: segfault at a6c ip 00000000f7333407 sp 00000000ffc67550 error 4 in Core.so[f72b2000+af000]
[ 9668.315174] ut-bin[7679]: segfault at a6c ip 00000000f72f6407 sp 00000000ffbbb110 error 4 in Core.so[f7275000+af000]
[ 9692.302126] ut-bin[7684]: segfault at a6c ip 00000000f73a6407 sp 00000000fff84890 error 4 in Core.so[f7325000+af000]
[ 9728.463229] ut-bin[7692]: segfault at a6c ip 00000000f72f1407 sp 00000000ff86af50 error 4 in Core.so[f7270000+af000]
[ 9748.096943] ut-bin[7696]: segfault at a6c ip 00000000f723e407 sp 00000000ffc36610 error 4 in Core.so[f71bd000+af000]
[ 9870.735280] ut-bin[7716]: segfault at a6c ip 00000000f733e407 sp 00000000ffc35b50 error 4 in Core.so[f72bd000+af000]
[10203.456761] ut-bin[7817]: segfault at a6c ip 00000000f7344407 sp 00000000ffe623d0 error 4 in Core.so[f72c3000+af000]

ATI Packages installed

dpkg -l | grep fglrx
 ii  fglrx                                                       2:15.302-0ubuntu1                          amd64        Video driver for the AMD graphics accelerators
 ii  fglrx-amdcccle                                              2:15.302-0ubuntu1                          amd64        Catalyst Control Center for the AMD graphics accelerators
 ii  fglrx-core                                                  2:15.302-0ubuntu1                          amd64        Minimal video driver for the AMD graphics accelerators
 ii  fglrx-dev                                                   2:15.302-0ubuntu1                          amd64        Video driver for the AMD graphics accelerators (devel files)
 rc  fglrx-updates                                               2:15.201-0ubuntu2~15.10.2                  amd64        Video driver for the AMD graphics accelerators
 rc  fglrx-updates-core                                          2:15.201-0ubuntu2~15.10.2                  amd64        Minimal video driver for the AMD graphics accelerators

uname -a

Linux insertcredit 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15 22:15:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Addition Information updated 15/04/2016 GLIBC error in fglrx after numerous execution of OpenGL

$ strings /usr/lib32/fglrx/dri/fglrx_dri.so | grep GLIB
GLIBC_2.2
GLIBC_2.1
GLIBC_2.0
GLIBCXX_3.4
GLIBC_2.1.1
GLIBC_2.1.3

$ LIBGL_DEBUG=1 ./ut-bin 
libGL error: OpenDriver: failed to open /usr/lib/fglrx/dri/fglrx_dri.so, error[/usr/lib/fglrx/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
libGL error: OpenDriver: failed to open /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so, error[/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
libGL error: OpenDriver: failed to open /usr/lib/dri/fglrx_dri.so, error[/usr/lib/dri/fglrx_dri.so: wrong ELF class: ELFCLASS64]
libGL error: OpenDriver: failed to open /usr/lib32/fglrx/dri/fglrx_dri.so, error[./libstdc++.so.6: version `GLIBCXX_3.4' not found (required by /usr/lib32/fglrx/dri/fglrx_dri.so)]
libGL error: OpenDriver: failed to open /usr/lib/i386-linux-gnu/dri/fglrx_dri.so, error[/usr/lib/i386-linux-gnu/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
libGL error: OpenDriver: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
libGL error: OpenDriver: failed to open /usr/lib/dri/fglrx_dri.so, error[/usr/lib/dri/fglrx_dri.so: wrong ELF class: ELFCLASS64]
libGL error: OpenDriver: failed to open /usr/X11R6/lib32/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib32/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
libGL error: OpenDriver: failed to open /usr/lib32/dri/fglrx_dri.so, error[/usr/lib32/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]

References for UT99 Sound/UTGLR/FGLRX on Ubuntu Wily

Leave a Reply

Your email address will not be published. Required fields are marked *