我全新安装了 Ubuntu,现在设置中唯一的声音设备是“虚拟输出”。我尝试了很多方法,但都记不清了,我不知道还能尝试什么。
系统规格
CPU:AMD Ryzen 5 2600
主板:Asrock AB350 Pro4
GPU:AMD R7 250
lspci 输出
$ lspci -nnk | grep -A2 Audio
lspci: Unable to load libkmod resources: error -12
26:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]
Subsystem: Micro-Star International Co., Ltd. [MSI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1462:aab0]
27:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device [1022:145a]
Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:145a]
--
28:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457]
Subsystem: ASRock Incorporation Family 17h (Models 00h-0fh) HD Audio Controller [1849:6893]
lshw 输出
$ sudo lshw -c sound
*-multimedia UNCLAIMED
description: Audio device
product: Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0.1
bus info: pci@0000:26:00.1
version: 00
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list
configuration: latency=0
resources: memory:fe960000-fe963fff
*-multimedia UNCLAIMED
description: Audio device
product: Advanced Micro Devices, Inc. [AMD]
vendor: Advanced Micro Devices, Inc. [AMD]
physical id: 0.3
bus info: pci@0000:28:00.3
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm pciexpress msi bus_master cap_list
configuration: latency=0
resources: memory:fe800000-fe807fff
答案1
我找到了答案。在重新安装 Ubuntu 之前,我安装了一个较新的内核,运行命令
sudo modprobe -v snd-hda-intel
显示它正在 /lib/modules/ 中查找不存在的内核相关文件。但是 Ubuntu 附带的内核中有文件,启动到较旧的内核解决了我遇到的问题。
答案2
如果其他人遇到此问题,可以使用 OndroMih 对另一个问题的评论中的方法(18.04 上声音进入虚拟输出) 对我有用。
以下是引文:
以上方法都对我没用(无需重启系统)。最后,有用的是
pulseaudio --kill && pulseaudio --start
,它立即起作用,甚至无需重启系统。– OndroMih