Pulseaudio starts distrorting after indefinate time, then needs restart.

Bug #334874 reported by jason0x21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

After some unknown period of time (I haven't been able to find a pattern here), an otherwise working pulseaudio daemon starts crackling, popping and stuttering during playback. It can suddenly start happening while I'm playing audio (doesn't matter what application) or while I'm not playing audio (like overnight, and I come back to a distorted playback). Restarting pulseaudio (pulseaudio -k ; sleep 5 ; pulseaudio -D) seems to fix it (until it happens again).

ALSA doesn't need restarting or reloading in this situation, just pulseaudio, and the applications that use it. So whenever I restart pulseaudio, I have to restart the browser and music player.

(incidentally, I tried to run the utils_alsa-info.sh, which seemed to run fine, but it didn't report where it uploaded the info, so I'll try to attach the relevant file here).

I do get the following errors in user.log when I restart pulseaudio:

Feb 26 07:42:17 krazykat pulseaudio[17762]: alsa-util.c: Device plug:dmix doesn't support 44100 Hz, changed to 48000 Hz.
Feb 26 07:42:17 krazykat pulseaudio[17762]: alsa-util.c: Error opening PCM device hw:0: Device or resource busy
Feb 26 07:42:17 krazykat pulseaudio[17762]: module.c: Failed to load module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_8086_24c5_sound_card_0_alsa_playback_0"): initialization failed.

...but sound works (for a while) after that, and the bug searches I did on those errors were all about sound not working.

Revision history for this message
jason0x21 (jason0x21) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote :

There are a couple things to note from your pasted daemon output:

1) plug:dmix is in use - did you modify /etc/pulse/default.pa to use that for module-alsa-sink? If so, please attach your modified /etc/pulse/default.pa;
2) the symptoms are very probably related to bug 330814

As always, I need to see pulseaudio -vv output.

Changed in pulseaudio:
status: New → Incomplete
Revision history for this message
jason0x21 (jason0x21) wrote :

Here's my default.pa, and here's the info I get from a restart...

jason@krazykat:~$ pulseaudio -k
jason@krazykat:~$ pulseaudio -D -vv
I: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
I: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
I: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
I: main.c: Note that real-time/high-priority scheduling is NOT normally required. If you experience crackling or other sound anomalies, consider one or more of the above solutions.
I: main.c: High-priority scheduling enabled in configuration but now allowed by policy. Disabling forcibly.
I: main.c: daemon startup successful.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Please don't daemonise (-D); leave it running in the foreground and attach a new paste of the logging when it fails.

Revision history for this message
jason0x21 (jason0x21) wrote :

Done, it fails between Client 4 and Client 5. I left the computer doing nothing overnight between client 4 and 5, though.

Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Incomplete → Confirmed
Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Confirmed → Fix Committed
Revision history for this message
jason0x21 (jason0x21) wrote :

Fix committed? Wow, what was the bug?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.14-0ubuntu11

---------------
pulseaudio (0.9.14-0ubuntu11) jaunty; urgency=low

  [ Daniel T Chen ]
  * Reenable 0030_set_tsched0.patch, which re-disables glitch-free;
    too many users are reporting regressions and audio aberrations.
  * Adjust 0003_change_resample_and_buffering.patch to use linear
    resampler to work better with lack of PREEMPT in jaunty's
    -generic kernel config (LP: #207135, #322250, #332761, #335955,
    LP: #336965).
  * Last upload, specifically 0091_workaround_alsa_horkage, fixes:
    LP: #235990, #237443, #279847, #317997, #323185, #330814,
    LP: #334874.
  * sudo -H change in ubuntu6 fixed LP: #312505.
  * Closing old bugs fixed in 0.9.11+: LP: #187963, #193520, #211052.
  * Refresh 0006_regen-autotools.patch.
  * Add 0043_load_sample_dir_lazy.patch to cache
    /usr/share/sounds/ubuntu/stereo/* in default.pa.
  * debian/:
    - control: Build against libcap2-dev (LP: #339448);
    - copyright: Update copyright from Debian's 0.9.14-2;
    - rules: Add DEB_OPT_FLAG = -O3 as per recommendation from
      pulseaudio-discuss/2007-December/001017.html.
  * Refresh fixes from git HEAD:
    - 0038_handle_errno_properly.patch,
    - 0091_workaround_alsa_horkage.patch,
    - 0092_fix_null_pointer_access.patch.

  [ Luke Yelavich ]
  * Add a special case to prevent Pulseaudio from being started when the
    blindness accessibility profile has been enabled from the Ubuntu live CD,
    and for an accessibility install. Unfortunately Pulseaudio and speech do
    not currently work very well with each other, and its too late in
    the cycle to solve this problem any other way.

 -- Luke Yelavich <email address hidden> Tue, 10 Mar 2009 09:00:40 +1100

Changed in pulseaudio:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.