Score:2

Pulseaudio stuttering, client kicked every few seconds

cn flag

I haven't been able to find a similar issue to mine. In short, this has persisted across distros, multiple reinstalls of pulseaudio, and fresh installs of Ubuntu.

What happens is exactly as the topic says. Audio frequently skips. When I kill pulseaudio this is no longer the case, but then of course I'm without the per-application control that I get from pulse, and I'd have to rebind volume controls for alsa. When I open pavucontrol, every few seconds, it blanks with the message "Establishing connection to pulseaudio, please wait". This correlates with the audio skipping, it briefly cuts out whenever pavucontrol disconnects, although the disconnection also happens even when nothing is playing. Something similar seems to happen with the volume controller built into GNOME, it will briefly appear to max out the volume in time with the skips.

Running pulseaudio from terminal, some but not all of the skips seem to be correlated with the error message E: [pulseaudio] protocol-native.c: protocol error, kicking client, which occurs every few seconds, just before the skipping/disconnection, even when nothing is playing.

Here is a dump of /proc/asound/cards:

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7210000 irq 33
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7080000 irq 17

Sound card 0 is in use.

And pulseaudio -vvvv near the error (it keeps going afterwards):

D: [pulseaudio] alsa-mixer.c: Jack Headphone Phantom, alsa_name='Headphone Phantom Jack', index='0', detection unavailable
D: [pulseaudio] alsa-mixer.c: Jack Headphone Mic, alsa_name='Headphone Mic Jack', index='0', detection unavailable
D: [pulseaudio] alsa-mixer.c: Jack Headphone - Output, alsa_name='Headphone - Output Jack', index='0', detection unavailable
I: [pulseaudio] alsa-sink.c: Successfully enabled deferred volume.
I: [pulseaudio] alsa-sink.c: Hardware volume ranges from -179.00 dB to 0.00 dB.
I: [pulseaudio] alsa-sink.c: Fixing base volume to 0.00 dB
I: [pulseaudio] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
I: [pulseaudio] alsa-sink.c: Using hardware mute control.
D: [pulseaudio] alsa-util.c: snd_pcm_dump():
D: [pulseaudio] alsa-util.c: Soft volume PCM
D: [pulseaudio] alsa-util.c: Control: PCM Playback Volume
D: [pulseaudio] alsa-util.c: min_dB: -51
D: [pulseaudio] alsa-util.c: max_dB: 0
D: [pulseaudio] alsa-util.c: resolution: 256
D: [pulseaudio] alsa-util.c: Its setup is:
D: [pulseaudio] alsa-util.c:   stream       : PLAYBACK
D: [pulseaudio] alsa-util.c:   access       : MMAP_INTERLEAVED
D: [pulseaudio] alsa-util.c:   format       : S16_LE
D: [pulseaudio] alsa-util.c:   subformat    : STD
D: [pulseaudio] alsa-util.c:   channels     : 2
D: [pulseaudio] alsa-util.c:   rate         : 44100
D: [pulseaudio] alsa-util.c:   exact rate   : 44100 (44100/1)
D: [pulseaudio] alsa-util.c:   msbits       : 16
D: [pulseaudio] alsa-util.c:   buffer_size  : 88200
D: [pulseaudio] alsa-util.c:   period_size  : 44100
D: [pulseaudio] alsa-util.c:   period_time  : 1000000
D: [pulseaudio] alsa-util.c:   tstamp_mode  : ENABLE
D: [pulseaudio] alsa-util.c:   tstamp_type  : MONOTONIC
D: [pulseaudio] alsa-util.c:   period_step  : 1
D: [pulseaudio] alsa-util.c:   avail_min    : 87319
D: [pulseaudio] alsa-util.c:   period_event : 0
D: [pulseaudio] alsa-util.c:   start_threshold  : -1
D: [pulseaudio] alsa-util.c:   stop_threshold   : 6206523236469964800
D: [pulseaudio] alsa-util.c:   silence_threshold: 0
D: [pulseaudio] alsa-util.c:   silence_size : 0
D: [pulseaudio] alsa-util.c:   boundary     : 6206523236469964800
D: [pulseaudio] alsa-util.c: Slave: Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
D: [pulseaudio] alsa-util.c: Its setup is:
D: [pulseaudio] alsa-util.c:   stream       : PLAYBACK
D: [pulseaudio] alsa-util.c:   access       : MMAP_INTERLEAVED
D: [pulseaudio] alsa-util.c:   format       : S16_LE
D: [pulseaudio] alsa-util.c:   subformat    : STD
D: [pulseaudio] alsa-util.c:   channels     : 2
D: [pulseaudio] alsa-util.c:   rate         : 44100
D: [pulseaudio] alsa-util.c:   exact rate   : 44100 (44100/1)
D: [pulseaudio] alsa-util.c:   msbits       : 16
D: [pulseaudio] alsa-util.c:   buffer_size  : 88200
D: [pulseaudio] alsa-util.c:   period_size  : 44100
D: [pulseaudio] alsa-util.c:   period_time  : 1000000
D: [pulseaudio] alsa-util.c:   tstamp_mode  : ENABLE
D: [pulseaudio] alsa-util.c:   tstamp_type  : MONOTONIC
D: [pulseaudio] alsa-util.c:   period_step  : 1
D: [pulseaudio] alsa-util.c:   avail_min    : 87319
D: [pulseaudio] alsa-util.c:   period_event : 0
D: [pulseaudio] alsa-util.c:   start_threshold  : -1
D: [pulseaudio] alsa-util.c:   stop_threshold   : 6206523236469964800
D: [pulseaudio] alsa-util.c:   silence_threshold: 0
D: [pulseaudio] alsa-util.c:   silence_size : 0
D: [pulseaudio] alsa-util.c:   boundary     : 6206523236469964800
D: [pulseaudio] alsa-util.c:   appl_ptr     : 0
D: [pulseaudio] alsa-util.c:   hw_ptr       : 0
D: [alsa-sink-ALC887-VD Analog] alsa-sink.c: Thread starting up
D: [pulseaudio] alsa-sink.c: Requested volume: front-left: 30419 /  46% / -20.00 dB,   front-right: 30419 /  46% / -20.00 dB
D: [pulseaudio] alsa-sink.c: Got hardware volume: front-left: 30419 /  46% / -20.00 dB,   front-right: 30419 /  46% / -20.00 dB
D: [pulseaudio] alsa-sink.c: Calculated software volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB (accurate-enough=yes)
D: [alsa-sink-ALC887-VD Analog] util.c: RealtimeKit worked.
I: [alsa-sink-ALC887-VD Analog] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
D: [pulseaudio] sink.c: alsa_output.pci-0000_00_1b.0.analog-stereo: state: INIT -> IDLE
I: [alsa-sink-ALC887-VD Analog] alsa-sink.c: Starting playback.
D: [pulseaudio] source.c: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor: state: INIT -> IDLE
D: [pulseaudio] module-device-restore.c: Could not set format on sink alsa_output.pci-0000_00_1b.0.analog-stereo
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
D: [pulseaudio] module-switch-on-connect.c: Trying to switch to new sink alsa_output.pci-0000_00_1b.0.analog-stereo
D: [pulseaudio] module-switch-on-connect.c: Refusing to switch to sink on pci bus
I: [pulseaudio] core.c: default_sink: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 -> alsa_output.pci-0000_00_1b.0.analog-stereo
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] card.c: alsa_card.pci-0000_00_1b.0: active_profile: output:iec958-stereo+input:analog-stereo -> output:analog-stereo+input:analog-stereo
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1b.0 profile output:analog-stereo to availability status unknown
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] module-alsa-card.c: Jack 'Front Mic Jack' is now unplugged
D: [pulseaudio] device-port.c: Setting port analog-input-front-mic to status no
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] core.c: default_source: alsa_input.pci-0000_00_1b.0.analog-stereo -> alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
D: [pulseaudio] module-switch-on-port-available.c: Trying to switch away from port analog-input-front-mic, found no better option
D: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1b.0 profile input:analog-stereo to availability status no
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
E: [pulseaudio] protocol-native.c: protocol error, kicking client

There are no other error messages, but frustratingly, the skipping/disconnection appears to occur even when there is no error. Pulseaudio's output will generally hang for a split second, and it will seem to be working fine, then a skip and the output resumes. Sample outputs from immediately after a skip:

D: [pulseaudio] module-stream-restore.c: Not restoring device for stream source-output-by-application-id:org.PulseAudio.pavucontrol, because already set
D: [pulseaudio] module-intended-roles.c: Not setting device for stream Peak detect, because already set.
D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"float32le\""  format.rate = "25"  format.channels = "1"  format.channel_map = "\"mono\""
I: [pulseaudio] source-output.c: Trying to change sample spec
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
D: [pulseaudio] resampler.c: Resampler:
D: [pulseaudio] resampler.c:   rate 44100 -> 25 (method peaks)
D: [pulseaudio] resampler.c:   format s16le -> float32le (intermediate s16le)
D: [pulseaudio] resampler.c:   channels 2 -> 1 (resampling 1)
D: [pulseaudio] resampler.c: Channel matrix:
D: [pulseaudio] resampler.c:        I00   I01 
D: [pulseaudio] resampler.c:     +------------
D: [pulseaudio] resampler.c: O00 | 0.500 0.500
I: [pulseaudio] remap.c: Using stereo to mono remapping
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: [pulseaudio] source-output.c: Created output 1 "Peak detect" on alsa_output.pci-0000_00_1b.0.analog-stereo.monitor with sample spec float32le 1ch 25Hz and channel map mono
I: [pulseaudio] source-output.c:     media.name = "Peak detect"
I: [pulseaudio] source-output.c:     application.name = "PulseAudio Volume Control"

Before this it hung on D: [pulseaudio] source.c: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor: state: IDLE -> RUNNING

D: [pulseaudio] module-stream-restore.c: Not restoring device for stream source-output-by-application-id:org.PulseAudio.pavucontrol, because already set
D: [pulseaudio] module-intended-roles.c: Not setting device for stream Peak detect, because already set.
D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"float32le\""  format.rate = "25"  format.channels = "1"  format.channel_map = "\"mono\""
I: [pulseaudio] source-output.c: Trying to change sample spec
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes idle, timeout in 5 seconds.
D: [pulseaudio] resampler.c: Resampler:
D: [pulseaudio] resampler.c:   rate 44100 -> 25 (method peaks)
D: [pulseaudio] resampler.c:   format s16le -> float32le (intermediate s16le)
D: [pulseaudio] resampler.c:   channels 2 -> 1 (resampling 1)
D: [pulseaudio] resampler.c: Channel matrix:
D: [pulseaudio] resampler.c:        I00   I01 
D: [pulseaudio] resampler.c:     +------------
D: [pulseaudio] resampler.c: O00 | 0.500 0.500
I: [pulseaudio] remap.c: Using stereo to mono remapping
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: [pulseaudio] source-output.c: Created output 1 "Peak detect" on alsa_output.pci-0000_00_1b.0.analog-stereo.monitor with sample spec float32le 1ch 25Hz and channel map mono
I: [pulseaudio] source-output.c:     media.name = "Peak detect"
I: [pulseaudio] source-output.c:     application.name = "PulseAudio Volume Control"

Before this it hung on D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.pci-0000_00_1b.0.

Nmath avatar
ng flag
Generally when a problem persists across multiple operating systems and system reinstalls, it is either a hardware problem or a bug with the software. Consider filing a bug report.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.