Audio skips (buffer underruns) intermittently but particularly when screen blanks

Bug #1539967 reported by Francis Chin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Audio playback via ALSA (snd_intel_hda) & pulseaudio inevitably 'skips' (repeats buffer content) intermittently a few times each hour, and severely whenever the screen is blanked for inactivity.

CPU load is low (mostly idle).

I didn't have this problem with my previous fresh installation of Ubuntu (14.04.3 LTS) on this hardware.

From dmesg, kernel appears to be using the TSC clocksource:
[ 3.180127] clocksource: Switched to clocksource tsc

Upon startup, Pulseaudio sees high resolution timers:
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!

When audio skips, alsa-sink.c logs a massive scheduling delay (e.g. 1070.00 ms > 15.99 ms) and also that "snd_pcm_avail() returned a value that is exceptionally large: 623124 bytes (1177 ms)"

Currently running Ubuntu 15.10 Wily (fresh install).
linux-sound-base:
  Installed: 1.0.25+dfsg-0ubuntu5
pulseaudio:
Installed: 1:6.0-0ubuntu13

Audio output used is Built-in Audio Analogue Surround 5.1 (motherboard audio, Realtek ALC889A)

Attaching log from pulseaudio -vvvv

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: alsa-base 1.0.25+dfsg-0ubuntu5
ProcVersionSignature: Ubuntu 4.2.0-25.30-generic 4.2.6
Uname: Linux 4.2.0-25-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl fglrx
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: chinf 7928 F...m pulseaudio
 /dev/snd/controlC0: chinf 7928 F.... pulseaudio
 /dev/snd/controlC1: chinf 7928 F.... pulseaudio
CurrentDesktop: Unity
Date: Sat Jan 30 18:17:01 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-12-11 (50 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_Card: Built-in Audio - HDA ATI SB
Symptom_Jack: Green Line Out, Rear
Symptom_Type: Sound works for a while, then breaks
Title: [GA-MA790GP-DS4H, Realtek ALC889A, Green Line Out, Rear] fails after a while
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/16/2009
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F6
dmi.board.name: GA-MA790GP-DS4H
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF6:bd09/16/2009:svnGigabyteTechnologyCo.,Ltd.:pnGA-MA790GP-DS4H:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-MA790GP-DS4H:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: GA-MA790GP-DS4H
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
mtime.conffile..etc.modprobe.d.alsa.base.conf: 2016-01-12T14:13:00.166647

Revision history for this message
Francis Chin (chinf) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

59001.166788] pavucontrol[3288]: segfault at 0 ip 00007f1b8bfd5084 sp 00007ffc7559e310 error 4 in libpixman-1.so.0.32.6[7f1b8bf87000+a5000]
 [75134.180956] traps: Compositor[24362] general protection ip:561f8a9cba52 sp:7f57917511a0 error:0 in chrome[561f8980b000+5a2d000]
[283749.002864] CE: hpet increased min_delta_ns to 30172 nsec
[413910.079197] CE: hpet increased min_delta_ns to 45258 nsec
[415104.464631] chrome: page allocation failure: order:4, mode:0x40d0
[415104.464638] CPU: 1 PID: 3181 Comm: chrome Tainted: P OE 4.2.0-25-generic #30-Ubuntu [415104.464640] Hardware name: Gigabyte Technology Co., Ltd. GA-MA790GP-DS4H/GA-MA790GP-DS4H, BIOS F6 09/16/2009
 [415104.464643] 0000000000000000 0000000036cc3fa3 ffff88038b573438 ffffffff817e94c9 [415104.464645] 0000000000000000 00000000000040d0 ffff88038b5734c8 ffffffff81187be2
 [415104.464648] 0000000000000000 0000000000000004 0000000000000040 ffff8800c98d4b00
 [415104.464650] Call Trace: [415104.464657] [<ffffffff817e94c9>] dump_stack+0x45/0x57 [415104.464660] [<ffffffff81187be2>] warn_alloc_failed+0xf2/0x140 [415104.464663] [<ffffffff8118b4de>] ? __alloc_pages_direct_compact+0xee/0xf0 [415104.464665] [<ffffffff8118b7c4>] __alloc_pages_nodemask+0x2e4/0xa10 [415104.464668] [<ffffffff811d31a1>] alloc_pages_current+0x91/0x100 [415104.464670] [<ffffffff81187dab>] alloc_kmem_pages+0x3b/0xe0 [415104.464673] [<ffffffff811a727e>] kmalloc_order_trace+0x2e/0xc0 [415104.464676] [<ffffffff811decdd>] __kmalloc+0x21d/0x250 [415104.464765] [<ffffffffc019d193>] ? KCL_MEM_SmallBufferAlloc+0x13/0x20 [fglrx] [415104.464804] [<ffffffffc019d193>] KCL_MEM_SmallBufferAlloc+0x13/0x20 [fglrx] [415104.464844] [<ffffffffc01a4493>] drm_alloc+0xc3/0x1a0 [fglrx] [415104.464888] [<ffffffffc01c4355>] ? __alloc_memory_uswc+0x65/0x260 [fglrx] [415104.464931] [<ffffffffc01c243e>] ? gal_alloc_gart_memory+0x3e/0xa0 [fglrx] [415104.464974] [<ffffffffc01cca91>] ? __mc_heap_alloc_memory+0xf1/0x1f0 [fglrx] [415104.465017] [<ffffffffc01c7ba4>] ? mc_heap_allocate_memory+0x74/0x130 [fglrx] [415104.465060] [<ffffffffc01badd4>] ? MCIL_AllocateMemoryInDescriptor+0x74/0xe0 [fglrx] [415104.465125] [<ffffffffc026e38f>] ? _ZN2OS10gart_AllocEP7CMMPoolmmRm9_CMM_HEAP+0xef/0x1f0 [fglrx]
[415104.465183] [<ffffffffc02488a6>] ? _ZN12CMMHeap_GART10expandHeapEmRmPv+0x76/0x100 [fglrx] [415104.465239] [<ff

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
David Ortner (davgd) wrote :

Output from alsa-info.sh. Please let me know if I can provide with any other information.

Revision history for this message
Raymond (superquad-vortex2) wrote :

lsa-sink-ALC889A Analog] alsa-util.c: appl_ptr : 3223857 ( 89.879| 0.000) E: [alsa-sink-ALC889A Analog] alsa-util.c: hw_ptr : 3270344 ( 89.880| 0.001) D: [alsa-sink-ALC889A Analog] protocol-native.c: Implicit underrun of 'Playback' ( 89.881| 0.000) E: [alsa-sink-ALC889A Analog] alsa-util.c: snd_pcm_delay() returned a value that is exceptionally large: -368568 bytes (-696 ms).

appl_ptr was behind hw_ptr , this mean pulseaudio i/o thread did not write sufficient audio to driver

Revision history for this message
Raymond (superquad-vortex2) wrote :

You need to enable DEBUG_TIMING and recompile pulseaudio to keep track of those writes

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa?id=26a270a934f0f174f7bd7eb89e85301963721deb

Revision history for this message
David Ortner (davgd) wrote :

My issue has been solved. My Onkyo reciever was set to default to HDMI audio and not S/PDIF, which caused audio skips. Please ignore my alsa-info.sh dump.

Changed in alsa-driver (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Francis Chin (chinf) wrote :

I found that disabling AMD C1E support in BIOS mitigates this issue (and also another problem I had with boot stalling without mouse/keyboard input) - this bug may be a duplicate of https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1012806.

The Phenom II X3 710 supports C1E power saving state, and BIOS F6 is the most recent release for the motherboard GA-MA790GP-DS4H.

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 1274115, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

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.