Page 1 of 1

SOLVED!! [LINUX] U227f and UT2004 3369 - no sound - no /dev/dsp - WTF

Posted: Thu Oct 21, 2010 3:22 pm
by Skw
Congrats OldUnreal! This is your 1000st topic!!

Long story:

First I made a test-install of Ubuntu 10.10 x86 on my laptop Acer Aspire 7520G. When everything was fine (graphics accelration works ok), I installed Unreal there and patched it with 227f with Linux-binaries.

I did a quick test if U227f is really working on my laptop. Linux binaries works great but there is no sound. I checked DefaultLinux.ini, and in FMod-settings there is /dev/dsp selected. I though "whatever" and installed wine and started to use Unreal thru wine. Everything works fine. Ok.

Next day I tested UT 436 on the laptop, installed OldUnreal multimedia patch. I just directly choosed to use wine and it works great.

Then next day I installed UT2004, patched it with 3369 Windows patch. Tested it with wine. It works awesome, expect there is wierd mouse problem. Mouse cursor will not be locked in the game screen, it may go over window's edge to the desktop and then I cannot move my character until I move the cursor back to the window. This happens in fullscreen too.

There was no solution to it so I though "is there UT2004 Linux-binaries?". I found there really is official Linux-binaries for UT2004.

So I installed 3369-Linux patch to UT2004. There was a problem; game didn't start. It said:

Code: Select all

ut2004-bin: error while loading shared libraries: ./libSDL-1.2.so.0: cannot open shared object file: No such file or directory
Okay, let's find a solution for that.

I typed:

Code: Select all

sudo cp /usr/lib/libSDL-1.2.so.0 /path/to/ut2004/system
Okay, that copied the file what made UT2004 crash on startup to UT2004/System-folder.

Then I copied a launcher sh-script from some forum. I just made an empty file to UT2004-folder and copy&pasted this there:

Code: Select all

#!/bin/sh
#
# ut2004 startup script
#

# Function to find the real directory a program resides in.
# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
FindPath()
{
    fullpath="`echo $1 | grep /`"
    if [ "$fullpath" = "" ]; then
        oIFS="$IFS"
        IFS=:
        for path in $PATH
        do if [ -x "$path/$1" ]; then
               if [ "$path" = "" ]; then
                   path="."
               fi
               fullpath="$path/$1"
               break
           fi
        done
        IFS="$oIFS"
    fi
    if [ "$fullpath" = "" ]; then
        fullpath="$1"
    fi

    # Is the sed/ls magic portable?
    if [ -L "$fullpath" ]; then
        #fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
        fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'`
    fi
    dirname $fullpath
}

# Set the home if not already set.
if [ "${UT2004_DATA_PATH}" = "" ]; then
    UT2004_DATA_PATH="`FindPath $0`/System"
fi

LD_LIBRARY_PATH=.:${UT2004_DATA_PATH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

# Let's boogie!
if [ -x "${UT2004_DATA_PATH}/ut2004-bin" ]
then
    cd "${UT2004_DATA_PATH}/"
    exec "./ut2004-bin" $*
fi
echo "Couldn't run UT2004 (ut2004-bin). Is UT2004_DATA_PATH set?"
exit 1

# end of ut2004 ...
I set UT2004_DATA_PATH="/path/to/ut2004/system" (just typed it before "# Set the home if not already set."-line).

Then I started the game with command "sh ". This time it complained:

Code: Select all

ut2004-bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
I typed:

Code: Select all

sudo apt-get install libstdc++5
And same time I set some settings in UT2004-linux's Default.ini:

Code: Select all

FirstRun=3369
RenderDevice=OpenGLDrv.OpenGLRenderDevice
ViewportManager=SDLDrv.SDLClient
PurgeCacheDays=0
StartupFullscreen=False
and resolution
Then I started the game. Voila!! It worked flawlessly. But big disappointment: NO SOUND. Exactly same problem like in U227f-linux.

Okay, I started to find a solution for that. First I checked if something was muted or set wrong. I listened my music and watched some YouTube-videos. Sound was fine there.

Then I typed:

Code: Select all

sudo apt-get install libsdl1.2debian-alsa
That command removed my libsdl1.2debian-pulseaudio and installed libsdl1.2debian-alsa.

Tested UT2004-linux again. No sound. Rebooted. Tested. Still no sound.

Then I went crazy and gave this command:

Code: Select all

sudo apt-get install libsdl1.2debian-all
I got worried and tested eveything again; music, YouTube, if there is anything muted or anything. They were fine. I also tested if UT-wine or Unreal-wine still sounds fine. Something went totally wrong. Unreal-wine and UT-wine sounded totally mess.

I rebooted and tested Unreal-wine and UT-wine again; they were fine. Phew.

Tested UT2004-linux. No sound.

Then I typed:

Code: Select all

sudo apt-get autoremove libsdl1.2debian-all
Then:

Code: Select all

sudo apt-get install libsdl1.2debian-alsa
Rebooted. Tested everything. Everything else fine, expect no sound from UT2004-linux and U227f-linux.

I found there is alsamixer, so I gave "alsamixer"-command to Linux. It started a sound mixer. I checked if there's anything wrong. Nothing wrong. I tried to kill other sound systems if they steal sound, but it's impossible; they are not installed. Only sound system, which is installed, is ALSA. I checked if there is "/dev/dsp" like FMod-settings in DefaultLinux.ini in U227f says.

There is no such a file or a folder or symlink or anything similar.

It seems alot people don't have sound in their UT2004-linux, because "/dev/dsp" is missing. This also kills sound from U227f-linux. I have checked, double-checked and triple-checked settings and tested zillion different variation of settings in U227f-linux and UT2004-linux.

Anyone here have a solution? Anyone here have same problem?

Re: [LINUX] U227f and UT2004 3369 - no sound - no /dev/dsp - WTF

Posted: Thu Oct 21, 2010 3:39 pm
by Smirftsch
/dev/dsp is OSS- maybe your distro doesn't install support for it since it counts mostly as deprecated- 227g has better support for ALSA which is more common nowadays.
Check your distro for OSS.

Re: [LINUX] U227f and UT2004 3369 - no sound - no /dev/dsp - WTF

Posted: Thu Oct 21, 2010 3:42 pm
by Skw
/dev/dsp is OSS- maybe your distro doesn't install support for it since it counts mostly as deprecated- 227g has better support for ALSA which is more common nowadays.
Check your distro for OSS.
OMG! I was just coming to that. Before I started this topic, I was thinking "what if I install OSS?". Ok, I give a test.

But there is one thing: UT2004 should work directly with ALSA. Is OSS some kind ALSA-emulator?

EDIT

Okay, I tested OSS:

Code: Select all

sudo apt-get install libsdl1.2debian-oss
That command removed ALSA and installed OSS. Rebooted. Did some tests and finally tested UT2004-linux; NO SOUND. Tested U227f; same problem.

There is still no "/dev/dsp".

EDIT

SOLUTION FOUND FOR UT2004-LINUX-3369!!!!!

Amazing. I found a simple solution. After searching things about OpenAL I found that UT2004/System/openal.so was missing.

Before fixing that I removed OSS and installed ALSA back:

Code: Select all

sudo apt-get install libsdl1.2debian-alsa
Then THE solution:

Code: Select all

sudo cp /usr/lib/libopenal.so.1 /path/to/ut2004/System/openal.so
And sound started to work. Everything is great now.

I am gonna do later same thing for U227f and then report here, expect if Smirf is faster.

EDIT

Okay, now Unreal 1 227f is tested with OpenAL while:

Code: Select all

sudo cp /usr/lib/libopenal.so.1 /path/to/u227f/System/openal.so
AudioDevice=ALAudio.ALAudioSubsystem
and using same launcher like ut2004, expect little modified
But Unreal crashes at startup:

Code: Select all

Error: Caught a C++ exception in main()!

Developer Backtrace:
[ 1]  ./Core.so(_Z12HandleSignali+0x141) [0x3e8577]
[ 2]  [0x958400]
[ 3]  ./libSDL-1.2.so.0(SDL_SetGammaRamp+0x23) [0xa25cf3]
[ 4]  ./OpenGLDrv.so(_ZN19UOpenGLRenderDevice8SetGammaEf+0xf0) [0xcc7b2c]
[ 5]  /lib/libc.so.6(__libc_start_main+0xe7) [0x5c0ce7]
[ 6]  ./UnrealLinux.bin(__gxx_personality_v0+0xd5) [0x804ffd1]
Signal: SIGSEGV [segmentation fault]
Aborting.
So I removed openal.so and tested again if OpenAL is working out-of-box. It was no go. Then tried without launcher. No luck. Then switched back to FMod (which makes no sense because it's not ALAudio), tested, but no sound. Then tested it again with launcher. Nothing.

Smirf! How U227f calls OpenAL? Does it call "openal.so" or how "openal.so" should be named?

EDIT

Okay, I just noticed that U227f/System has "libopenal.so" so I try renaming "openal.so" to that...

EDIT

Tested! Same crash. I also noticed that 227f has "libfmod.so" and "libfmod-3.75.so". I checked if my distribution has fmod libaries, but seems my dist doesn't have fmod libaries. So:

Code: Select all

wget http://www.fmod.org/index.php/release/version/fmodapi42630linux.tar.gz
tar -xvzf fmodapi42630linux.tar.gz
cd fmodapi42630linux
sudo make install
Installer said:

Code: Select all

Installing FMOD Ex libraries and headers...
cp -f api/lib/libfmodex-4.26.30.so /usr/local/lib
cp -f api/lib/libfmodexp-4.26.30.so /usr/local/lib
ldconfig -n /usr/local/lib
mkdir -p /usr/local/include/fmodex
cp -f api/inc/*.h* /usr/local/include/fmodex
done.
Switched U227f back to FMod, then tested. No sound. Tested if replacing fmod.so with one of those files fixes sound, but it only makes Unreal crash.

Re: SOLVED!! [LINUX] U227f and UT2004 3369 - no sound - no /dev/dsp - WTF

Posted: Sat Nov 13, 2010 9:34 pm
by JPL
It's unclear from your post if you actually managed to get Unreal 227f running with sound... how did that go?

I got sound working on Ubuntu 10.10 by doing the following:
1. set AudioDevice=ALAudio.ALAudioSubsystem in System/UnrealLinux.ini
2. run UnrealLinux.bin with this command line:
padsp ./UnrealLinux.bin

Pretty sure this forces PulseAudio to allow access to /dev/dsp.

Re: SOLVED!! [LINUX] U227f and UT2004 3369 - no sound - no /dev/dsp - WTF

Posted: Sun Nov 14, 2010 8:22 am
by Skw
It's unclear from your post if you actually managed to get Unreal 227f running with sound... how did that go?

I got sound working on Ubuntu 10.10 by doing the following:
1. set AudioDevice=ALAudio.ALAudioSubsystem in System/UnrealLinux.ini
2. run UnrealLinux.bin with this command line:
padsp ./UnrealLinux.bin

Pretty sure this forces PulseAudio to allow access to /dev/dsp.
Naturally you did read whole story twice? I didn't solve U227f problem, I solved UT2004 problem. My solution to U227f: Use wine.

I have Alsa.