Post

Set Default HDMI audio on PopOS

Harianto van Insulinde

These are the following steps

  • Play audio/video
  • Open your Sound settings (and let it stay open)
  • Run command to see sink and remember
  • On your Sound settings change Output Device to your desired audio
  • Run command to see sink and compare changes
  • Run command to set default sink number
  • Reboot
bash
# See which audio (sinks) are running
pactl list sinks

# Set default Sink Number
pactl set-default-sink <number>

# Reboot computer
reboot

It’s better to follow this guide after your computer reboots, then follow these steps. Because looking at multiple states are RUNNING will confuse you!

Play audio

You can probably open any audio player, but I use Chrome and play a video that’s at least 10 minutes long.

Open your Sound settings

Go to Sound Settings - Use Window key to search your settings and type Search. And go to Settings / Sound. And see the current state.

PopOS Quicksearch (MacOS Spotlight gimmick)

Sound Settings

Run command to see a list

Open your terminal and run:

bash
pactl list sinks

Terminal: See which audio (sinks) are available

Might have use command pactl list sinks short, but I didn't know that exist.

bash
$ pactl list sinks
Sink #0
    State: RUNNING
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
    Description: GM204 High Definition Audio Controller Digital Stereo (HDMI)
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
    Latency: 22763 usec, configured 23220 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "1"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xfb080000 irq 40"
        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 = "0fbb"
        device.product.name = "GM204 High Definition Audio Controller"
        device.string = "hdmi:1"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "GM204 High Definition Audio Controller Digital Stereo (HDMI)"
        alsa.mixer_name = "Nvidia GPU 71 HDMI/DP"
        alsa.components = "HDA:10de0071,10de1131,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        hdmi-output-0: HDMI / DisplayPort (priority: 5900, available)
    Active Port: hdmi-output-0
    Formats:
        pcm

Sink #1
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    Description: Built-in Audio Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 9
    Mute: no
    Volume: front-left: 21535 /  33% / -29.00 dB,   front-right: 21535 /  33% / -29.00 dB
            balance 0.00
    Base Volume: 46396 /  71% / -9.00 dB
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "CA0132 Analog"
        alsa.id = "CA0132 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7110000 irq 39"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "8d20"
        device.product.name = "C610/X99 series chipset HD Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analogue Stereo"
        device.description = "Built-in Audio Analogue Stereo"
        alsa.mixer_name = "Creative CA0132"
        alsa.components = "HDA:11020011,1028064c,00100918"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-output-lineout: Line Out (priority: 9900, not available)
        analog-output-headphones: Headphones (priority: 9000, not available)
    Active Port: analog-output-lineout
    Formats:
        pcm

Sink #2
    State: SUSPENDED
    Name: combined
    Description: Simultaneous output to GM204 High Definition Audio Controller Digital Stereo (HDMI), Built-in Audio Analogue Stereo
    Driver: module-combine-sink.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 15
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: combined.monitor
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.class = "filter"
        device.description = "Simultaneous output to GM204 High Definition Audio Controller Digital Stereo (HDMI), Built-in Audio Analogue Stereo"
        device.icon_name = "audio-card"
    Formats:
        pcm

Terminal Result after running command: pactl list sinks

So on Sink number 0 I see the running state associated with the audio:

bash
Sink #0
    State: RUNNING
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo

Snippet from the resulting command

On your Sound settings change Output Device to your desired audio

When you set the desired output and hear the audio on correct monitor for example.

Settings / Sound / Output - Desired output

Weird things happening in the system. Stuff changes and also sink numbers.

Run command again to see sink and compare changes

bash
pactl list sinks

Terminal: See which audio are running this time and compare State (SUSPENDED/RUNNING)

bash
$ pactl list sinks
Sink #1
    State: SUSPENDED
    Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    Description: Built-in Audio Analogue Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 9
    Mute: no
    Volume: front-left: 21535 /  33% / -29.00 dB,   front-right: 21535 /  33% / -29.00 dB
            balance 0.00
    Base Volume: 46396 /  71% / -9.00 dB
    Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "CA0132 Analog"
        alsa.id = "CA0132 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7110000 irq 39"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "8d20"
        device.product.name = "C610/X99 series chipset HD Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analogue Stereo"
        device.description = "Built-in Audio Analogue Stereo"
        alsa.mixer_name = "Creative CA0132"
        alsa.components = "HDA:11020011,1028064c,00100918"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-output-lineout: Line Out (priority: 9900, not available)
        analog-output-headphones: Headphones (priority: 9000, not available)
    Active Port: analog-output-lineout
    Formats:
        pcm

Sink #2
    State: SUSPENDED
    Name: combined
    Description: Simultaneous output to Built-in Audio Analogue Stereo, GM204 High Definition Audio Controller Digital Stereo (HDMI 2)
    Driver: module-combine-sink.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 15
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: combined.monitor
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.class = "filter"
        device.description = "Simultaneous output to Built-in Audio Analogue Stereo, GM204 High Definition Audio Controller Digital Stereo (HDMI 2)"
        device.icon_name = "audio-card"
    Formats:
        pcm

Sink #3
    State: RUNNING
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1
    Description: GM204 High Definition Audio Controller Digital Stereo (HDMI 2)
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    Volume: front-left: 45876 /  70% / -9.29 dB,   front-right: 45876 /  70% / -9.29 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
    Latency: 18891 usec, configured 23220 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 1"
        alsa.id = "HDMI 1"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "7"
        alsa.card = "1"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xfb080000 irq 40"
        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 = "0fbb"
        device.product.name = "GM204 High Definition Audio Controller"
        device.string = "hdmi:1,1"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo-extra1"
        device.profile.description = "Digital Stereo (HDMI 2)"
        device.description = "GM204 High Definition Audio Controller Digital Stereo (HDMI 2)"
        alsa.mixer_name = "Nvidia GPU 71 HDMI/DP"
        alsa.components = "HDA:10de0071,10de1131,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, available)
    Active Port: hdmi-output-1
    Formats:
        pcm

Terminal Result after running command again and compare: pactl list sinks

Weird things happened. The sink numbers changed when it started to be 0,1,2 and now 1,2,3. What you really need to focus is the State: RUNNING.

So I found the sink number is 3 with that associate audio.

bash
Sink #3
    State: RUNNING
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1

It’s number 3! Remember your number and set them NOW!

Run command to set default sink number

Since your remember the number, let’s set them! Currently mine is 3 now.

Unless I keep changing the Output Device again in Settings / Sound then the number becomes invalid or just wrong audio sink.

bash
pactl set-default-sink 3

Set default Audio sink number you just remembered

Then reboot from command.

Reboot

bash
reboot

Reboots your computer now!

Unfortunately I haven’t solution yet when your computer is awake from Sleep

Congrats!