1

I'm trying to set up HDMI / DisplayPort audio output via NVIDIA card in Ubuntu 20.04 (fresh installation). Built-in speakers work just fine.

PulseAudio recognizes the audio card, shows the list of ports and profiles, but all of them are showing up as not available (please see below). PulseAudio UI shows multiple profiles for the card, but all of them are marked as (unplugged)(unavailable).

HDMI / DisplayPort audio works if I:

  1. Set profile and port manually:

    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
    
  2. Start some audio and assign HDMI / DisplayPort device in PulseAudio Playback tab manually

But as soon as audio application stops playing, app gets removed from Playback list, and when it starts again PulseAudio assigns a default device. I suspect that's because PulseAudio considers HDMI output "unplugged". Default sound settings UI just does not list HDMI output option in the selector.

What would be the right way to make PulseAudio treat the device as plugged in and working?

Proprietary nvidia-390 driver is used.

pacmd list-cards output:

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:
        ...
0

I think I found what causes the behavior - it is specific to my setup and is kind of reasonable (though I did not find a good solution to enable audio automatically).

In my case computer was connected to HDMI splitter that itself was connected to a display which does not have audio capabilities. From NVidia driver's perspective there were no audio devices connected, so it marked app ports / profiles as "unplugged", and used lanalog audio as a default playback device.

Computer --> HDMI splitter --> Display with no audio
                  \----------> Speakers
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.