我在笔记本电脑上安装了 Ubuntu 22.04 LTS,虽然一切运行正常,但我的电脑没有声音。
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
Subsystem: Hewlett-Packard Company Pavilion Laptop 15-cw1xxx
Flags: fast devsel
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
Subsystem: Hewlett-Packard Company Pavilion Laptop 15-cw1xxx
Flags: bus master, fast devsel, latency 0, IRQ 48, IOMMU group 10
Memory at fe7c8000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [48] Vendor Specific Information: Len=08 <?>
Capabilities: [50] Power Management version 3
Capabilities: [64] Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
Subsystem: Hewlett-Packard Company Pavilion Laptop 15-cw1xxx
Flags: bus master, fast devsel, latency 0, IRQ 49, IOMMU group 10
Memory at fe7c0000 (32-bit, non-prefetchable) [size=32K]
Capabilities: [48] Vendor Specific Information: Len=08 <?>
Capabilities: [50] Power Management version 3
Capabilities: [64] Express Endpoint, MSI 00
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
答案1
对我来说,解决方案是从这里安装最新的 Sound Open Firmware (SOF) 二进制文件:https://github.com/thesofproject/sof-bin
具体来说:
- 克隆存储库:
git clone https://github.com/thesofproject/sof-bin.git
- 更改目录:
cd sof-bin
- 跟随:https://github.com/thesofproject/sof-bin#install-process-with-installsh(对我来说 v2.2 有效)
sudo mv /lib/firmware/intel/sof* some_backup_location/
sudo mv /usr/local/bin/sof-* some_backup_location/ # optional
sudo ./install.sh v2.2.x/v2.2
- 重启
此后,声音输出和麦克风都可以正常工作(Ubuntu 23.04,联想 X1 Gen8)
注意:请确保 或中未设置snd_hda_intel.dmic_detect=0
或设置。否则声音输出可能有效,但没有麦克风输入。snd_intel_dspcfg.dsp_driver=1
GRUB_CMDLINE_LINUX_DEFAULT
/etc/modprobe.d/alsa-base.conf