如何在 Ubuntu 20.04 上安装声音驱动程序?

如何在 Ubuntu 20.04 上安装声音驱动程序?

我已经安装了 nvidea 驱动程序:

sudo ubuntu-drivers install

之后,我丢失了网络适配器和声音驱动程序。我已经解决了网络驱动程序的问题,但我找不到任何有关如何处理声音驱动程序的信息。我尝试过:

sudo apt-get remove --purge alsa-base
sudo apt-get remove --purge pulseaudio
sudo apt-get install alsa-base
sudo apt-get install pulseaudio
sudo alsa force-reload

但这没用。我现在有:

pavel@home:~$ lshw -C multimedia
WARNING: you should run this program as super-user.
  *-multimedia UNCLAIMED    
       description: Audio device
       product: GK208 HDMI/DP Audio Controller
       vendor: NVIDIA Corporation
       physical id: 0.1
       bus info: pci@0000:1f:00.1
       version: a1
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list
       configuration: latency=0
       resources: memory:f7080000-f7083fff
  *-multimedia UNCLAIMED
       description: Audio device
       product: Family 17h (Models 00h-0fh) HD Audio Controller
       vendor: Advanced Micro Devices, Inc. [AMD]
       physical id: 0.3
       bus info: pci@0000:21:00.3
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: cap_list
       configuration: latency=0
       resources: memory:f7700000-f7707fff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

pavel@home:~$ inxi -Ax
Audio:     Device-1: NVIDIA GK208 HDMI/DP Audio vendor: Micro-Star MSI driver: N/A bus ID: 1f:00.1 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Micro-Star MSI driver: N/A bus ID: 21:00.3 

 pavel@home:~$ sudo alsamixer
 cannot open mixer: No such file or directory

有人能告诉我如何安装音频驱动程序吗?

更新 1。

pavel@home:~$ lspci -k
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex
    Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit
    Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) I/O Memory Management Unit
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge
    Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge
    Kernel driver in use: pcieport
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B
    Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B
    Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 59)
    Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SMBus Controller
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
    Subsystem: Micro-Star International Co., Ltd. [MSI] FCH LPC Bridge
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7
03:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43bc (rev 02)
    Subsystem: ASMedia Technology Inc. Device 1142
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci
03:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] Device 43b8 (rev 02)
    Subsystem: ASMedia Technology Inc. Device 1062
    Kernel driver in use: ahci
    Kernel modules: ahci
03:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43b3 (rev 02)
    DeviceName: Broadcom 5762
    Kernel driver in use: pcieport
16:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
    Kernel driver in use: pcieport
16:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
    Kernel driver in use: pcieport
16:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
    Kernel driver in use: pcieport
16:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
    Kernel driver in use: pcieport
1b:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Kernel driver in use: r8168
    Kernel modules: r8168
1f:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] GK208B [GeForce GT 710]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nvidia_drm, nvidia
1f:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] GK208 HDMI/DP Audio Controller
20:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function
    Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function
20:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor
    Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor
    Kernel driver in use: ccp
    Kernel modules: ccp
20:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
    Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci
21:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function
    Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function
21:00.2 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
    Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SATA Controller [AHCI mode]
    Kernel driver in use: ahci
    Kernel modules: ahci
21:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
    DeviceName: Realtek ALC898
    Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) HD Audio Controller

模组探针

pavel@home:~$ sudo modprobe snd-hda-intel
modprobe: FATAL: Module snd-hda-intel not found in directory /lib/modules/5.15.0-88-generic

更新 2。

pavel@home:/lib/modules$ ls
5.11.0-27-generic  5.11.0-36-generic  5.11.0-38-generic  5.15.0-88-generic

pavel@home:/boot$ ls
config-5.11.0-36-generic  grub                          initrd.img-5.11.0-38-generic.old-dkms  memtest86+.bin                System.map-5.11.0-38-generic  vmlinuz-5.11.0-38-generic
config-5.11.0-38-generic  initrd.img                    initrd.img-5.15.0-88-generic           memtest86+.elf                System.map-5.15.0-88-generic  vmlinuz-5.15.0-88-generic
config-5.15.0-88-generic  initrd.img-5.11.0-36-generic  initrd.img-5.15.0-88-generic.old-dkms  memtest86+_multiboot.bin      vmlinuz                       vmlinuz.old
efi                       initrd.img-5.11.0-38-generic  initrd.img.old                         System.map-5.11.0-36-generic  vmlinuz-5.11.0-36-generic

答案1

显然,对于 Ubuntu Focal(20.04)中至少内核版本 5.15.0-88,内核模块包含在两个软件包中,即linux-modules-5.15.0-88-genericlinux-modules-extra-5.15.0-88-generic。大多数声音驱动模块都包含在后者中,而只有前者依赖于“主”内核软件包linux-image-5.15.0-88-generic

因为我对 Ubuntu 不太熟悉,所以我不知道如果以后获得内核更新/升级,是否需要再次明确安装相应的 linux-modules-extra 包。有时会有“元包”来处理这类事情。

答案2

哇!我的音量图标只显示“虚拟声卡”。我试了很多命令,很多东西,我甚至想过更新内核或重新安装系统……但这篇文章只用一个命令就解决了:

sudo modprobe snd-hda-intel

非常感谢! :-)

相关内容