首先:通过 RDP(远程桌面连接)虚拟声音 iE NoMachine运行良好,只有内置扬声器和耳机没有声音。声音驱动程序(声音开放固件由 github 源 v2.2(在最近的 v2.12 之前)安装)。声卡是英特尔snd_hda_intel。
我关注了网络上关于 Linux Mint 或 Ubuntu 22 的几个链接,它们总是类似这样的:
- 安装 ALSA
- 重新安装音响系统并重新启动 alsa
- (重新)安装管线
- 安装并配置 hdajackretask(我认为这是最没有希望的方法)
包括重新启动 alsa,
# dmesg | grep snd
[ 659.315312] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 659.315388] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 659.678692] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 659.678695] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 659.678697] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 659.678698] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
[ 659.678699] snd_hda_codec_realtek ehdaudio0D0: inputs:
[ 659.678699] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
获取系统信息(最后两行音频):
# inxi -SMA
System:
Host: HP-ENVY-Laptop-13-aq1176ng Kernel: 6.8.0-52-generic arch: x86_64
bits: 64
Desktop: Cinnamon v: 6.4.6 Distro: Linux Mint 22.1 Xia
Machine:
Type: Laptop System: HP product: HP ENVY Laptop 13-aq1xxx
v: Type1ProductConfigId serial: 8CG0165VNF
Mobo: HP model: 86AE v: 83.18 serial: PJEKT1DHCDM061 UEFI: Insyde v: F.22
date: 11/24/2023
Audio:
Device-1: Intel Comet Lake PCH-LP cAVS driver: sof-audio-pci-intel-cnl
API: ALSA v: k6.8.0-52-generic status: kernel-api
启动过程中‘snd’的日志重新硬化结果对我来说看起来很好:
$ journalctl -b -x | grep -i snd
Oct 17 19:15:17 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
Oct 17 19:15:17 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: inputs:
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: inputs:
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
到目前为止还没有结果。唯一可行的是,如果你通过 NoMachine 连接,声音就会传输到远程计算机。
所以我认为声音是产生的,但在操作系统抽象层到硬件之间的某个地方存在问题。我恳求您提供想法或解决方案(树)!
[编辑]
aplay-l输出
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 0/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
lspci 输出:
# lspci
00:00.0 Host bridge: Intel Corporation Comet Lake-U v1 4c Host Bridge/DRAM Controller (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Comet Lake Thermal Subsytem
00:14.0 USB controller: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller
00:14.2 RAM memory: Intel Corporation Comet Lake PCH-LP Shared SRAM
00:14.3 Network controller: Intel Corporation Comet Lake PCH-LP CNVi WiFi
00:14.5 SD Host controller: Intel Corporation Comet Lake PCH-LP SCS3
00:15.0 Serial bus controller: Intel Corporation Serial IO I2C Host Controller
00:15.1 Serial bus controller: Intel Corporation Comet Lake Serial IO I2C Host Controller
00:16.0 Communication controller: Intel Corporation Comet Lake Management Engine Interface
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode]
00:1c.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #9 (rev f0)
00:1d.4 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #13 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Comet Lake PCH-LP LPC Premium Controller/eSPI Controller
00:1f.3 Multimedia audio controller: Intel Corporation Comet Lake PCH-LP cAVS
00:1f.4 SMBus: Intel Corporation Comet Lake PCH-LP SMBus Host Controller
00:1f.5 Serial bus controller: Intel Corporation Comet Lake SPI (flash) Controller
02:00.0 3D controller: NVIDIA Corporation GP108BM [GeForce MX250] (rev a1)
04:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller S4LV008[Pascal]
dmesg|grep audio的输出
# dmesg |grep audio
[ 15.060429] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 15.060582] sof-audio-pci-intel-cnl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 15.060596] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 15.060801] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 15.060876] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 15.067813] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[ 15.108086] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 5
[ 15.108092] sof-audio-pci-intel-cnl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 15.108097] sof-audio-pci-intel-cnl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 15.113689] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[ 15.113694] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware file: intel/sof/sof-cml.ri
[ 15.113697] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-hda-generic-2ch.tplg
[ 15.116471] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 15.116474] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 15.116481] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 15.216153] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 15.216160] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 15.236595] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[ 15.257684] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 15.257692] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 15.257695] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 15.257697] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
[ 15.257699] snd_hda_codec_realtek ehdaudio0D0: inputs:
[ 15.257701] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
[ 4302.743485] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4302.743565] sof-audio-pci-intel-cnl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 4302.744012] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 4302.744080] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 4302.750643] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[ 4302.764441] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 5
[ 4302.764450] sof-audio-pci-intel-cnl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 4302.764457] sof-audio-pci-intel-cnl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 4302.766353] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[ 4302.766357] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware file: intel/sof/sof-cml.ri
[ 4302.766358] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-hda-generic-2ch.tplg
[ 4302.768019] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 4302.768022] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.768029] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 4302.880559] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 4302.880569] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.881182] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.897218] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 4302.897226] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4302.897229] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 4302.897232] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
[ 4302.897233] snd_hda_codec_realtek ehdaudio0D0: inputs:
[ 4302.897235] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
[编辑 3] Alsamixer 的图片。如果设备在列中的数字周围是绿色,则表示设备已静音,反之亦然?另外还有声卡列表,实际上是默认声卡和 sof-hda-default。
但在 alsamixer 中更改音量或静音不会改变扬声器中缺失的声音,并且所做的更改在启动后不会保留:
我的声音终于可以正常工作了。以下是我记得的近似解决方案的步骤:
经验教训:
alsactl store
其后立即执行我按照此“虚拟输出无声音”第 2..4 页的操作,应用了例如“虚拟输出无声音 - 第 3 页”并将 GRUB 命令行更改为:
并使用以下命令更新 GRUB
我还运行 alsamixer 并将所有控件置于高级别
我创建了以下文件并将选项设置为“1”:
我已开始
发现所有控件都使用了错误的输出,并且级别都接近于零。在 2019 年的 UBUNTU 论坛主题中,我读到 pavucontrol 可能会在启动 alsamixer 设置期间覆盖。虽然 pulseaudio 没有作为服务运行,但我不知道为什么 pavucontrol 负责。但在那之后,自 1 月底安装以来,我第一次听到了扬声器和耳机的声音!这一定是所有经验教训的结合,因为我之前肯定多次遵循并运行过 alsamixer 和 pavucontrol。唯一稳定的是解决方案本身的不稳定性。所以我很确定,我中间的解决方案步骤非但无济于事,反而破坏了整个过程。
一个要点是将声音驱动程序更新到提到的 sof-bin 项目。
我认为重点是更新 grub 命令行和驱动程序。最后重新配置 pavucontrol 使声音再次变得悦耳。也许 NoMachine RDP 应用程序在不向扬声器和耳机提供声音方面发挥了一定作用。当涉及到音量时,有多少东西必须正确对齐,这令人困惑。Linux 的声音系统不是很直观,有许多隐藏的依赖关系。如果有架构概述和手册就好了。
注解