我找不到与我类似的问题。简而言之,这个问题在发行版、多次重新安装 pulseaudio 和全新安装 Ubuntu 后仍然存在。
所发生的情况与主题所述完全一致。音频经常跳音。当我关闭 pulseaudio 时,这种情况不再存在,但当然,我失去了从 pulse 获得的每个应用程序控制,并且我必须重新绑定 alsa 的音量控制。当我打开 pavucontrol 时,每隔几秒钟,它就会空白,并显示消息“正在建立与 pulseaudio 的连接,请等待”。这与音频跳音有关,只要 pavucontrol 断开连接,它就会短暂切断,尽管即使没有播放任何内容也会断开连接。GNOME 内置的音量控制器似乎也发生了类似的事情,它会在跳音时短暂地将音量调到最大。
从终端运行时pulseaudio
,一些但不是全部的跳过似乎与错误消息相关E: [pulseaudio] protocol-native.c: protocol error, kicking client
,该消息每隔几秒钟出现一次,就在跳过/断开连接之前,即使没有播放任何内容。
以下是一份转储/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
声卡 0 正在使用中。
并且pulseaudio -vvvv
接近错误(之后它会继续):
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
没有其他错误消息,但令人沮丧的是,即使没有错误,也会出现跳过/断开连接的情况。Pulseaudio 的输出通常会挂起一瞬间,看起来工作正常,然后跳过并恢复输出。跳过后立即输出的示例:
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"
在此之前它一直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"
在此之前它一直D: [pulseaudio] module-udev-detect.c: Resuming all sinks and sources of card alsa_card.pci-0000_00_1b.0.