本周末,我在 Dell XPS 7390 上安装了 Ubuntu 20.04,但似乎无法使声卡工作,根据 BIOS,声卡配有 Realtek ALC3271 控制器。pavucontrol
除了虚拟输出外,没有显示任何接收器或源。以下是我尝试过并到目前为止能够找到的方法:
$ pacmd list-cards
0 card(s) available.
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], Device 0: HDA Analog (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 1: HDA Digital (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 3: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 4: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], Device 5: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
(这里没有内置声卡的迹象。)
输出hwinfo
:
$ hwinfo --sound
19: PCI 1f.3: 0403 Audio device
[Created at pci.386]
Unique ID: nS1_.MDj4I2BvgV7
SysFS ID: /devices/pci0000:00/0000:00:1f.3
SysFS BusID: 0000:00:1f.3
Hardware Class: sound
Model: "Intel Audio device"
Vendor: pci 0x8086 "Intel Corporation"
Device: pci 0x02c8
SubVendor: pci 0x1028 "Dell"
SubDevice: pci 0x0962
Driver: "sof-audio-pci"
Driver Modules: "snd_sof_pci"
Memory Range: 0x604b118000-0x604b11bfff (rw,non-prefetchable)
Memory Range: 0x604b000000-0x604b0fffff (rw,non-prefetchable)
IRQ: 170 (1726 events)
Module Alias: "pci:v00008086d000002C8sv00001028sd00000962bc04sc03i80"
Driver Info #0:
Driver Status: snd_hda_intel is active
Driver Activation Cmd: "modprobe snd_hda_intel"
Driver Info #1:
Driver Status: snd_sof_pci is active
Driver Activation Cmd: "modprobe snd_sof_pci"
Config Status: cfg=new, avail=yes, need=no, active=unknown
音频相关输出lspci
:
$ sudo lspci -v
00:1f.3 Audio device: Intel Corporation Device 02c8 (prog-if 80)
Subsystem: Dell Device 0962
Flags: bus master, fast devsel, latency 64, IRQ 170
Memory at 604b118000 (64-bit, non-prefetchable) [size=16K]
Memory at 604b000000 (64-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 3
Capabilities: [80] Vendor Specific Information: Len=14 <?>
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Kernel driver in use: sof-audio-pci
Kernel modules: snd_hda_intel, snd_sof_pci
奇怪的是,当我写这篇文章的时候,的输出$ sudo lspci -v
正在改变。当我一分钟前再次执行它时,与音频相关的输出突然变成了
$ sudo lspci -v
00:15.1 Serial bus controller [0c80]: Intel Corporation Comet Lake Serial IO I2C Host Controller
Subsystem: Dell Device 0962
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at 4010001000 (64-bit, non-prefetchable) [virtual] [size=4K]
...skipping...
Kernel driver in use: sof-audio-pci
Kernel modules: snd_hda_intel, snd_sof_pci
上面没有 02c8 设备的迹象。但截至目前,它又恢复到“正常”状态(即之前的输出,见上文)。
与此同时,的输出dmesg
根本没有改变,据我所知,它报告一切正常:
$ dmesg | grep audio
[ 14.047977] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 14.047988] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 14.048210] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 14.048290] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 14.054734] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 14.118496] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[ 14.118498] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 14.213711] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[ 14.213712] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:13:0
[ 14.213970] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 14.216836] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:13:0
[ 14.216840] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[ 14.219998] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[ 14.220000] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[ 14.221323] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[ 14.221324] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[ 14.222260] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[ 14.222263] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[ 14.223154] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[ 14.223156] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[ 14.223157] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[ 14.223159] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[ 14.223160] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[ 14.223161] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[ 14.224026] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[ 14.224028] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[ 14.224870] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[ 14.224872] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[ 14.225704] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[ 14.229492] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[ 14.246407] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC3271: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 14.246408] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 14.246409] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 14.246409] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
[ 14.246410] snd_hda_codec_realtek ehdaudio0D0: inputs:
[ 14.246410] snd_hda_codec_realtek ehdaudio0D0: Headset Mic=0x19
[ 14.246411] snd_hda_codec_realtek ehdaudio0D0: Headphone Mic=0x1b
[ 14.246412] snd_hda_codec_realtek ehdaudio0D0: Internal Mic=0x12
[ 14.295052] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[ 14.295055] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[ 3180.256625] sof-audio-pci 0000:00:1f.3: firmware boot complete
到目前为止我已经尝试过:
- 添加
options snd-hda-intel model=generic
/etc/modprobe.d/alsa-base.conf
- 添加
options snd-hda-intel model=auto
/etc/modprobe.d/alsa-base.conf
- 在 BIOS 中禁用声卡,启动 Ubuntu,重新启动并在 BIOS 中再次启用声卡,再次启动 Ubuntu(按照建议这里)
可能相关(或类似)的问题:
- askubuntu.com:英特尔公司设备 02c8 没有声音 20.04: 这可以和我遇到的问题一样,但 OP 没有提供太多信息,我也不想劫持他的问题来达到我的目的。因此,我希望你不要将我的问题声明为重复。
- reddit.com:HP Pro Book 没有声音。已安装 alsa 和 alsa-firmware。现在怎么办?
- tonymax86.com:戴尔 XPS 9730 - Realtek ALC3271 - 音频 - High Sierra
- bugs.launchpad.net:XPS 13 7390 2-in-1,英特尔 Icelake HDMI,数字输出,HDMI:声音很少起作用
- linux.org:华硕 Zenbook 15 UX534F Realtek HD 音频问题
- forum.manjaro.org:ALC294 模拟 - 检测到音频卡,但内部或耳机无声音
答案1
通过添加条目,snd_hda_intel.dmic_detect=0
我可以修复运行 Xubuntu 20.04 的 Dell XPS 13 7390 上无法检测到声卡的问题。GRUB_CMDLINE_LINUX_DEFAULT
/etc/default/grub
示例条目/etc/default/grub
:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep snd_hda_intel.dmic_detect=0"
编辑文件后,只需运行sudo update-grub
并重新启动。
注意:只有该snd_hda_intel.dmic_detect
参数与声卡问题有关。您可以mem_sleep_default
在以下位置找到此机器的其他有用调整(例如这篇 Debian 维基文章。