跳转到主要内容
myfreax
返回

修复Ubuntu SND HDA Intel 的无声音问题

修复Ubuntu SND HDA Intel 的无声音问题

修复Ubuntu SND HDA Intel 的无声音问题

在使用 Ubuntu 20.04 设置 Acer 笔记本计算机之后,我注意到没有声音从扬声器,耳机或 HDMI 发出。

查看 Gnome 声音设置,我注意到只有一个虚拟输出 dummy output 作为声音输出设备。

我做的第一件事是在网上寻找解决方案,例如这一方法,但没有一个有效,尽管该解决方案可能对您有用,因此请尝试一下。

然后我想起了一段时间,我设法修复旧台式机的声音,因此我尝试了该解决方案,并且……奏效了!这是我为了使声音能够在 Ubuntu 20.04 工作而所做的工作,希望这对某些人也适用。

我的 Acer 笔记本计算机使用的 snd_hda_intel 内核模块(Realtek ALC892编解码器)。我将在下面的步骤说明如何检查您是否也在运行此内核模块

我只在 Ubuntu 20.04 执行过这些步骤,但是我认为它也可以在其他 Linux 发行版中使用此修复方案。

至少,它还应该还可以解决 Linux Mint 或者基于 Debian 的 Linux 发行版遇到的类似问题。尽管我无法对其进行测试。

在遇到声音问题时,您应该尝试的第一个解决方法是运行 pulseaudio -k 命令重新启动 PulseAudio。

这可以在许多情况下修复声音的输出。例如,如果您的耳机没有出现在系统声音设置中。

pulseaudio -k

修复Ubuntu 没有声音的问题 dummy output


如果您的计算机正在使用 snd_hda_intel 内核模块,则本 Ubuntu 教程可以修复解决这种没有声音问题。

因此,在尝试应用此修复之前,请先检查你是否正在使用  snd_hda_intel  内核模块。请运行命令 lsmod | grep snd_hda_intel 。

lsmod | grep snd_hda_intel

在命令的输出至少有一条包含 snd_hda_intel 的记录。这是我计算机的输出:

snd_hda_intel          40960  8
snd_hda_codec         126976  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_pcm                98304  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd                    81920  27 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm

您也可以运行命令 lspci -nnk | grep -A2 Audio:

lspci -nnk | grep -A2 Audio

其中应显示音频设备以及正在使用的内核模块/驱动程序。这是我系统的输出:

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d71] (rev 21)
	Subsystem: Acer Incorporated [ALI] Sunrise Point-LP HD Audio [1025:1269]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl

如果上述命令的输出确实获得 snd_hda_intel,而在 Ubuntu 没有声音,则可以尝试以下方法进行修复。

首先你需要将  options snd-hda-intel model=generic 添加到  /etc/modprobe.d/alsa-base.conf 文件的末尾。

运行命令 echo "options snd-hda-intel model=generic" | sudo tee -a /etc/modprobe.d/alsa-base.conf

echo "options snd-hda-intel model=generic" | sudo tee -a /etc/modprobe.d/alsa-base.conf

然后,重新启动系统。希望你的 Ubuntu 声音现在可以正常运行,并且在重启系统后,你的系统声音输出不只是 Dummy Output 设备且有还有其它的。

如果您仍然没有声音输出,并且系统声音设置仅看到 Dummy Output,则可以尝试将 "options snd-hda-intel model=generic" 的 model 设置为 auto 而不是generic

因此请使用文本编辑器 以root用户身份编辑 /etc/modprobe.d/alsa-base.conf 文件,对于编辑器你可以选择任何你喜欢的编辑器,例如vim,nano,gedit。

sudo vim /etc/modprobe.d/alsa-base.conf
sudo nano /etc/modprobe.d/alsa-base.conf
sudo gedit /etc/modprobe.d/alsa-base.conf

修复在 Ubuntu 19.10/18.04 使用 5.3.0-41 和 5.3.0-41 内核未检测到 PCI/内部声卡的问题


5.3.0-41 和5.3.0-41 内核中存在回归,这会在 Ubuntu 19.10和18.04 引起的虚拟输出问题。此错误报告提供此错误的说明。

因此,我不再赘述,我将直接告诉您如何解决。看来某些 Ubuntu 20.04 用户也可能会发生这种情况。

以 root 用户身份编辑文件 /etc/modprobe.d/alsa-base.conf 并在此文件的末尾添加options snd-hda-intel dmic_detect=0

你也可以直接运行命令 echo "options snd-hda-intel dmic_detect=0" | sudo tee -a /etc/modprobe.d/alsa-base.conf。

echo "options snd-hda-intel dmic_detect=0" | sudo tee -a /etc/modprobe.d/alsa-base.conf

以 root 用户身份进行编辑文件 /etc/modprobe.d/blacklist.conf,然后在文件末尾添加 blacklist snd_soc_skl

你也可以直接运行命令 echo "blacklist snd_soc_skl" | sudo tee -a /etc/modprobe.d/blacklist.conf 。

echo "blacklist snd_soc_skl" | sudo tee -a /etc/modprobe.d/blacklist.conf

进行这些更改后,重新启动系统。开发人员正在努力解决此问题。固定的内核版本可能是 5.3.0-43。

myfreax

  1. 暂无评论,快来抢沙发吧!