错误的默认音频设备

错误的默认音频设备

安装 19.10 的全新副本后,我发现音频有点问题。我在声音部分列出了两个设备,gnome-control-center如下所示:

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

在以前的 Ubuntu 版本中,默认选项始终是部分选项,这正是我想要的。现在,它默认为 HDMI 音频,并通过我的显示器扬声器发送声音。

运行时pacmd list short sinks,它显示以下接收器信息:

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>

运行 或pacmd set-default-sink 0pacmd set-default-sink 1然后重新启动都没有区别。它将始终以 HDMI 音频作为默认设置启动。

我还可以尝试什么?

答案1

我从 Ubuntu 19.04 升级到 19.10 后也遇到了同样的问题。你需要做的是

 /etc/pulse/default.pa

注释掉

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

然后重新启动。

我希望它有帮助!

答案2

我有完全相同的问题,修复确实有效,但在我看来这不是正确的修复方式。我认为在执行此操作时,您现在还注释掉了蓝牙耳机等的自动连接

评论的部分是

#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

LP 1702974 链接是 https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1702794

它说

这样,一旦用户配对并连接蓝牙扬声器设备,pulseaudio 就会自动切换到它。目前,用户必须打开声音设置并手动切换。自动发现和连接不起作用已经够糟糕的了(可以通过 bluetoothctl 编写脚本),没有必要再增加挫败感

看起来我们想要这个,但不想要可以在链路上传输音频但没有实际的扬声器连接来接收频道的 HDMI 显示器。

答案3

我必须注释掉和#load-module module-switch-on-connect才能彻底解决问题,如本指南中所述:#load-module module-switch-on-port-available/etc/pulse/default.pa

指南:修复“系统启动时音频输入/输出自动切换到错误的音频设备”

相关内容