Pulseaudio dies after a while, usb audio card

Bug #366708 reported by Barış Ürüm on 2009-04-25
80
This bug affects 11 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Undecided
Unassigned

Bug Description

Immediately after the boot sound is present and clean, but after a while just goes silent. Mixers are not muted, sound just vanishes. When I kill pulseaudio with:

pulseaudio -k

Sound comes back when pulseaudio autospawns but after a while vanishes again.

OS: Ubuntu jaunty 9.04
Arch: amd64
Sound card: Novation X-station usb (1.1) 24bit (standards compliant)

Josh Green (josh-resonance) wrote :

I'm experiencing a similar issue and would like to find out if its the same problem. Try running PulseAudio from the command line (after it has crashed or kill it if it is already running), for example:
pulseaudio -vv

In my case the last line printed before dying is:
Killed

Which indicates it is receiving a SIGKILL for some reason.

When I try to play something after pulseaudio dies I get this error in terminal even not in verbose mode:

E: module-alsa-sink.c: Failed to set hardware parameters: Operation not permitted

And verbose mode output:

Also I should add that JACK works with alsa driver device hw:1 (my usb-audio) flawlessly.

Gijs Molenaar (gijzelaar) wrote :

I can confirm the same behavior with my UA-25 USB sound card.

Gijs Molenaar (gijzelaar) wrote :

Isn't there any smart person who can give a hint what is causing this?

I'm quite starting to mis audio functionality with Ubuntu, since switching to OSS doesn't fix all problems. For example flash audio playback isn't working, causing many flash movies/apps to hang.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed

I can confirm the same bug with flash audio playback and Edirol UA-25 usb
sound card.

2009/5/28 Gijs Molenaar <email address hidden>

> Isn't there any smart person who can give a hint what is causing this?
>
> I'm quite starting to mis audio functionality with Ubuntu, since
> switching to OSS doesn't fix all problems. For example flash audio
> playback isn't working, causing many flash movies/apps to hang.
>
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: New => Confirmed
>
> --
> Pulseaudio dies after a while, usb audio card
> https://bugs.launchpad.net/bugs/366708
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pulseaudio” source package in Ubuntu: Confirmed
>
> Bug description:
> Immediately after the boot sound is present and clean, but after a while
> just goes silent. Mixers are not muted, sound just vanishes. When I kill
> pulseaudio with:
>
> pulseaudio -k
>
> Sound comes back when pulseaudio autospawns but after a while vanishes
> again.
>
> OS: Ubuntu jaunty 9.04
> Arch: amd64
> Sound card: Novation X-station usb (1.1) 24bit (standards compliant)
>

Gijs Molenaar (gijzelaar) wrote :

if it is of any help, here I have

I have the output of the alsa-info script:
* http://www.alsa-project.org/db/?f=cadf4842f145c187615a3a2838a47f5da1ad57e2

Which was found here:
https://help.ubuntu.com/community/SoundTroubleshooting

Claudio (cdcrossi) wrote :

Thank you for this information.

2009/6/16 Gijs Molenaar <email address hidden>

> if it is of any help, here I have
>
> I have the output of the alsa-info script:
> *
> http://www.alsa-project.org/db/?f=cadf4842f145c187615a3a2838a47f5da1ad57e2
>
> Which was found here:
> https://help.ubuntu.com/community/SoundTroubleshooting
>
> --
> Pulseaudio dies after a while, usb audio card
> https://bugs.launchpad.net/bugs/366708
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pulseaudio” source package in Ubuntu: Confirmed
>
> Bug description:
> Immediately after the boot sound is present and clean, but after a while
> just goes silent. Mixers are not muted, sound just vanishes. When I kill
> pulseaudio with:
>
> pulseaudio -k
>
> Sound comes back when pulseaudio autospawns but after a while vanishes
> again.
>
> OS: Ubuntu jaunty 9.04
> Arch: amd64
> Sound card: Novation X-station usb (1.1) 24bit (standards compliant)
>

Markus Lindenberg (markusl) wrote :

You guys,

what's the state of this one? What's STILL happening SINCE JAUNTY is that if i don't kill pulse right before starting playback, it will not work and just throw tons of "D: protocol-native.c: Requesting rewind due to end of underrun." errors. Same results when stopping and resuming playback.

I noticed that this only happens after pulse suspends the output (whatever that means...). If i (re-)start playback before pulse suspends my playback (usb) outputs, it will happily play back with just a few (1-4) lines of "...underrun." and no audible glitches whatsoever. Notice that this only affects my USB sound card (E-MU 0202USB).

So next i'll look into this suspending thing and what it means...

Output of "pulseaudio -vv" with hundreds of "Requesting rewind..." at the end removed:

I: module-suspend-on-idle.c: Source alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0.monitor idle for too long, suspending ...
I: module-suspend-on-idle.c: Sink alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 idle for too long, suspending ...
I: module-alsa-sink.c: Device suspended...
I: client.c: Created 1 "Native client (UNIX socket client)"
D: protocol-native.c: Protocol version: remote 14, local 14
I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: protocol-native.c: SHM possible: yes
D: protocol-native.c: Negotiated SHM: yes
I: module-stream-restore.c: Restoring device for stream sink-input-by-application-name:Audacious.
D: module-stream-restore.c: Not restoring volume for sink input sink-input-by-application-name:Audacious, because already set.
D: module-stream-restore.c: Not restoring mute state for sink input sink-input-by-application-name:Audacious, because already set.
I: module-alsa-sink.c: Trying resume...
E: module-alsa-sink.c: Failed to set hardware parameters: Operation not permitted
D: module-suspend-on-idle.c: Sink alsa_output.usb_device_41e_3f02_E_MU_4A_3F02_07D80A0B_079AB_STATION_01_if0_sound_card_0_alsa_playback_0 becomes busy.
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: sink-input.c: Created input 0 "Friska Viljor [ Tour De Hearts ] - 1. On And On" on alsa_output.usb_device_41e_3f02_E_MU_4A_3F02_07D80A0B_079AB_STATION_01_if0_sound_card_0_alsa_playback_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: protocol-native.c: Requested tlength=250,00 ms, minreq=20,00 ms
D: protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: memblockq.c: memblockq requested: maxlength=4194304, tlength=44100, base=4, prebuf=40576, minreq=3528 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=44100, base=4, prebuf=40576, minreq=3528 maxrewind=0
I: protocol-native.c: Final latency 460,00 ms = 210,00 ms + 2*20,00 ms + 210,00 ms
D: protocol-native.c: Requesting rewind due to end of underrun.

Markus Lindenberg (markusl) wrote :

This appears to be related to pulseaudio device suspend/resume. if a device is unused for 2s, pulse will close it. if it's being used again, pulse will re-open it with the same parameters as before, which somehow fails on my usb device:

I: module-alsa-sink.c: Trying resume...
E: module-alsa-sink.c: Failed to set hardware parameters: Operation not permitted

See this related mail by PA's author Lennart Poettering:

http://<email address hidden>/msg03228.html

For now i can work around this by disabling suspend-on-idle in /etc/pulse/default.pa:

### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle

I regard this as what it is: just a workaround.

Can anyone confirm these findings?

Posted by Markus:
"For now i can work around this by disabling suspend-on-idle in /etc/pulse/default.pa:

### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle

I regard this as what it is: just a workaround."

I confirm that this workaround works for me ( x-station usb 1.1/ snd-usb-audio ). Sound output is stable now. I bet the bug is in pulseaudio's suspend - resume code, but it happens with usb-audio devices. My onbord mobo ac97 doesn't have this problem.

I still see the underrun messages in verbose mode (txt included). There appears cracks in the sound output time to time. Seems like a buffer under/overrun issue to me as stated in the verbose messages. But I think this has nothing to do with our original problem. May be a bug in the alsa's usb driver or a bug in pulseaudio again. I didn't have these cracks back in ubuntu 8.04.

Thanks markus for your help.

Rolo (rolo-wildfish) wrote :

Thanks! This workaround works for me.

Also using an external UA25.

Rolo.

Tyler Rick (tyler.rick) wrote :

The problem I have observed is that after leaving an audio source "idle" for a while -- such as a Flash player in Firefox or even a VLC player that I had left paused overnight -- when I try to resume or play something again from the same process, all I get is silence. It's as if once Pulseaudio's "suspend-on-idle" feature kicks in and suspends audio for a process, it is permanent -- it doesn't seem to detect when that process again becomes an active audio source and does not "unsuspend" audio for it.

The only workaround I was able to come up with was to kill the process for which I couldn't hear any sound output. So for the Flash player, I think it might have worked to kill the npviewer.bin process spawned by firefox (from the command line) and then reload the page. But it's been a while since I've tried that, so I don't remember for sure if that works all the time. What I usually end up doing is just opening up another Firefox profile and opening the page with the Flash plugin in that separate process. That way I can restart that whole Firefox process without interrupting anything else I may be doing in my main Firefox profile. With VLC, of course, I just quit and restart VLC and navigate to wherever I left off.

Audio was working pretty much flawlessly for me in Jaunty. It has only been since I upgraded to Karmic (at alpha4) that I started having these problems. I had been hoping they would work themselves out on their own, but they haven't so I searched for a ticket. Hopefully this is the right one.

I'll have to try the "disabling suspend-on-idle" workaround...

Tyler Rick (tyler.rick) wrote :

FWIW, I'm using internal audio on my mainboard -- not an external/USB sound device.

Tyler Rick (tyler.rick) wrote :

It's not even just when the audio source is paused/idle any more. It just stopped in the middle of playing something.

pulseaudio process is still running. pulseaudio -k causes new process to be spawned but it doesn't help anything (that audio source is still inaudible).

Why does Sound Preferences report "No application is currently playing or recording audio." Lies. It is too playing.

Daniel Ellis (danellisuk) wrote :

On 9.10 Beta, sound randomly stops for me whilst playing Warsow. However the sound is always fine if I kill pulseaudio before playing. I use on-board sound which is using the snd_hda_intel alsa driver.

Ram Kandasamy (ram-kandasamy) wrote :

Apologies if there's a newer ticket I should be bumping.

I was having this problem on 11.10 and I tried the workaround proposed by markusl. It seems to work without issue now. Was this likely a different problem or has this issue gone unresolved for 2.5 years?

OvermindDL1 (overminddl1) wrote :

I have the same issues, although with an internal audio card, however I have a USB Mic that does have an integrated sound card and can plug a headphone into it. Puleaudio randomly dies, averaging about once or twice a day while listening to music/youtube/other_things. However pulseaudio dies about once every 30 minutes if I am doing recording with the USB microphone thus forcing me to restart the recording application. I have been having the same issue since at least 9.10, just becoming more important and irritating lately due to heavy recording.

sauvageon (sauvageon) wrote :
Download full text (3.4 KiB)

I use a raspberry pi as a sound server with pulseaudio. Works fine but after around 3-4 minutes it crash.
I have to restart pulseaudio and then same thing happen again and again.
I tried to comment the #load-module module-suspend-on-idle but same issue persist.

Here is the trace log I have
( 294.556| 0.000) D: [alsa-sink-USB Audio] module-rtp-recv.c: Estimated target rate: 44096 Hz, using average of 44097 Hz (α=0,800)
( 294.556| 0.000) D: [alsa-sink-USB Audio] module-rtp-recv.c: Updated sampling rate to 44100 Hz.
( 298.330| 3.773) D: [alsa-sink-USB Audio] sink.c: Found underrun 6568 bytes ago (28696 bytes ahead in playback buffer)
( 298.355| 0.024) D: [alsa-sink-USB Audio] sink.c: Found underrun 15384 bytes ago (19880 bytes ahead in playback buffer)
( 298.358| 0.003) D: [pulseaudio] module-rtp-recv.c: Checking for dead streams ...
( 298.380| 0.021) D: [alsa-sink-USB Audio] sink.c: Found underrun 24168 bytes ago (11096 bytes ahead in playback buffer)
( 298.405| 0.024) D: [alsa-sink-USB Audio] sink.c: Found underrun 32984 bytes ago (2280 bytes ahead in playback buffer)
( 318.379| 19.974) D: [pulseaudio] module-rtp-recv.c: Checking for dead streams ...
( 338.399| 20.020) D: [pulseaudio] module-rtp-recv.c: Checking for dead streams ...
( 338.399| 0.000) I: [pulseaudio] module-rtp-recv.c: Freeing session 'PulseAudio RTP Stream on boulaga'
( 338.400| 0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-Yamaha_Corporation_AG06_AG03-00-AG06AG03.analog-stereo becomes idle, timeout in 5 seconds.
( 338.400| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Requested to rewind 35264 bytes.
( 338.400| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Limited to 35008 bytes.
( 338.400| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: before: 4376
( 338.401| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: after: 4376
( 338.401| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Rewound 35008 bytes.
( 338.401| 0.000) D: [alsa-sink-USB Audio] sink.c: Processing rewind...
( 338.401| 0.000) D: [alsa-sink-USB Audio] source.c: Processing rewind...
( 338.401| 0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-Yamaha_Corporation_AG06_AG03-00-AG06AG03.analog-stereo becomes idle, timeout in 5 seconds.
( 338.401| 0.000) D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
( 338.403| 0.002) I: [pulseaudio] sink-input.c: Freeing input 0 "RTP Stream (PulseAudio RTP Stream on boulaga)"
( 343.406| 5.002) I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-Yamaha_Corporation_AG06_AG03-00-AG06AG03.analog-stereo idle for too long, suspending ...
( 343.410| 0.003) D: [pulseaudio] sink.c: Suspend cause of sink alsa_output.usb-Yamaha_Corporation_AG06_AG03-00-AG06AG03.analog-stereo is 0x0004, suspending
( 343.412| 0.001) I: [alsa-sink-USB Audio] alsa-sink.c: Device suspended...
( 343.412| 0.000) D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
( 343.414| 0.001) D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC1 is accessible: yes
( 343.414| 0.000) D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.usb-...

Read more...

Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 9.04 (jaunty) reached end-of-life on October 23, 2010.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please upgrade to the latest version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers