昨天的情况:内置扬声器和耳机的声音效果很好。有一次,我同时启动了 Windows VM 和屏幕共享 Zoom 通话;这对我的笔记本电脑来说太过分了,它崩溃了。
今天的情况:我打开笔记本电脑,但听不到任何声音,无论是内置扬声器还是耳机。如果我运行pavucontrol
,我播放音频文件时会看到输出电平监视器上升和下降,但听不到任何声音。如果我静音/取消静音、更改音量、更改“配置文件”等,这种情况不会改变。系统声音设置显示“扬声器”和“耳机”作为可能的输出。
系统详细信息:
$ lspci -v
[...]
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) (prog-if 80)
Subsystem: Dell Sunrise Point-LP HD Audio
Flags: bus master, fast devsel, latency 32, IRQ 140
Memory at d1128000 (64-bit, non-prefetchable) [size=16K]
Memory at d1100000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_soc_skl
[...]
$ echo list-sinks | pacmd
1 sink(s) available.
* index: 0
name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9039
volume: front-left: 58980 / 90% / -2.75 dB, front-right: 58980 / 90% / -2.75 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 0
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 341.33 ms
card: 0 <alsa_card.pci-0000_00_1f.3>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC3253 Analog"
alsa.id = "ALC3253 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xd1128000 irq 140"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9d71"
device.product.name = "Sunrise Point-LP HD Audio"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC3253"
alsa.components = "HDA:10ec0225,10280740,00100002"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-speakers"
analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-speaker>
$ lsmod | grep snd
snd_soc_skl 86016 0
snd_soc_skl_ipc 65536 1 snd_soc_skl
snd_hda_ext_core 24576 1 snd_soc_skl
snd_soc_sst_dsp 32768 1 snd_soc_skl_ipc
snd_soc_sst_ipc 16384 1 snd_soc_skl_ipc
snd_soc_acpi 16384 1 snd_soc_skl
snd_soc_core 241664 1 snd_soc_skl
snd_compress 20480 1 snd_soc_core
snd_hda_codec_realtek 106496 1
ac97_bus 16384 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hda_codec_generic 73728 1 snd_hda_codec_realtek
snd_hda_intel 45056 6
snd_hda_codec 126976 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 81920 6 snd_hda_codec_generic,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_skl
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 98304 7 snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
snd_seq_midi 16384 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_rawmidi 32768 1 snd_seq_midi
snd_seq 65536 2 snd_seq_midi,snd_seq_midi_event
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer 32768 2 snd_seq,snd_pcm
snd 81920 24 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
$ sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: gdm 1967 F.... pulseaudio
shardul 4099 F.... pulseaudio
$ uname -a
Linux shardul-laptop 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
/var/log/syslog
在或中搜索 Pulseaudio 和 ALSA 的输出dmesg
不会显示任何错误,除非偶尔出现,
[alsa-sink-ALC3253 Analog] alsa-sink.c: Error opening PCM device front:0: Device or resource busy
[pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
我尝试手动取消暂停水槽,pacmd
但没有任何变化。我还尝试过:
- 重新安装 pulseaudio、alsa-base 和 linux-sound-system
- 彻底卸载 alsa-base
- 将我自己加入
audio
群组 - 大量 pulseaudio 被终止并重启,alsa 重新加载
- 在整个调试过程中重新启动多次
我怎样才能让我的音频再次工作?感谢您的关注。
答案1
原来这是由于最近的内核升级造成的,从 4.15.0-96 升级到了 4.15.0-101。我没有立即发现问题,因为新内核只有在重启后才能使用,而由于我的问题中描述的崩溃,我不得不重启。这虽然我的笔记本电脑是 Inspiron 5378 而不是 5368,但这是相关的内核错误。我可以通过以下方式解决问题:
sudo apt-get purge pulseaudio alsa-base
- 重新启动,在启动时选择较旧的内核版本
sudo apt-get install pulseaudio alsa-base
- 重启,再次选择旧内核
不确定这是否足以为其他人修复此问题,因为我在发现此问题之前已重新安装、删除配置、调整设置等很多次。
答案2
这最新版本(kernel.zip) 帮我修复了这个问题。Heikomat 的解决方案非常棒,值得称赞。