从 18.04 升级到 20.04 后,我的笔记本电脑的内置声卡无法被 pulseaudio 正确识别。虽然 alsamixer 显示了该卡。有什么提示吗?
aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC293 Analog [ALC293 Analog]
Sub-Geräte: 0/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [HDMI 0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 8: HDMI 2 [HDMI 2]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 9: HDMI 3 [HDMI 3]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 10: HDMI 4 [HDMI 4]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: Dock [USB3.0 Dual Video Dock], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
HDA Intel PCH 是正确的设备,请参见:
lspci
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 30)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 30)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 30)
00:17.0 SATA controller: Intel Corporation Cannon Point-LP SATA Controller [AHCI Mode] (rev 30)
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f0)
00:1d.1 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #10 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 30)
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 30)
39:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
39:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
3a:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
当我打开 pavucontrol 时,卡没有显示出来。发现有问题。我已经尝试了以下操作,然后重新启动:
sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
sudo apt-get install linux-sound-base alsa-base alsa-utils
不幸的是没有帮助...有什么提示吗?
答案1
如果你能
sudo alsa force-reload
但每次重启时都需要重复此操作,值得尝试:
sudo apt purge timidity-daemon
然后重新启动。
在我升级到 20.04 后,这个功能对我有用。在进行此更改之前,如果我使用 18.04 中的旧 Linux 内核(升级后留在我的系统上)启动,声音会正常工作。因此,对于我的系统来说,问题在于 timidity 守护进程如何与 5.4 内核配合使用。
答案2
尝试列出可用的输入(作为普通用户),以查看 PulseAudio 是否检测到声卡:
pacmd list-cards
然后更新/etc/pulse/default.pa
配置,查找正在加载驱动程序的配置文件部分:
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
...
例如,如果 ALSA 正确检测声卡,则取消注释以下行可能就足够了:
load-module module-alsa-sink
然后终止 pulseaudio 实例,它将重新加载配置而无需注销:
pulseaudio -k
答案3
好吧,我找到了解决方法
sudo alsa force-reload
让我的声卡恢复了活力。所以我决定将包含以下内容的脚本放入启动脚本中:
#!/bin/bash
sudo alsa force-reload
并将脚本启动到:
sudo chmod +x /etc/rc.local
sudo nano /etc/rc.local
并输入以下行:
sh /path/to/alsa_force_reload.sh
F3 并保存。对我来说这很管用。暂时 ;)