Not able to choose HDMI audio

Hi,

I have a computer with an Nvidia RTX 3090 card. It comes with 1x HDMI and 3x DP ports.

I have 2 monitors and one TV plugged to the card. The monitors do not have speakers, only the TV. So I either use internal audio or the TV.

However, in the sound configuration shows only one the monitors plugged to the DP port, which is useless to me.

I do not know why it picks that one up. If I swap the ports and reboot, it still picks the wrong monitor.

Neither the sound nor the configuration tools enable me to choose the right monitor for audio output. Same for AlsaMixer.

The only two ways I am able to do it is either:

  1. Unplug the wrong monitor and reboot.

  2. Disable the wrong monitor on the display configuration settings.

I searched for another solution via configuration files or whatever, but I could not find anything.

I would be great to be able to choose the right HDMI audio output without having to disable one monitor.

Best,

Ed

Please post more information about audio devices

pactl list cards
pactl list sinks short && pactl get-dafault-sink
aplay -l
list sinks short                                                    1 ✘ 
54      alsa_output.pci-0000_00_1f.3.analog-stereo      PipeWire        s32le 2ch 48000Hz       SUSPENDED
122     alsa_output.pci-0000_01_00.1.hdmi-stereo        PipeWire        s32le 2ch 48000Hz       SUSPENDED
pactl get-default-sink                                                 
alsa_output.pci-0000_00_1f.3.analog-stereo
 aplay -l                                                                  
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [BenQ GW2475H]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pactl list cards                                                            ✔ 
Card #49
        Name: alsa_card.pci-0000_01_00.1
        Driver: alsa
        Owner Module: n/a
        Properties:
                api.acp.auto-port = "false"
                api.alsa.card = "1"
                api.alsa.card.longname = "HDA NVidia at 0x53080000 irq 17"
                api.alsa.card.name = "HDA NVidia"
                api.alsa.path = "hw:1"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio1"
                api.dbus.ReserveDevice1.Priority = "-20"
                device.api = "alsa"
                device.bus = "pci"
                device.bus_path = "pci-0000:01:00.1"
                device.description = "GA102 High Definition Audio Controller"
                device.enum.api = "udev"
                device.icon_name = "audio-card-analog-pci"
                device.name = "alsa_card.pci-0000_01_00.1"
                device.nick = "HDA NVidia"
                device.plugged.usec = "3364725"
                device.product.id = "0x1aef"
                device.product.name = "GA102 High Definition Audio Controller"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.vendor.id = "0x10de"
                device.vendor.name = "NVIDIA Corporation"
                media.class = "Audio/Device"
                factory.id = "15"
                client.id = "47"
                object.id = "49"
                object.serial = "49"
                object.path = "alsa:acp:NVidia"
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0x53080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                alsa.mixer_name = "Nvidia GPU 9a HDMI/DP"
                alsa.components = "HDA:10de009a,73772000,00100100"
                alsa.id = "NVidia"
                device.string = "1"
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
                pro-audio: Pro Audio (sinks: 4, sources: 0, priority: 1, available: yes)
        Active Profile: output:hdmi-stereo
        Ports:
                hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 1, available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "video-display"
                                card.profile.port = "0"
                                device.product.name = "BenQ GW2475H
"
                        Part of profile(s): output:hdmi-stereo
                hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 2, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "video-display"
                                card.profile.port = "1"
                        Part of profile(s): output:hdmi-stereo-extra1
                hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 3"
                                device.icon_name = "video-display"
                                card.profile.port = "2"
                        Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2, output:hdmi-surround71-extra2
                hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 4, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 4"
                                device.icon_name = "video-display"
                                card.profile.port = "3"
                        Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3, output:hdmi-surround71-extra3

Card #50
        Name: alsa_card.usb-MUSIC-BOOST_Usb_Microphone-00
        Driver: alsa
        Owner Module: n/a
        Properties:
                api.acp.auto-port = "false"
                api.alsa.card = "2"
                api.alsa.card.longname = "MUSIC-BOOST Usb Microphone at usb-0000:00:14.0-13, full speed"
                api.alsa.card.name = "Usb Microphone"
                api.alsa.path = "hw:2"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio2"
                api.dbus.ReserveDevice1.Priority = "-20"
                device.api = "alsa"
                device.bus = "usb"
                device.bus-id = "usb-MUSIC-BOOST_Usb_Microphone-00"
                device.bus_path = "pci-0000:00:14.0-usb-0:13:1.0"
                device.description = "Usb Microphone"
                device.enum.api = "udev"
                device.form_factor = "microphone"
                device.icon_name = "audio-input-microphone-analog-usb"
                device.name = "alsa_card.usb-MUSIC-BOOST_Usb_Microphone-00"
                device.nick = "Usb Microphone"
                device.plugged.usec = "3423934"
                device.product.id = "0x2008"
                device.product.name = "Usb Microphone"
                device.serial = "MUSIC-BOOST_Usb_Microphone"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/sound/card2"
                device.vendor.id = "0x1b3f"
                device.vendor.name = "Generalplus Technology Inc."
                media.class = "Audio/Device"
                factory.id = "15"
                client.id = "47"
                object.id = "50"
                object.serial = "50"
                object.path = "alsa:acp:Microphone"
                alsa.card = "2"
                alsa.card_name = "Usb Microphone"
                alsa.long_card_name = "MUSIC-BOOST Usb Microphone at usb-0000:00:14.0-13, full speed"
                alsa.driver_name = "snd_usb_audio"
                alsa.mixer_name = "USB Mixer"
                alsa.components = "USB1b3f:2008"
                alsa.id = "Microphone"
                device.string = "2"
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                pro-audio: Pro Audio (sinks: 0, sources: 1, priority: 1, available: yes)
                input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
        Active Profile: input:mono-fallback
        Ports:
                analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability unknown)
                        Properties:
                                port.type = "mic"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "0"
                        Part of profile(s): input:mono-fallback

Card #51
        Name: alsa_card.pci-0000_00_1f.3
        Driver: alsa
        Owner Module: n/a
        Properties:
                api.acp.auto-port = "false"
                api.alsa.card = "0"
                api.alsa.card.longname = "HDA Intel PCH at 0x4804210000 irq 178"
                api.alsa.card.name = "HDA Intel PCH"
                api.alsa.path = "hw:0"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                api.dbus.ReserveDevice1.Priority = "-20"
                device.api = "alsa"
                device.bus = "pci"
                device.bus_path = "pci-0000:00:1f.3"
                device.description = "Built-in Audio"
                device.enum.api = "udev"
                device.form_factor = "internal"
                device.icon_name = "audio-card-analog-pci"
                device.name = "alsa_card.pci-0000_00_1f.3"
                device.nick = "HDA Intel PCH"
                device.plugged.usec = "3412448"
                device.product.id = "0x7ad0"
                device.product.name = "Alder Lake-S HD Audio Controller"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.vendor.id = "0x8086"
                device.vendor.name = "Intel Corporation"
                media.class = "Audio/Device"
                factory.id = "15"
                client.id = "47"
                object.id = "51"
                object.serial = "51"
                object.path = "alsa:acp:PCH"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0x4804210000 irq 178"
                alsa.driver_name = "snd_hda_intel"
                alsa.mixer_name = "Realtek ALC1220"
                alsa.components = "HDA:10ec1220,103c8917,00100003"
                alsa.id = "PCH"
                device.string = "0"
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: yes)
                output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
                input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: no)
                pro-audio: Pro Audio (sinks: 1, sources: 2, priority: 1, available: yes)
        Active Profile: output:analog-stereo+input:analog-stereo
        Ports:
                analog-input-front-mic: Front Microphone (type: Mic, priority: 8500, latency offset: 0 usec, availability group: Legacy 1, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "0"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-rear-mic: Rear Microphone (type: Mic, priority: 8200, latency offset: 0 usec, availability group: Legacy 2, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "1"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 3"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "2"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-linein: Line In (type: Line, priority: 8100, latency offset: 0 usec, availability group: Legacy 4, not available)
                        Properties:
                                port.type = "line"
                                port.availability-group = "Legacy 4"
                                card.profile.port = "3"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-lineout: Line Out (type: Line, priority: 9000, latency offset: 0 usec, availability group: Legacy 5, not available)
                        Properties:
                                port.type = "line"
                                port.availability-group = "Legacy 5"
                                card.profile.port = "4"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 6, available)
                        Properties:
                                port.type = "headphones"
                                port.availability-group = "Legacy 6"
                                device.icon_name = "audio-headphones"
                                card.profile.port = "5"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo

To set Digital Stereo (HDMI) Output as default-sink for audio playback instead of Analog Stereo Output

pactl set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo

Thanks.

But what I need is to choose the specific HDMI device:

card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1

Instead of:

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [BenQ GW2475H]
  Subdevices: 1/1

Only one monitor (GW2475H) is detected and available in PipeWire. the 3 other HDMI outputs are shown as not available and PipeWire will avoid using them

The workaround for this is to disable detection of connected devices in ALSA. so they are shown as “unknown availability” in PipeWire, and then PipeWire will not avoid using them

Install alsa-tools and run the jack retasking tool

sudo hdajackretask 1

There are 2 ways to disable “jack-detection” in hdajackretask:

  1. To disable detection of all outputs, enable Parser hints and change jack_detect to no

  2. To disable detection of a specific output, enable Advanced Override, enable Override for a specific output Pin and change Jack detection to Not present

Then click on Install boot override and reboot system to load boot override

If the boot override is working to disable jack-detection, Pipewire Profile for output:hdmi-stereo-extra1 should show unknown availability