Summary: | PlaneShift with OpenAL sound stutters: PulseAudio returned minreq > tlength/2; expect break up | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Martin Steigerwald <Martin> |
Component: | clients | Assignee: | pulseaudio-bugs |
Status: | RESOLVED WORKSFORME | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart, simonandric5 |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
pulseaudio debug log
syslog output of kernel boot |
Description
Martin Steigerwald
2014-10-25 15:08:06 UTC
you have to provide pulseaudio verbose log while playing openal game DEBUG: OpenAL context should support 255 mono sources DEBUG: OpenAL context should support 1 stereo sources only the back ground music is playing through stereo other sound events are mono and openal perform 3d spatalizaion most event sounds are full ampltiude , openal computed the atten and doppler effect when the listener is moving towards/away from those mono sound sources (In reply to Raymond from comment #1) > you have to provide pulseaudio verbose log while playing openal game I need *clear* and *working* instruction on how to do this. I tried: echo autospawn = no >> ~/.config/pulse/client.conf #use ~/.pulse/client.conf on Ubuntu <= 12.10 killall pulseaudio LANG=C pulseaudio -vvvv --log-time=1 > ~/pulseverbose.log 2>&1 https://wiki.ubuntu.com/PulseAudio/Log Result: I don´t hear any sound in PlaneShift at all anymore after this. Also KDE systemsettings display "Pulseaudio-Server" instead of the sound device. It seems to me that new Pulseaudio does not get registered with desktop session. I tried: merkaba:/etc/pulse> diff -u daemon.conf daemon.conf-debug --- daemon.conf 2014-10-26 12:27:55.373316432 +0100 +++ daemon.conf-debug 2014-10-26 12:20:04.856111541 +0100 @@ -50,11 +50,10 @@ ; log-meta = no ; log-time = no ; log-backtrace = 0 - ; Für Debugging -; log-target = file:/var/log/pulseaudio-debug.log -; log-level = 4 -; log-time = 1 +log-target = file:/var/log/pulseaudio-debug.log +log-level = 4 +log-time = 1 # resample-method defaults to speex-float-1 on most architectures, # speex-fixed-1 on ARM But information still landed in syslog and was in german as well. I tried: merkaba:~#1> diff -u /usr/bin/start-pulseaudio-kde.orig /usr/bin/start-pulseaudio-kde --- /usr/bin/start-pulseaudio-kde.orig 2014-10-12 07:50:26.000000000 +0200 +++ /usr/bin/start-pulseaudio-kde 2014-10-26 12:36:27.669922285 +0100 @@ -26,7 +26,7 @@ EXIT_WITH_X_SESSION=no else EXIT_WITH_X_SESSION=yes - /usr/bin/pulseaudio --start "$@" + LANG=C /usr/bin/pulseaudio -vvvv --log-time=1 > /var/tmp/pulseverbose.log 2>&1 & fi but PlaneShift client did not seem to use Pulseaudio at all with it. It seems it needs the "--start". Before that I also tried with "--start" but it just put the first line on daemon startup into that logfile and then no more. Really, this *got* to be easier for users to help debugging PulseAudio issues. I will now have one last try: use LANG=C in start-pulseaudio-kde and daemon.conf with verbose + leave it to syslog and grep pulseaudio related stuff out from it. *sigh* (sorry if this sounds like a rant, but really, this took more more than one hour without any usable log so far). Created attachment 108445 [details]
pulseaudio debug log
Obtained with:
log-target = syslog
log-level = 4
log-time = 1
in daemon.conf
merkaba:~> diff -u /usr/bin/start-pulseaudio-kde.orig /usr/bin/start-pulseaudio-kde
--- /usr/bin/start-pulseaudio-kde.orig 2014-10-12 07:50:26.000000000 +0200
+++ /usr/bin/start-pulseaudio-kde 2014-10-26 12:46:09.347951247 +0100
@@ -26,7 +26,7 @@
EXIT_WITH_X_SESSION=no
else
EXIT_WITH_X_SESSION=yes
- /usr/bin/pulseaudio --start "$@"
+ LANG=C /usr/bin/pulseaudio --start "$@"
fi
and grep pulseaudio /var/log/syslog > attachedfile
With the following scenario:
1. KDE sessions tartup
2. Quick test in KDE systemsettings whether PulseAudio plays something
3. Quit KDE systemsettings
4. Start PlaneShift client and proceed to login screen.
5. Listen to music is playing stutteringly
6. Login to the PlaneShift server
7. Listen to the sound and music playing stuggeringly
8. Then copy syslog and grep.
Created attachment 108446 [details]
syslog output of kernel boot
Just in case you need anything in there.
Move the debug easyness stuff into a different bug report: Bug #85483 - Please make debugging easier in order to keep that to PlaneShift OpenAL sound stuttering issue. (In reply to Martin Steigerwald from comment #4) > Created attachment 108446 [details] > syslog output of kernel boot > > Just in case you need anything in there. at 12:31:31 "Starting playback" was immediately followed by several "cutting sleep time for the initial iteration by half" this mean the first write did not fill up 0.371ms buffer (In reply to Raymond from comment #6) > (In reply to Martin Steigerwald from comment #4) > > Created attachment 108446 [details] > > syslog output of kernel boot > > > > Just in case you need anything in there. > > at 12:31:31 > > "Starting playback" was immediately followed by several "cutting sleep time > for the initial iteration by half" > > this mean the first write did not fill up 0.371ms buffer Thank you Raymond. What can I do? I am having various audio issues recently with the switch from Phonon Qt4 => Qt5 and recent updates and I want to switch to Pulseaudio as thats the only audio output platform officially supported by Phonon developers. While it still allows to output to ALSA directly (well though vlc or gstreamer), this is not officially supported. I soooo want a simple and out of the box working multimedia layer on Linux. http://repo.or.cz/w/openal-soft.git/commitdiff/ee61f7a55caabec6f9c1394ce84e343d940cab92?hp=241ddf76d4e3b7b0efd771bbc8270e1da2a7ca72 this mean Device->NumUpdates <= 1 Device->NumUpdates = (data->attr.tlength/data->frame_size) / Device->UpdateSize; Raymond, I am no audio expert: Does that mean that PlaneShift is slow to deliver new samples to play? For ALSA it works just fine, why doesn´t it work for PulseAudio then? Does PulseAudio require a different buffer size? Where can it be fixed? Can it be fixed / worked-around by changing frame size somewhere (maybe in PulseAudio configuration)? Currently there is a regression with PlaneShift and PulseAudio that just goes away when I remove PulseAudio from the equation. But if it would still be something that needs fixing within the game or within OpenAL, I can forward this bug. I just like to provide clear information then on what needs to be done for fixing it. Thank you, Martin http://repo.or.cz/w/openal-soft.git/blob/HEAD:/alsoftrc.sample ## period_size: # Sets the update period size, in frames. This is the number of frames needed # for each mixing update. Acceptable values range between 64 and 8192. #period_size = 1024 ## periods: # Sets the number of update periods. Higher values create a larger mix ahead, # which helps protect against skips when the CPU is under load, but increases # the delay between a sound getting mixed and being heard. Acceptable values # range between 2 and 16. #periods = 4 OpenAL is an environmental 3D audio library that aims to provide an open replacement for proprietary (and generally incompatible with one another) 3D audio systems such as EAX and A3D. OpenAL can add realism to a game by simulating attenuation (degradation of sound over distance), the Doppler effect (change in frequency as a result of motion), and material densities. Martin, could you also attach pulseaudio log of the problem occurring on your internal audio? It does look like there is a problem with the rate at which data is being provided by the PlaneShift client, but it's hard to figure out why. Let me see if I can find some openal code that I can quickly run to repro the problem. (In reply to Arun Raghavan from comment #11) > Martin, could you also attach pulseaudio log of the problem occurring on > your internal audio? You mean the same as in comment #3 but with OpenAL switched to internal audio instead? I installed PulseAudio again, and I had to fix quite some places where I disabled it back then. I will try to play around with the OpenAL settings to fix the issue for me. And if I found a working setting, I will post it here. And look into providing more debug output with standard settings and internal audio. Can take some days since I will be back home late today. As I now wanted to adapt openal settings or gather further debug logs I found it to be working out of the box with: martin@merkaba:~> apt-show-versions | egrep -i "pulseaudio|openal|alsa" alsa-base:all/sid 1.0.27+1 uptodate alsa-utils:amd64/sid 1.0.29-1 uptodate alsa-utils:i386 not installed alsaplayer-alsa:amd64/sid 0.99.81-1+b1 uptodate alsaplayer-alsa:i386 not installed alsaplayer-common:amd64/sid 0.99.81-1+b1 uptodate alsaplayer-common:i386 not installed alsaplayer-text:amd64/sid 0.99.81-1+b1 uptodate alsaplayer-text:i386 not installed [… gstreamer removed as libopenal does not depend on it …] libopenal-data:all/sid 1:1.16.0-3 uptodate libopenal-dev:amd64/sid 1:1.16.0-3 uptodate libopenal-dev:i386 not installed libopenal1:amd64/sid 1:1.16.0-3 uptodate libopenal1:i386 not installed libsox-fmt-alsa:amd64/sid 14.4.1-5 uptodate libsox-fmt-alsa:i386 not installed pulseaudio:amd64/sid 6.0-5 uptodate pulseaudio:i386 not installed pulseaudio-module-x11:amd64/sid 6.0-5 uptodate pulseaudio-module-x11:i386 not installed pulseaudio-utils:amd64/sid 6.0-5 uptodate pulseaudio-utils:i386 not installed Thats openal 1.15 => 1.16 and PulseAudio 5 => 6. So I will leave things as they are for now and close as worksforme. Thank you Raymond for your help! Now I can focus on looked at inconsistencies with Phonon + PulseAudio as this is an officially supported combination (from Phonon developers). Thanks, Martin |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.