View Full Version : Regnum has no sound (Kubuntu Hardy Heron)
SilverDrake3
06-03-2008, 07:24 PM
Everything else about the game works fine for me. I have sound in other applications, and I can even listen to music while playing. I've checked the options in-game, and sound/music is enabled. I've already tried modifying /etc/modprobe.d/alsa-base
options snd-hda-intel model=XXXXX
Using this list as reference:
ALC883/888
---
3stack-dig 3-jack with SPDIF I/O
6stack-dig 6-jack digital with SPDIF I/O
3stack-6ch 3-jack 6-channel
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
6stack-dig-demo 6-jack digital for Intel demo board
acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
acer-aspire Acer Aspire 9810
medion Medion Laptops
medion-md2 Medion MD2
targa-dig Targa/MSI
targa-2ch-dig Targs/MSI with 2-channel
laptop-eapd 3-jack with SPDIF I/O and EAPD (Clevo M540JE, M550JE)
lenovo-101e Lenovo 101E
lenovo-nb0763 Lenovo NB0763
lenovo-ms7195-dig Lenovo MS7195
haier-w66 Haier W66
6stack-hp HP machines with 6stack (Nettle boards)
3stack-hp HP machines with 3stack (Lucknow, Samba boards)
auto auto-config reading BIOS (default)
nothing seems to work right, and I don't know what to do now. Any help would be appreciated.
gamemod
06-03-2008, 07:42 PM
Hi SilverDrake3,
Try executing Regnum this way:
aoss ./rolauncher
or you can edit the file /etc/openalrc adding semicolons to the beginning of each line and then add:
(define devices '(oss))
(define alsa-out-device "default")
Regards.
Froste
06-03-2008, 07:58 PM
or you can edit the file /etc/openalrc
Tsk tsk, better to edit the overriding file in a user's home, ie ~/.openalrc (:
gamemod
06-03-2008, 08:02 PM
Tsk tsk, better to edit the overriding file in a user's home, ie ~/.openalrc (:
I forgot that I only use Xmms and Regnum for sound on Linux :)
Froste is right, create an overriding file.
Regards.
SilverDrake3
06-03-2008, 08:22 PM
I don't see an ~/.openalrc
O.o
gamemod
06-03-2008, 08:26 PM
I don't see an ~/.openalrc
O.o
You've got to create it and add the lines I stated before :)
Regards.
SilverDrake3
06-03-2008, 09:05 PM
You've got to create it and add the lines I stated before :)
Regards.
Does it matter that I can't even find a file in /etc/openalrc ?
Mikan
06-03-2008, 09:07 PM
Does it matter that I can't even find a file in /etc/openalrc ?
No.
Furthermore, Ubuntu uses Pulseaudio by default, which causes no end of problems for applications that need ALSA compatibility (it's compatibility layer for ALSA is no where near 100% half of the time).
Regnum uses OpenAL (libopenal) which in turn uses ALSA by default, and does not support Pulseaudio natively.
This solution is best fixed by simply removing all of the Pulseaudio packages and rebooting, then every single one of your applications should have 100% working sound. (You will also likely not need gamemod's fix. :))
Ubuntu makes a few stupid decisions, this is one of them.
Regards.
SilverDrake3
06-03-2008, 09:50 PM
Great :/ this is gonna take me a bit.
Apparently most of my preferred audio/video playback programs -require- Pulseaudio
Maybe I can live without sound in Regnum.
gamemod
06-04-2008, 12:56 AM
Maybe I can live without sound in Regnum.
Please, follow this steps:
Open a terminal.
Type:
sudo kedit ~/.openalrc
Then, into the file add this two lines:
(define devices '(oss))
(define alsa-out-device "default")
That should work.
Regards.
Znurre
06-04-2008, 11:38 AM
If you do not have /etc/openalrc it seems like you haven't even got the openal libs installed.
Did you check that?
Please refer to this post if nothing else works or you don't want to uninstall Pulseaudio. After the latest regnum patch i did not get any crashes using this lib.
http://www.regnumonline.com.ar/forum/showthread.php?t=23171
SilverDrake3
06-04-2008, 05:56 PM
Alright, I installed the openal libs and created a file in my home folder named .openalrc with the following contents:
(define devices '(oss))
(define alsa-out-device "default")
That seems to have done it! Thanks! :D
cogadh
06-15-2008, 04:05 AM
Furthermore, Ubuntu uses Pulseaudio by default...
Not Kubuntu, it still uses ALSA.
blaise69
10-16-2008, 10:59 AM
Hello, I use Ubuntu 8.04 with PulsAudio,
I've tried adding in the comments in the above post to my .openalrc, and I've also tried running Regnum with aoss ./rolauncher.
Either way I do not get sound, and I have checked my volume levels.
with the edited .openalrc the game runs fine but without sound.
with aoss ./rolauncher, the game crashes when I select my game server, this is the output of the log file.
libs/libcore_client.so(_ZN10ClientBase14save_backtraceE v+0x79) [0xb7dea519]
libs/libcore_client.so(_ZN10ClientBase12client_crashEi+ 0x1b) [0xb7deabcb]
[0xb7fe3420]
/lib/tls/i686/cmov/libc.so.6(__uflow+0x81) [0xb706b621]
/lib/tls/i686/cmov/libc.so.6(getc+0xac) [0xb706520c]
libs/liblua51.so(luaL_loadfile+0x2d4) [0xb72ad424]
libs/libresource_system_extension.so(_ZN13ScriptManager 10lua_dofileEP9lua_State+0xbf) [0xb77dbeff]
libs/liblua51.so [0xb7296d6c]
libs/liblua51.so [0xb7297756]
libs/liblua51.so [0xb728c474]
libs/liblua51.so [0xb7295f93]
libs/liblua51.so [0xb7296009]
libs/liblua51.so(lua_cpcall+0x4c) [0xb728c3ec]
libs/libresource_system_extension.so(_ZN13ScriptManager 10run_scriptEP9lua_StatePKc+0xdb) [0xb77dcc6b]
libs/libresource_system_extension.so(_ZN13ScriptManager 6dofileEP9lua_State+0x3d) [0xb77ddb0d]
libs/liblua51.so [0xb7296d6c]
libs/liblua51.so [0xb7297756]
libs/liblua51.so [0xb728c4b1]
libs/liblua51.so [0xb7295f93]
libs/liblua51.so [0xb7296009]
libs/liblua51.so(lua_pcall+0x8d) [0xb728cb9d]
libs/libentity_system.so(_ZN9LuaEntity4callEii+0x3a8) [0xb75b8298]
libs/libentity_system.so(_ZN9LuaEntity6dofileEPKc+0x69) [0xb75b8d39]
libs/libentity_system.so(_ZN9LuaEntity10run_scriptEPKc+ 0x33) [0xb75bd2d3]
libs/libconsole.so(_ZN7Console15creation_notifyEP7Messa ge+0x122) [0xb75edcc2]
libs/libentity_system.so(_ZN13EntityManager32initialize _entity_as_custom_typeEPKciS1_P7MessageP6Entity+0x 44c) [0xb759bf6c]
libs/libentity_system.so(_ZN13EntityManager27register_i nitialized_entityEPKciP6EntityP7Message+0x43) [0xb759cda3]
libs/libcommon_entities.so(_ZN24ApplicationManagerEntit y34start_application_entity_with_infoEPN17Applicat ionEntity4DataEP7MessageP10EntityInfo+0x93) [0xb7c43113]
libs/libcommon_entities.so(_ZN24ApplicationManagerEntit y18launch_applicationEP7Message+0x402) [0xb7c43dd2]
libs/libentity_system.so(_ZN6Entity22input_message_inte rnalEP7Message+0x71c) [0xb759449c]
libs/libentity_system.so(_ZN6Entity13input_messageEP7Me ssage+0x22) [0xb7591282]
libs/libentity_system.so(_ZN6Entity13input_messageEPKcP 7Message+0x3f) [0xb75915ef]
libs/libregnum_client.so(_ZN10GameClient19initialize_en titiesEv+0x1375) [0xb7f757e5]
libs/libregnum_client.so(_ZN10GameClient4initEiPPc+0x87 6) [0xb7f775b6]
libs/libregnum_client.so(_ZN10GameClientC1EiPPc+0xf3) [0xb7f78353]
./game(main+0x25a) [0x8048f7a]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7019450]
./game(__gxx_personality_v0+0x65) [0x8048c21]
Mikan
10-16-2008, 12:15 PM
For those on Ubuntu+KDE who are having this problem...
It is important to know the problem to begin with.
Where it all starts is embedded audio, that is a sound card that is embedded into your motherboard (which is the case with 99% of all computers these days, especially laptops), and these kinds of sound solutions do not support more than 1 hardware "voice" mixed by the sound card.
This means that more than one application cannot be using the sound hardware at one time and it is not possible to get sound from multiple programs without using a software mixer such as the one built-in to (and enabled by default in) ALSA. This is very nasty, but there is some ways around it.
The solution that people came up with was sound managers, known as sound servers. These would perform software mixing from multiple applications and then send it to the sound card as one stream. However, they were all very incompatible with one another, and attempting to use multiple applilcations that used different sound servers failed horribly. This is where all issues come from today.
---
Creating a solution:
(The first step is always to disable all "sound managers" and other annoying garbage.)
Firstly, go to KDE's sound system configuration and turn on auto-suspend after 0 seconds.
http://img509.imageshack.us/img509/5401/snapshot97wl2.th.png (http://img509.imageshack.us/my.php?image=snapshot97wl2.png)http://img509.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
This makes sure that KDE's sound manager does not hog the sound card for too long after the sound plays. It is also recommended you do not use KDE's sound manager at all. You can make an external script or program (that is ALSA-compatible) play KDE's sounds instead under notifications configuration.
http://img509.imageshack.us/img509/3356/snapshot96qh8.th.png (http://img509.imageshack.us/my.php?image=snapshot96qh8.png)http://img509.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
KDE Sound Player.sh:
#!/bin/bash
TYPE=`file -bi "$1"`
if [ "$TYPE" = "audio/x-wav" ] ; then
aplay -q "$1"
# elif [ "$TYPE" = "application/ogg" ] ; then
# ogg123 -q "$1"
else
mplayer -nogui -quiet -really-quiet -vc dummy -vo null -noconsolecontrols "$1"
fi
Second, install OpenAL Soft from here (http://kcat.strangesoft.net/openal.html).
The current package of OpenAL (libopenal0a) in the Ubuntu repositories is from the Creative Sample Implementation (SI), a very incomplete and buggy "example" and is currently being phased out in favor of OpenAL Soft, which will become the new Sample Implementation in time.
Third, (and this one is very important), make sure that all of you applications use ALSA for audio output.
This is vital for getting sound from multiple applications at once. If even one application is not ALSA-compatible (e.g, KDE's sound manager), it will steal the sound hardware and not allow any other applications (such as Regnum) to use it. Using the OSS layer presents the same problem.
Almost all applications support ALSA, so simply leaving them on default settings usually works.
Finally, if you are still having problems, place this into your ~/.asoundrc file:
pcm.snd_card {
type hw
card 0
}
pcm.dmixer {
type dmix
ipc_key 1024
slave.pcm "snd_card"
slave {
period_size 256
buffer_size 2048
rate 48000
}
}
pcm.softvol {
type softvol
slave {
pcm "dmixer"
}
control {
name "ALSA DMIX"
card 0
}
}
pcm.dsnooper {
type dsnoop
ipc_key 2048
slave.pcm "snd_card"
slave {
period_size 256
buffer_size 2048
rate 48000
}
}
pcm.asymed {
type asym
playback.pcm "softvol"
capture.pcm "dsnooper"
}
pcm.pasymed {
type plug
slave.pcm "asymed"
}
pcm.dsp0 {
type plug
slave.pcm "asymed"
}
pcm.dsp {
type plug
slave.pcm "asymed"
}
pcm.!default {
type plug
slave.pcm "asymed"
}
And delete any existing ~/.openalrc, as it is not needed when using OpenAL Soft.
This configuration will also fix most issues with voice input with microphones.
---
About Ubuntu+GNOME and PulseAudio:
It is not possible to get sound working 100% under PulseAudio systems as PulseAudio takes control of ALSA and replaces it with it's own buggy, incomplete ALSA-compatibility interface. This means that in environments that now depend on PulseAudio (such as Ubuntu+GNOME) there is no longer any solution except an OpenAL library that uses PulseAudio directly.
When I asked him myself, the author of OpenAL Soft has said that he will not be implementing PulseAudio support in the official branch anytime in the near future, and I agree with him, because PulseAudio is a locust that is causing more issues than it fixes.
In such cases third-party patches are available to add PulseAudio support to the library.
Hope this helps.
Regards,
blaise69
10-16-2008, 06:22 PM
Hi Katiechan,
Thanks for your reply I find it interesting, from reading what you've said, is OpenAL Soft another sound manager such as Pulse Audio then?
I use Ubuntu and have Pulse Audio set up, do I need to uninstall this before I follow these steps in install OpenAL Soft, is there anything else I need to do for the Gnome desktop in particular?
Mikan
10-17-2008, 07:19 AM
Thanks for your reply I find it interesting, from reading what you've said, is OpenAL Soft another sound manager such as Pulse Audio then?
OpenAL is a specification for a 3D sound API (http://en.wikipedia.org/wiki/Api) like DirectSound3D (http://en.wikipedia.org/wiki/Directsound). It simply processes spatialization of 3D sounds into a 2D space, and is the counterpart of OpenGL (http://en.wikipedia.org/wiki/Opengl) which is used for graphics.
OpenAL Soft is an implementation of this API in a manner that conforms to the specification (http://en.wikipedia.org/wiki/Openal).
While it is a sound manager in the strictess sense, it accepts 3D sound positioning and spatialization information and "renders" this information to stereo or surround sound (http://en.wikipedia.org/wiki/Surround_sound) formatted streams - the only kind of streams that can be played by real sound managers and your sound card.
In short, a game cannot easily have 3D sound without using OpenAL or DirectSound3D.
I use Ubuntu and have Pulse Audio set up, do I need to uninstall this before I follow these steps in install OpenAL Soft, is there anything else I need to do for the Gnome desktop in particular?
I'm afraid that this is no longer possible as of Ubuntu Hardy Heron.
The developers thought it would be a good idea to replace the Enlightened Sound Daemon (ESD), which was GNOME's sound manager, with PulseAudio. This had the very bad side effect of making PulseAudio a dependancy of about 80% of your packages, and it cannot be uninstalled.
Currently there is no known work around except to "fix" all of your applications to use PulseAudio or somehow get them to work with one of PulseAudio's compatibility modes.
As someone pointed out earlier in this thread, Kubuntu as of yet does not have this problem.
Regards,
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.