11

After installing a fresh copy of 19.10, I've found a minor nuisance with audio. I have two devices listed under the sound section in gnome-control-center as follows:

HDMI / DisplayPort 2 - GP1-4 High Definition Audio Controller
Line Out - Built-in Audio

With previous Ubuntu releases, the default was always the section option, which is the one I want. Now, It's defaulting to the HDMI audio, and sending sound through my monitor's speakers.

Running pacmd list short sinks, it shows the following sinks information:

2 sink(s) available.
    index: 0
    name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9039
    volume: front-left: 11796 /  18% / -44.68 dB,   front-right: 11796 /  18% / -44.68 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
    card: 0 <alsa_card.pci-0000_00_1f.3>
    module: 7
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC892 Analog"
        alsa.id = "ALC892 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 0xdd140000 irq 130"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "a170"
        device.product.name = "100 Series/C230 Series Chipset Family 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 = "Realtek ALC892"
        alsa.components = "HDA:10ec0892,18495892,00100302"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
            properties:

        analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-headphones"
    active port: <analog-output-lineout>
  * index: 1
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9030
    volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: yes
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 2
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
    card: 1 <alsa_card.pci-0000_01_00.1>
    module: 24
    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 0xdf080000 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 = "10f0"
        device.product.name = "GP104 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 = "GP104 High Definition Audio Controller Digital Stereo (HDMI 2)"
        alsa.mixer_name = "Nvidia GPU 83 HDMI/DP"
        alsa.components = "HDA:10de0083,38425180,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
    active port: <hdmi-output-1>

Running either pacmd set-default-sink 0 or pacmd set-default-sink 1, then rebooting makes no difference. It will always start up with the HDMI audio as the default.

What else can I try?

5
  • it could be inside /usr/share/alsa/init/default file
    – damadam
    Commented Oct 18, 2019 at 14:22
  • What am I looking for in the file?
    – hiigaran
    Commented Oct 18, 2019 at 14:27
  • I don't really know, probably a value that set default to your HDMI audio; I just comment because it was just in order to give you a hint (but I don't have the answer, I would have done one if it was the case)
    – damadam
    Commented Oct 18, 2019 at 14:41
  • No worries. Thanks for trying anyway.
    – hiigaran
    Commented Oct 18, 2019 at 15:05
  • Looks like the issues is already tracked here bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1847570 Commented Oct 19, 2019 at 16:01

3 Answers 3

5

I had the same problem after upgrading from Ubuntu 19.04 to 19.10. What you have to do is go to

 /etc/pulse/default.pa

comment out

.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif

and reboot.

I hope it helps!

3

I have the same exact issue, fix does work but it is not the correct fix IMO When doing this you have now also commented out automatic connection for bluetooth headsets etc I believe

The section commented is

#Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
#Commented after upgrade from 19.04 to stop HDMI which has no speakers attached from stealing audio from Line out
#.ifexists module-switch-on-connect.so
#load-module module-switch-on-connect
#.endif

That LP 1702974 link is https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1702794

And it says

This way once a user pairs & connects a bluetooth speaker device pulseaudio will auto switch to it. As it stands now users have to open sound settings & switch manually. It's bad enough that auto discover & connect don't work, (can be scripted thru bluetoothctl), no sense adding to frustration

Looks like we want that but dont want HDMI monitors that can carry audio on the link but have no actual speaker attached to take the channel.

0

I had to comment out both #load-module module-switch-on-connect and #load-module module-switch-on-port-available from /etc/pulse/default.pa, to fix the issue completely, as described in this guide I found:

GUIDE: Fixing "Audio input/output automatically switches to the wrong audio device on system startup"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .