View Full Version : PulseAudio performance test (Karmic?)
onemyndseye
10-27-2009, 07:03 AM
I ran some tests tonight and stumbled on some interesting results...
First, I noticed my FPS has really suffered lately. So i started looking into it. And I found that turning RO's internal volume control all the way down make a HUGE difference. Not just 10-20fps. But LARGE jumps in FPS.
So I starting thinking ... hrmm.. I wonder if PulseAudio is bottle-necking RO..?
Testing was simple enough: Launch RO and turn in a circle until FPS stabilize and take a screen. Repeat bypassing PulseAudio (of sorts)
Test1 (Normal Launch):
onemyndseye@onemyndsmobile:~/regnum$ ./rolauncher
Result: http://i36.tinypic.com/242hkkh.jpg
Test2 (Launch with OSS):
onemyndseye@onemyndsmobile:~/regnum$ aoss ./rolauncher
Result: http://i38.tinypic.com/35mgubb.jpg
WOW! O.O
These results are in no way conclusive or even 100% consistent (so far I would say 80% consistent) and I will continue to test, but the results were so surprising I wanted to share and get a discussion started on this topic.
Myxir
10-27-2009, 03:58 PM
Interesting.
I'm not sure but isn't openal a very old implementation?
I'm using a fresh karmic install with pulseaudio of course.
When I want to start it with aoss it just segfaults when selecting "enter gameworld".
I'll try to make it work with aoss as well :/
DkySven
10-27-2009, 05:25 PM
I use a fresh install of ubuntu 9.10 and when playing games the sound will crash after a while, which will also cause the game to freeze when trying to exit it. This only happens with games, all other sound on my system keeps working. It looks like this is PulseAudio-related.
onemyndseye
10-27-2009, 05:30 PM
yes - tried this on a different machine and got the segfault you mentioned..
OpenAL has been replaced by OpenAL Soft which is a much better implentation and is very well maintained unlike the older "OpenAL"
aoss tells RO to use the alsa-oss layer instead of pulse in either case still routes through OpenAL-Soft best of my understanding.
Myxir
10-27-2009, 06:14 PM
aoss tells RO to use the alsa-oss layer instead of pulse in either case still routes through OpenAL-Soft best of my understanding.
Yes, I know how aoss works. But I did not know about OpenAL soft. Thanks about that.
surak
10-27-2009, 06:17 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
DkySven
10-27-2009, 06:18 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
Ah, I was trying to report that. Yes, I have those issues too.
Ertial
10-27-2009, 06:41 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
I haven't tested for performance decreases, but I do sometimes suffer from sound that starts to be malformed after a bit, but in Karmic this has actually improved; when it happens now it often just occurs for a short period of time.
EDIT: By the way, is libopenal1 still needed? Or do you include a library with the game?
Myxir
10-27-2009, 09:18 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
In generally I have sound completely disabled in RO. Though I have constant system freezes after 40-50 minutes of gameplay. I am not sure yet what causes this problem.
Do you just get game freeze or is it the whole system?
onemyndseye
10-28-2009, 06:00 AM
After some testing the following settings put into ~/.alsoftrc works very well even though I am using surround sound mixing.
# Option and block names are case-insenstive. The supplied values are only
# hints and may not be honored (though generally it'll try to get as close as
# possible). These are the current available settings:
## format:
# Sets the output format. Can be one of:
# AL_FORMAT_MONO8 (8-bit mono)
# AL_FORMAT_STEREO8 (8-bit stereo)
# AL_FORMAT_QUAD8 (8-bit 4-channel)
# AL_FORMAT_51CHN8 (8-bit 5.1 output)
# AL_FORMAT_61CHN8 (8-bit 6.1 output)
# AL_FORMAT_71CHN8 (8-bit 7.1 output)
# AL_FORMAT_MONO16 (16-bit mono)
# AL_FORMAT_STEREO16 (16-bit stereo)
# AL_FORMAT_QUAD16 (16-bit 4-channel)
# AL_FORMAT_51CHN16 (16-bit 5.1 output)
# AL_FORMAT_61CHN16 (16-bit 6.1 output)
# AL_FORMAT_71CHN16 (16-bit 7.1 output)
#format = AL_FORMAT_QUAD16
format = AL_FORMAT_51CHN16
## refresh:
# Sets the buffer size, in frames. Note that the actual granularity may or may
# not be less than this.
refresh = 6144
## sources:
# Sets the maximum number of allocatable sources. Lower values may help for
# systems with apps that try to play more sounds than the CPU can handle.
#sources = 256
## stereodup:
# Sets whether to duplicate stereo sounds on the rear and side speakers for 4+
# channel output. This can make stereo sources substantially louder than mono
# or even 4+ channel sources, but provides a "fuller" playback quality. True,
# yes, on, and non-0 values will duplicate stereo sources. 0 and anything else
# will cause stereo sounds to only play out the front speakers.
stereodup = True
## drivers:
# Sets the backend driver list order, comma-seperated. Unknown backends and
# duplicated names are ignored, and unlisted backends won't be considered for
# use. An empty list means the default.
#drivers = alsa,oss,solaris,dsound,winmm,port,pulse,wave
#drivers = alsa,oss,pulse ### These good for linux
drivers = alsa
##
## ALSA backend stuff
##
[alsa]
## device:
# Sets the device name for the default playback device.
device = surround51 # Comment this to use default alsa device
## periods:
# Sets the number of update buffers for playback. A value of 0 means auto-
# select.
#periods = 0
## mmap:
# Sets whether to try using mmap mode (helps reduce latencies and CPU
# consumption). If mmap isn't available, it will automatically fall back to
# non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0
# and anything else will force mmap off.
mmap = true
some settings I have left as their default I am still testing to see if they make a performance impact. I.e. buffers, number of voices etc etc.
onemyndseye
10-28-2009, 10:21 AM
This is getting alittle off topic but It took some work to figure out so I thought I would include it. This is how I set my laptop up for gaming and movies in surround.
This laptop has 5 speakers total: Shown here (http://i38.tinypic.com/5vvuox.jpg)
They represent the following channels:
1 - Front Left
2 - Front Right
3 - Rear Left
4 - Rear Right
5 - LFE/Subwolfer (Bottom of laptop)
The OpenAL config: ~/.alsoftrc
format = AL_FORMAT_51CHN16
refresh = 6144
#sources = 256
stereodup = True
drivers = alsa
##
## ALSA backend stuff
##
[alsa]
device = lenovo_surround # Call my virtually maped device
#periods = 0
mmap = true
Then I needed a proper speaker map to get "5.1 surround".
The default surround device (pcm surround51) had my channels alittle mixed up so I remaped as follows. The syntax I learned for this maping is ` ttable.MAP_CHAN.REAL_CHAN GAIN '
MAP_CHAN = Represented channel
REAL_CHAN = Actual channel as identified by alsa
GAIN = Gain/Volume at a fraction (1 = 100%)
~/.asoundrc
pcm.!default {
type plug
slave.pcm "lenovo_surround"
slave.channels 6
route_policy duplicate
}
pcm.lenovo_surround {
type route
slave.pcm surround51
slave.channels 6
# Front with 50% volume LFE for both channels
ttable.0.2 0.7 ## Front Left (Speaker 1)
ttable.1.3 0.7 ## Front Right (Speaker 2)
ttable.0.5 0.5 ## Touch sub (Speaker 5)
ttable.1.5 0.5 ## Touch sub (Speaker 5)
# Rear with 50% volume LFE for both channels
ttable.2.0 1.0 ## Rear Left (Speaker 3)
ttable.3.1 1.0 ## Rear Right (Speaker 4)
ttable.2.5 0.5 ## Touch Sub (Speaker 5)
ttable.3.5 0.5 ## Touch Sub (Speaker 5)
# Center (Spkr1+Spkr2) with 50% volume LFE
ttable.4.2 0.5 ## Center Left (Speaker 1)
ttable.4.3 0.5 ## Center Right (Speaker 2)
ttable.4.5 0.5 ## Touch Sub (Speaker 5)
# Center Rear (Spkr3+Spkr4) with 50% volume LFE
ttable.5.0 0.5 ## Center Rear Left (Speaker 3)
ttable.5.1 0.5 ## Center Rear Right (Speaker 4)
ttable.5.5 0.5 ## Touch Sub (Speaker 5)
}
Still playing with the volume levels abit to get that "just right mix" but I've tested this with RO and Quake4 with satisfying results. I dont expect this exact example to work for anyone else or do I truely believe it to be a 100% correct (for instance: the gains in most channels are too high. i.e. Center Rear should total to 1) example of mixing 5.1 surround, but it gave me the results I was looking for and hopefully will save someone the trouble of figuring this crap out lol.
onemyndseye
10-29-2009, 08:08 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
back on topic:
Yeah.. alot of the same issues with me..
It usually starts with the NGD logo .. the sound clip that plays sometimes distorts. Then during gameplay sound eventually begins to distort and eventually go out completely
infact.. if I explicitly set openal to use pulse in /etc/openal/alsoft.cfg RO hangs at startup (on the checking firewall box)... returns a no responsive state and must be SIGKILL'ed
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
Add me to the counter, just as described by onemyndeye, start ok (sometimes the intro logo sound a bit distorted, sometimes not), then you start to hear like static or so, at it increases until the sound totally go out, then, if I try to logout complete freeze of the machine, nasty bug, and nasty pulseaudio eating 9-14% cpu O.o
RicX
SolomonDean
10-30-2009, 07:41 AM
everything is working fine for me cept openal gives me a screaming sound at times. fps seem about the same as Jaunty maybe even better. The Lag is a joke unfortunately. although wifi/ethernet is fine for everything else.
onemyndseye
10-30-2009, 05:38 PM
Out of the poeple here that have this problem:
Who else is using hda-intel audio? ` lsmod |grep snd_hda_intel `
kamax
10-30-2009, 07:02 PM
With my gentoo 64 i have tested the latest pulseaudio/openal some weeks ago and had problems too. The sound just stop working after a moment(just for the game) and some mini freeze.
My best solution was to remove pulseaudio and use alsa.
Cuchulainn
10-30-2009, 08:15 PM
If anyone dont want use alsa because it only supports sound for one applications (if i am right?), i can suggest using OSSv4 instead. Its not as easy to install as alsa in most distrubutions but not very hard either. Just download the oss package here (http://www.opensound.com/download.cgi) and read the installation instruction.
More informations about OSS here (http://wiki.archlinux.org/index.php/OSS).
DkySven
10-30-2009, 08:24 PM
Out of the poeple here that have this problem:
Who else is using hda-intel audio? ` lsmod |grep snd_hda_intel `
I am using this.
Ertial
10-30-2009, 08:38 PM
Out of the poeple here that have this problem:
Who else is using hda-intel audio? ` lsmod |grep snd_hda_intel `
I have just a little bit of jittering every now and then with the an Nvidia HDA audio chip.
Znurre
10-31-2009, 12:12 AM
If anyone dont want use alsa because it only supports sound for one applications (if i am right?), i can suggest using OSSv4 instead. Its not as easy to install as alsa in most distrubutions but not very hard either. Just download the oss package here (http://www.opensound.com/download.cgi) and read the installation instruction.
More informations about OSS here (http://wiki.archlinux.org/index.php/OSS).ALSA supports sound for more than 1 application at a time.
Old OSS which is shipped with most distros does not.
onemyndseye
10-31-2009, 01:50 AM
I have just a little bit of jittering every now and then with the an Nvidia HDA audio chip.
but your are using that module. Correct? (this is the case with my nvidia chipset PC)
I suspect that this chipset isnt always being detected correctly by the kernel. I have completely gotten rid of these problems on 1 machine thats using this module.. vastly improved another and got a 3rd working perfectly from no RO sound at all with playing with the model= parameter of the snd-hda-intel module.
In the case of my laptop the best get was " options snd-hda-intel model=lenovo-sky "
Other may want to look into other options or perhaps try one of these:
/etc/modprode.d/hda-intel.conf
# Only use 1
#options snd-hda-intel model=3stack
options snd-hda-intel model=3stack-6ch
#options snd-hda-intel model=3stack-6ch-intel
Or you can use this script to gather info about your soundcard and find a models= option that better suits your actual hardware.
~/alsa-models.sh
#!/bin/bash
## Changed this if needed
EDITOR=gedit
mkdir ~/tmp-alsa-info
cd ~/tmp-alsa-info
wget -q http://www.alsa-project.org/alsa-info.sh -O ./alsa-info.sh
chmod +x ./alsa-info.sh
./alsa-info.sh --no-upload --output ./alsa-info.txt
cat /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz |gunzip >./HD-Audio-Models.txt
$EDITOR ./alsa-info.txt ./HD-Audio-Models.txt
cd ~
sleep 2
rm -rfd ~/tmp-alsa-info
chmod +x ~/alsa-models.sh
~/alsa-models.sh
This will gather the info and open the needed documents.
adict
11-01-2009, 09:00 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
yep same here. Three people from my clan have no sound at all. By me the sound is nasty and at the end the game freezes. We all use Ubuntu 9.10. 64-bit.
Dupa_z_Zasady
11-01-2009, 09:02 PM
According to this (https://bugs.launchpad.net/ubuntu/+source/gnome-media/+bug/440465) they forced people to use broken PulseAudio. Nice.
My advice for those that haven't yet upgraded is not to do so. God, compared to Ubuntu guys, NGD people are real angels. Additionaly i have WiFi issues, and i guess i'll switch back to Debian on my desktop ASAP.
Edit: Of course i have those audio problems myself.
DkySven
11-02-2009, 04:20 PM
On Arch Linux 64 bit I have no problem with sound, so it seems the problems do come from Ubuntu 9.10, and because of that PulseAudio.
kamax
11-02-2009, 04:49 PM
On Arch Linux 64 bit I have no problem with sound, so it seems the problems do come from Ubuntu 9.10, and because of that PulseAudio.
I think it's more the version of the packages installed because i have problem on a gentoo too.
Blastermaster77
11-05-2009, 12:58 PM
Ok people what I did was this:
In the terminal:
sudo gedit /etc/openal/alsoft.conf
change the divice line form Alasa backend stuff to this:
## ALSA backend stuff
##
[alsa]
## device:
# Sets the device name for the default playback device.
device = alsa
remember to un coment it.
Hope this helps.
kamax
11-05-2009, 01:18 PM
I think with this setup your sound card will be busy for other sound program using pulseaudio, except if your other program are configured to use alsa too.
Blastermaster77
11-05-2009, 02:07 PM
I think with this setup your sound card will be busy for other sound program using pulseaudio, except if your other program are configured to use alsa too.
Nop I tested it with 3 sound app at the same time and it works fine.
Pakos
11-05-2009, 02:11 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
yup me too ;P
TheBold
11-05-2009, 04:29 PM
I've found that the sound issue is not only on the 64 bit. From a fresh install on 32 still get the issue, I simply updated Alsa to the latest, though i know its not an issue with 1.1.20, it's certainly an issue.
of course, I was hoping not to have to use a processor workaround for the high CPU usage...but that's a Regnum issue. :(
a simply ALSA update works, for those on Ubuntu, theres an upgrade script to the latest alsa on the forum.
http://ubuntuforums.org/showthread.php?p=6589810
Froste
11-06-2009, 03:39 AM
The sound engine has always impacted performance, with or without pulse. I'm using hardware mixing (sblive) without any software mixing, and starting the game without any sound increases performance by a lot. But of course you miss out on footsteps and buff sounds.
The problem is that for Linux we have OpenAL Soft which is software implementation of OpenAL. It started from simple OpenAL implementation opened by Creative some time ago. It lacks using hardware features of Creative cards.
Windows and MAC OpenAL versions provided by Creative utilize Creative sound hardware and do not put maybe so much load to CPU.
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
Surak, do we have any NGD white-smoke about this? (I still affected, playing with sound deactivated to avoid logout freeze, still you miss alot that way).
RicX
*****************************
Also with new technology client I crash -game suddenly close- every 5-10min......grrr. Anyone else?
Ertial
12-22-2009, 11:27 AM
This version of OpenAL soft just got uploaded to Lucid:
https://launchpad.net/ubuntu/+source/openal-soft/1:1.10.622-1/+changelog
It should fix at least two PulseAudio bugs.
onemyndseye
12-24-2009, 06:13 PM
Upgrading to the latest pulse solved alot of sound issues for me (including logout freeze):
http://www.webupd8.org/2009/11/upgrade-pulseaudio-to-version-0921-in.html
Note that the howto says to do ` apt-get upgrade ` however a ` apt-get dist-upgrade ` is needed
Also doing ALSA probably not a bad idea:
http://www.webupd8.org/2009/11/ubuntu-karmic-upgrade-alsa-to-1021-from.html
Ertial
01-15-2010, 11:52 AM
A new version of PulseAudio has just been uploaded to Ubuntu 10.04 Lucid Lynx Alpha 2. After a few new versions of OpenAL this should fix the issues with OpenAL on the PulseAudio side.
Performance should increase now OpenAL tries first to use its PulseAudio driver -- instead of the ALSA driver, which ends up using the PulseAudio ALSA emulation -- and the bug reporting that OpenAL isn't supported by PulseAudio was one of the many -- really a lot, 20 or more -- bugs that were being fixed by this latest upload of PulseAudio.
Sound should now be better than ever!
Kyrottimus
01-15-2010, 09:08 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
+1
I tried out the game on LinuxMint8, and since Mint8 basically installs itself and forces PulseAudio, I was getting terrible crashes in game and the audio-quality was garbage. I tried to install all the ALSA and OSS libraries I could to it but PulseAudio kept forcing itself, so I uninstalled it which made Mint unhappy.
Moral of the story, I went back to 8.04 64 bit LTS, am using OSS and getting best FPS AND Sound quality combinations.
IMO: PulseAudio = Crap
Ertial
01-15-2010, 11:02 PM
IMO: PulseAudio = Crap
People say this too often, but it's not true. You can't blame PulseAudio for being badly distributed by the distributions, they can't write other's configuration files.
Furthermore it takes time for things to start running smooth. Other systems and frameworks -- like OpenAL -- need to add support and only when many users use it you'll find many bugs.
If you want stability and reliability, then stick to the LTS'es, that's what they're for.
Ygarl
02-07-2010, 05:26 PM
Hmmm no matter what I tried (brand new Ubuntu 32-bit Karmic, updated Pulse as per above) I still get jittery sounds - on a large percentage of unrelated sound programs such as Aqualung.
The cause is multiple. The solution is simple: Synaptic, search for "pulse". Uninstall the whole Pulseaudio setup down to the lvl which doesn't actually uninstall any useful programs.
Restart X or reboot.
All my sound probs work flawlessly including running Aqualung for my tunes at the same time as RO.
So - Cause: unimportant.
Effect: Pulseaudio on Ubuntu (for whatever reason) is absolutely diabolical.
Solution: eradication of Pulse.
Sorted.
Ertial
02-07-2010, 05:28 PM
Hmmm no matter what I tried (brand new Ubuntu 32-bit Karmic, updated Pulse as per above) I still get jittery sounds - on a large percentage of unrelated sound programs such as Aqualung.
The cause is multiple. The solution is simple: Synaptic, search for "pulse". Uninstall the whole Pulseaudio setup down to the lvl which doesn't actually uninstall any useful programs.
Restart X or reboot.
All my sound probs work flawlessly including running Aqualung for my tunes at the same time as RO.
So - Cause: unimportant.
Effect: Pulseaudio on Ubuntu (for whatever reason) is absolutely diabolical.
Solution: eradication of Pulse.
Sorted.
I was referring to updates of PulseAudio and OpenAL Soft in Lucid, not Karmic.
Myxir
02-12-2010, 09:59 AM
People say this too often, but it's not true. You can't blame PulseAudio for being badly distributed by the distributions, they can't write other's configuration files.
PulseAudio is a great software it has big potential. It's not badly distributed imo. The problem is, they are the first one writing such a sound application and they discovered many nasty things in the alsa stack which cause PA to run quite badly. I don't think it's (completely) their fault.
Recently I have problems with PA again. After a few minutes it takes 100+% of my cpu until I kill it.
Mashu
02-14-2010, 10:31 AM
ALSA supports sound for more than 1 application at a time.
Old OSS which is shipped with most distros does not.
OSS4 does, I am using it successfuly on Debian both with HD Intel and Creative X-Fi
Froste
02-14-2010, 08:06 PM
OSS4 does, I am using it successfuly on Debian both with HD Intel and Creative X-Fi
Creative cards are special because they do the mixing in hardware, it has nothing to do with the drivers of oss or alsa. However, alsa is still a huge fail.
pssshhtt
02-20-2010, 08:31 PM
I've been noticing some nasty problems in with openal+pulseaudio in Karmic. (game freezes, and i can hear the music badly distorted). Anyone else having similar issues?
+1
I've updated to 9.10 last week and I almost always loose sound in battles .
since last update I've also lost char dresses in char selection screen (except 1 of my chars)
it's hard for me to play without sound so please, do sthing
thanks
bluea
02-24-2010, 03:53 PM
I am using this.
I use HDA Intel also...there are troble with developement of openal..i have sound delay before ..now the new version work very well.
I am under Madriva 2010.0 ....under Madriva 2009 the troble are a lots with sound delay..like 3-4 seconds sound delay on openal.
And i am under Pulse Audio pulseaudio 0.9.19-7mdv2010.0 KDE 4.4 beta.
With previous versions i have troble with sound delay.
OpenAL info:
OpenAL version string: 1.1 ALSOFT 1.7.411
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.