Dell XPS 15 9570 4k 和 Ubuntu 22.04 上的虚拟输出

Dell XPS 15 9570 4k 和 Ubuntu 22.04 上的虚拟输出

最近从 win10 切换过来,因为我每次在 VM 上加载 xubuntu 时都很累。所以一周前安装了一个全新的 Ubuntu。感觉很棒,流畅而且超级快。但我遇到的一个问题是虚拟输出(无声音)。我知道互联网上有很多关于此类主题和解决方案的帖子。但我尝试了所有方法,但没有任何变化。测试了 ubuntu 20.04 LTS 和 Pop_os 22.04,同样的问题。在本主题中看到了解决方案https://support.system76.com/articles/audio/但对我不起作用。

声音菜单

播放-l

aplay: device_list:275: no soundcards found...

lsmod |查看 snd_hda_intel 的帮助

snd_hda_intel          53248  0
snd_intel_dspcfg       32768  2 snd_hda_intel,snd_sof_intel_hda_common
snd_hda_codec         159744  2 snd_hda_intel,snd_soc_hdac_hda
snd_hda_core          110592  6 snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_pcm               147456  10 snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
snd                   102400  13 snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi

lspci -nnk | grep -A2 音频

00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
    Subsystem: Dell Cannon Lake PCH cAVS [1028:087c]
    Kernel driver in use: snd_hda_intel

答案1

事实证明,这个解决方案对我来说总是有效的。我知道它不太优雅。

-保持从任何来源播放音频(youtube、vlc 等)

-运行此命令:

   for i in {1..500}; do sudo alsa force-reload; sleep 3; done

它运行命令sudo alsa force-reload然后等待 3 秒,然后再次运行。它重复 500 次。我通常尝试不到 100 次就能让它工作。

在某个时候你会听到声音传来,然后你会看到虚拟输出设备消失了,声音正常了(我把声音设置在终端旁边打开以查看它),中止脚本。

它看起来是这样的:

打印时声音开始起作用

/sbin/alsa: Warning: Processes using sound devices: 1718(pulseaudio).

您可以看到脚本在sudo alsa force-reload打印该行之前和之后运行时以及声音开始起作用时的差异

Unloading ALSA sound driver modules: snd-sof-pci-intel-cnl snd-sof-intel-hda-common snd-sof-intel-hda snd-sof-pci snd-sof-xtensa-dsp snd-sof snd-soc-hdac-hda snd-hda-ext-core snd-soc-acpi-intel-match snd-soc-acpi snd-soc-core snd-compress snd-pcm-dmaengine snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
Loading ALSA sound driver modules: snd-sof-pci-intel-cnl snd-sof-intel-hda-common snd-sof-intel-hda snd-sof-pci snd-sof-xtensa-dsp snd-sof snd-soc-hdac-hda snd-hda-ext-core snd-soc-acpi-intel-match snd-soc-acpi snd-soc-core snd-compress snd-pcm-dmaengine snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
/sbin/alsa: Warning: Processes using sound devices: 1718(pulseaudio). 
Unloading ALSA sound driver modules: snd-ctl-led snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-sof-pci-intel-cnl snd-sof-intel-hda-common snd-sof-intel-hda snd-sof-pci snd-sof-xtensa-dsp snd-sof snd-soc-hdac-hda snd-hda-ext-core snd-soc-acpi-intel-match snd-soc-acpi snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-ctl-led snd-hda-codec-realtek snd-hda-codec-generic snd-hda-intel snd-sof-pci-intel-cnl snd-sof-intel-hda-common snd-sof-intel-hda snd-sof-pci snd-sof-xtensa-dsp snd-sof snd-soc-hdac-hda snd-hda-ext-core snd-soc-acpi-intel-match snd-soc-acpi snd-intel-dspcfg snd-intel-sdw-acpi snd-hda-codec snd-hda-core snd-hwdep snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
^C

Alsa文档:https://www.alsa-project.org/wiki/Main_Page

答案2

就我的情况而言(也是在 Dell XPS 15 9570 上,虽然不是 4K,并且不是全新安装 22.04,而是在从 22.04 升级到 23.04 后出现问题),另一种解决方案有所帮助:

sudo apt install pipewire-media-session

在安装过程中,我的 XPS 自行重启了。非常奇怪 - 我想我以前从未遇到过命令apt导致自动重启的情况...

相关内容