pulseaudio glitch-free mode causes audio to break after a while on snd_hda_intel

Bug #761312 reported by Tim Lunn
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

I have been having this issue since upgrading to Natty.

Basically I will be listening to music (mp3's) and at some point the sound output becomes all garbled and strange.
It seems to happen completely randomly and I can't pin down any causing factor.
Closing the music player and re-opening it, sorts things out until it happens again a few hours later.

It does appear to be independent of the music player, I have tested and have it happened in Banshee, Rhythmbox and Songbird. So I am guessing its a problem with gstreamer or pulseaudio.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: pulseaudio 1:0.9.22+stable-queue-24-g67d18-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: darkness 22892 F.... pulseaudio
 /dev/snd/pcmC0D0p: darkness 22892 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf9ff8000 irq 44'
   Mixer name : 'Realtek ALC1200'
   Components : 'HDA:10ec0888,104382fe,00100101'
   Controls : 40
   Simple ctrls : 22
Date: Fri Apr 15 11:32:21 2011
ProcEnviron:
 LANGUAGE=en_AU:en
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: pulseaudio
UpgradeStatus: Upgraded to natty on 2011-04-12 (3 days ago)
dmi.bios.date: 05/26/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0506
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5Q-PRO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0506:bd05/26/2008:svnSystemmanufacturer:pnP5Q-PRO:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5Q-PRO:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: P5Q-PRO
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Tim Lunn (darkxst) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

Please reproduce this symptom using a non-GSt-based audio app, e.g.,
mpg123, ogg123, xine-ui.

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

ok after 2 days I have not been able to reproduce this problem using xine-ui.

so I am guessing it is a Gstreamer issue?

On 15/04/11 18:30, Daniel T Chen wrote:
> Please reproduce this symptom using a non-GSt-based audio app, e.g.,
> mpg123, ogg123, xine-ui.
>

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

That hypothesis is plausible. Can you provide a test file? Please also
see https://wiki.ubuntu.com/PulseAudio/Log.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Tim Lunn (darkxst) wrote :

I am still having this problem intermittently (although nowhere near as frequent as previously). Still trying to capture a log, never seems to
happen when I am logging pulseaudio ;(

On 29/04/11 21:29, David Henningsson wrote:
> ** Changed in: pulseaudio (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

I am really struggling to catch this while logging, might sound strange but it appears that I can't replicate the issue while logging pulse
audio. It will run for days without problem while logging, as soon as stop logging and run pulseaudio normally it happens atleast 2 times per day.

On 03/05/11 15:02, Tim wrote:
> I am still having this problem intermittently (although nowhere near as frequent as previously). Still trying to capture a log, never seems to
> happen when I am logging pulseaudio ;(
>
> On 29/04/11 21:29, David Henningsson wrote:
>> ** Changed in: pulseaudio (Ubuntu)
>> Status: New => Incomplete
>>

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

Is there any other way I might be able to catch logs of this bug?

As I said previously I can go a week without any issues while logging pulseaudio as per the link above. As soon as I switch back to not logging
this corruption of streams happens atleast 3 times per day, sometimes more.

Its kinda like there is some delay caused by the logging and this is avoiding a race condition.

On 29/04/11 21:29, David Henningsson wrote:
> ** Changed in: pulseaudio (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
Tim Lunn (darkxst) wrote : Re: audio stream keeps becoming corrupted when listening to music

Here is a log from just after the audio stream got corrupted.

I had to reduce the verboseness of the logging to re-create this while bugging, hopefully there is something contained in this that might help track it down!

ie run.
LANG=C pulseaudio -vv > ~/pulseverbose.log 2>&1

Revision history for this message
Tim Lunn (darkxst) wrote :

Here is a log from just after the audio stream got corrupted.

I had to reduce the verboseness of the logging to re-create this while logging, hopefully there is something contained in this that might help track it down!

ie run.
LANG=C pulseaudio -vv > ~/pulseverbose.log 2>&1

Revision history for this message
Tim Lunn (darkxst) wrote :

here is another log of crash, this time with full verboseness on (-vvvv).

I do notice this about the time things went wacky (sorry forgot to enable time stamps ;( )

D: protocol-native.c: Underrun on ''* '', 0 bytes in queue.
I: main.c: Got signal SIGINT.
I: main.c: Exiting.
I: main.c: Daemon shutdown initiated.

Although as far as I can tell there is nothing to suggest what caused the SIGINT

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

this has now happened a few times in xine also, so probably not gST related as I previously suspected.

Tim

On 16/05/11 22:18, Tim wrote:
> here is another log of crash, this time with full verboseness on
> (-vvvv).
>
> I do notice this about the time things went wacky (sorry forgot to
> enable time stamps ;( )
>
> D: protocol-native.c: Underrun on ''* '', 0 bytes in queue.
> I: main.c: Got signal SIGINT.
> I: main.c: Exiting.
> I: main.c: Daemon shutdown initiated.
>
>
> Although as far as I can tell there is nothing to suggest what caused the SIGINT
>
> ** Attachment added: "pulseverbose.truncated.log"
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/761312/+attachment/2130756/+files/pulseverbose.truncated.log
>

Revision history for this message
Tim Lunn (darkxst) wrote : Re: audio stream keeps becoming corrupted when listening to music

I now believe this is an issue related to the glitch-free mode of pulseaudio.

I have for now used the tsched=0 workaround in default.pa, and the issues seem to have been resolved.

presumably this is a regression in pulseaudio or alsa since Maverick, since it was working perfectly before I upgraded to Natty.

summary: - audio stream keeps becoming corrupted when listening to music
+ pulseaudio glitch-free mode causes audio to break after a while on
+ snd_hda_intel
Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: audio stream keeps becoming corrupted when listening to music

oops, the tsched=0 fixed audio because it stopped pa loading completely, is that option no longer supported?.

Anyway here are some errors I found in syslog

Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 3528320 bytes (10000 ms).
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to
the ALSA developers.
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_dump():

Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_mmap_begin() returned a value that is exceptionally large: 3528320 bytes (10000 ms).
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to
the ALSA developers.
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_dump():

Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_delay() returned a value that is exceptionally large: 3528320 bytes (10000 ms).
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to
the ALSA developers.
Jun 4 08:38:53 duhast pulseaudio[22371]: alsa-util.c: snd_pcm_dump():

On 03/06/11 15:40, Tim wrote:
> I now believe this is an issue related to the glitch-free mode of
> pulseaudio.
>
> I have for now used the tsched=0 workaround in default.pa, and the
> issues seem to have been resolved.
>
> presumably this is a regression in pulseaudio or alsa since Maverick,
> since it was working perfectly before I upgraded to Natty.
>
> ** Summary changed:
>
> - audio stream keeps becoming corrupted when listening to music
> + pulseaudio glitch-free mode causes audio to break after a while on snd_hda_intel
>

Revision history for this message
Tim Lunn (darkxst) wrote :
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 761312] Re: pulseaudio glitch-free mode causes audio to break after a while on snd_hda_intel

Its more likely a regression in the alsa driver moreso than pulseaudio. TO be sure, could you please try installing the latest drivers, as outlined at the following URL: https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules.

Thanks.

Revision history for this message
Tim Lunn (darkxst) wrote :

I did some testing with those drivers over the weekend, and the problems still exist with them.

Revision history for this message
Tim Lunn (darkxst) wrote :

also tested with the new 2.6.38-10 kernel from yesterday and if anything seems to be worse (sound is dying approx after 5mins).

Revision history for this message
Raymond (superquad-vortex2) wrote :
Download full text (7.1 KiB)

Using 5.0 fragments of size 705664 bytes (2000.18ms), buffer size is 3528320 bytes (10000.91ms)

it is not alsa bug since the buffer time is just longer than 10 seconds

D: alsa-util.c: Trying surround40:0 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open surround40:0
D: alsa-util.c: Maximum hw buffer size is 11888 ms
I: alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: alsa-util.c: snd_pcm_hw_params_set_period_size_near() failed: Invalid argument
I: alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
D: alsa-util.c: Set only period size (to 88200 samples).
I: alsa-sink.c: Successfully opened device surround40:0.
I: alsa-sink.c: Selected mapping 'Analog Surround 4.0' (analog-surround-40).
I: alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: (alsa-lib)control.c: Invalid CTL surround40:0
I: alsa-mixer.c: Unable to attach to mixer surround40:0: No such file or directory
I: alsa-mixer.c: Successfully attached to mixer 'hw:0'

...

I: sink.c: Created sink 0 "alsa_output.pci-0000_00_1b.0.analog-surround-40" with sample spec s16le 4ch 44100Hz and channel map front-left,front-right,rear-left,rear-right
I: sink.c: alsa.resolution_bits = "16"
I: sink.c: device.api = "alsa"
I: sink.c: device.class = "sound"
I: sink.c: alsa.class = "generic"
I: sink.c: alsa.subclass = "generic-mix"
I: sink.c: alsa.name = "ALC1200 Analog"
I: sink.c: alsa.id = "ALC1200 Analog"
I: sink.c: alsa.subdevice = "0"
I: sink.c: alsa.subdevice_name = "subdevice #0"
I: sink.c: alsa.device = "0"
I: sink.c: alsa.card = "0"
I: sink.c: alsa.card_name = "HDA Intel"
I: sink.c: alsa.long_card_name = "HDA Intel at 0xf9ff8000 irq 44"
I: sink.c: alsa.driver_name = "snd_hda_intel"
I: sink.c: device.bus_path = "pci-0000:00:1b.0"
I: sink.c: sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
I: sink.c: device.bus = "pci"
I: sink.c: device.vendor.id = "8086"
I: sink.c: device.vendor.name = "Intel Corporation"
I: sink.c: device.product.id = "3a3e"
I: sink.c: device.product.name = "82801JI (ICH10 Family) HD Audio Controller"
I: sink.c: device.form_factor = "internal"
I: sink.c: device.string = "surround40:0"
I: sink.c: device.buffering.buffer_size = "3528320"
I: sink.c: device.buffering.fragment_size = "705664"
I: sink.c: device.access_mode = "mmap+timer"
I: sink.c: device.profile.name = "analog-surround-40"
I: sink.c: device.profile.description = "Analog Surround 4.0"
I: sink.c: device.description = "Internal Audio Analog Surround 4.0"
I: sink.c: alsa.mixer_name = "Realtek ALC1200"
I: sink.c: alsa.components = "HDA:10ec0888,104382fe,00100101"
I: sink.c: module-udev-detect.discovered = "1"
I: sink.c: device.icon_name = "audio-card-pci"
D: core-subscribe.c: Dropped redundant event due to change event.
I: module-device-restore.c: Restoring volume for source alsa_output.pci-0000_00_1b.0.analog-surround-40.monitor.
I: module-device-restore.c: Restoring mute state for source alsa_output.pci-0000_00_1b.0.analog-surround-40.moni...

Read more...

Changed in alsa-driver:
status: Unknown → New
Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 761312] Re: pulseaudio glitch-free mode causes audio to break after a while on snd_hda_intel

I have now downgraded to the pulseaudio packages from Maverick and the problem has disappeared.

so this would suggest that it is a regression in pulseaudio or libpulse0

Revision history for this message
Tim Lunn (darkxst) wrote :

Latest update on this issue which has been driving me crazy for the most part.

Decided to start with a fresh install of Oneiric (alpha 3+updates) and see if it still a problem. Unfortunately it is. Hopefully it gets fixes
sometime!

Atleast the bug in audio-symtpoms.py is now fixed, so people should be able to report bugs with ubuntu-bug here on in!

On 06/13/2011 09:06 AM, Tim wrote:
> I have now downgraded to the pulseaudio packages from Maverick and the
> problem has disappeared.
>
> so this would suggest that it is a regression in pulseaudio or libpulse0
>

Revision history for this message
mp (m-p) wrote :

No news?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 11.04 (natty) reached end-of-life on October 28, 2012.

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

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

affects: alsa-driver → ubuntu
no longer affects: ubuntu
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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