![NVIDIA HDMI / DisplayPort 音频配置文件和端口显示为“可用:否”,但声音正常](https://linux22.com/image/925161/NVIDIA%20HDMI%20%2F%20DisplayPort%20%E9%9F%B3%E9%A2%91%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E5%92%8C%E7%AB%AF%E5%8F%A3%E6%98%BE%E7%A4%BA%E4%B8%BA%E2%80%9C%E5%8F%AF%E7%94%A8%EF%BC%9A%E5%90%A6%E2%80%9D%EF%BC%8C%E4%BD%86%E5%A3%B0%E9%9F%B3%E6%AD%A3%E5%B8%B8.png)
我正在尝试在 Ubuntu 20.04(全新安装)中通过 NVIDIA 卡设置 HDMI / DisplayPort 音频输出。内置扬声器工作正常。
PulseAudio 识别了声卡,显示了端口和配置文件列表,但它们都显示为不可用(请参见下文)。PulseAudio UI 显示该卡的多个配置文件,但它们都标记为(unplugged)(unavailable)
。
HDMI / DisplayPort 音频可以在以下情况下工作:
手动设置配置文件和端口:
pacmd set-card-profile alsa_card.pci-0000_01_00.1 output:hdmi-stereo pacmd set-sink-port alsa_output.pci-0000_01_00.1.hdmi-stereo hdmi-output-0
启动一些音频并在 PulseAudio Playback 选项卡中手动分配 HDMI / DisplayPort 设备
但是一旦音频应用程序停止播放,应用程序就会从播放列表中删除,当它再次启动时,PulseAudio 会分配一个默认设备。我怀疑这是因为 PulseAudio 认为 HDMI 输出“未插电”。默认声音设置 UI 不会在选择器中列出 HDMI 输出选项。
让 PulseAudio 将设备视为已插入并正在工作的正确方法是什么?
nvidia-390
使用专有驱动程序。
pacmd list-cards
输出:
2 card(s) available.
index: 0
name: <alsa_card.pci-0000_01_00.1>
driver: <module-alsa-card.c>
owner module: 23
properties:
alsa.card = "1"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xf1000000 irq 17"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "0bea"
device.product.name = "GF108 High Definition Audio Controller"
device.string = "1"
device.description = "GF108 High Definition Audio Controller"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
index 1:
...
答案1
我认为我已经找到了导致这种行为的原因 - 它特定于我的设置并且有点合理(尽管我没有找到自动启用音频的好的解决方案)。
在我的例子中,计算机连接到 HDMI 分配器,而该分配器本身又连接到没有音频功能的显示器。从 NVidia 驱动程序的角度来看,没有连接音频设备,因此它将应用程序端口/配置文件标记为“未插电”,并使用 lanalog 音频作为默认播放设备。
Computer --> HDMI splitter --> Display with no audio
\----------> Speakers