Ubuntu 20.04 Bluetooth 헤드폰은 내부 스피커를 통해 재생됩니다.

Aug 17 2020

Skullcandy Crusher Wireless 헤드폰을 컴퓨터에 페어링하려고합니다. 페어링하고 사운드 메뉴에서 성공적으로 선택할 수 있지만 어떤 이유로 오디오가 여전히 내부 스피커를 통해 재생됩니까?

I에 설명 된 수정 시도 477,933을 하며https://www.nielsvandermolen.com/bluetooth-headphones-ubuntu/ 아무 소용이 없다

내 설정 메뉴는 다음과 같습니다.

출력과 입력이 함께 연결되어있는 것처럼 보이지만 그렇게 설정하지 않았기 때문에 어떤 것이 이상합니까?

아무도 이것을 고치는 방법을 알고 있습니까?

편집하다

위의 튜토리얼에서 dmesg 명령의 출력물은 다음과 같습니다.

(base) aaron@aaron-Lenovo-IdeaPad-S340-15IILTouch:~$ dmesg | grep -i bluetooth # Shows all Bluetooth driver info [ 3.163206] Bluetooth: Core ver 2.22 [ 3.163223] Bluetooth: HCI device and connection manager initialized [ 3.163231] Bluetooth: HCI socket layer initialized [ 3.163233] Bluetooth: L2CAP socket layer initialized [ 3.163235] Bluetooth: SCO socket layer initialized [ 3.216419] Bluetooth: hci0: Bootloader revision 0.1 build 0 week 11 2017 [ 3.217429] Bluetooth: hci0: Device revision is 2 [ 3.217430] Bluetooth: hci0: Secure boot is enabled [ 3.217430] Bluetooth: hci0: OTP lock is enabled [ 3.217431] Bluetooth: hci0: API lock is enabled [ 3.217431] Bluetooth: hci0: Debug lock is disabled [ 3.217432] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [ 3.218922] Bluetooth: hci0: Found device firmware: intel/ibt-19-32-1.sfi [ 4.876884] Bluetooth: hci0: Waiting for firmware download to complete [ 4.877409] Bluetooth: hci0: Firmware loaded in 1623682 usecs [ 4.877453] Bluetooth: hci0: Waiting for device to boot [ 4.891412] Bluetooth: hci0: Device booted in 13645 usecs [ 4.891818] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-19-32-1.ddc [ 4.892417] Bluetooth: hci0: Failed to send Intel_Write_DDC (-22) [ 5.114099] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 5.114101] Bluetooth: BNEP filters: protocol multicast [ 5.114104] Bluetooth: BNEP socket layer initialized [ 13.193395] Bluetooth: RFCOMM TTY layer initialized [ 13.193409] Bluetooth: RFCOMM socket layer initialized [ 13.193416] Bluetooth: RFCOMM ver 1.11 (base) aaron@aaron-Lenovo-IdeaPad-S340-15IILTouch:~$ dmesg | grep -i bluetooth | grep -i firmware # Shows Bluetooth firmware issues
[    3.217432] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    3.218922] Bluetooth: hci0: Found device firmware: intel/ibt-19-32-1.sfi
[    4.876884] Bluetooth: hci0: Waiting for firmware download to complete
[    4.877409] Bluetooth: hci0: Firmware loaded in 1623682 usecs
(base) aaron@aaron-Lenovo-IdeaPad-S340-15IILTouch:~$ lsusb # Displays hardware connected to the USB ports Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 13d3:56b2 IMC Networks Integrated Camera Bus 001 Device 003: ID 04f3:245a Elan Microelectronics Corp. Touchscreen Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 005: ID 8087:0aaa Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub (base) aaron@aaron-Lenovo-IdeaPad-S340-15IILTouch:~$ 

내가 들어갔을 때 alsamixer내 헤드폰이 음소거되어 있음을 보여 주었으므로 위의 SO 질문에 표시된 것처럼 음소거를 해제했지만 도움이되지 않았습니다.

최신 정보

알겠습니다. Sound Troublshooting Guide를 살펴 보고 몇 가지 참고할 사항을 찾았습니다.

  1. 내가 실행할 때
pacmd
>>> list-sinks
>>> exit

블루투스 헤드폰이 싱크로 표시되지만 종료시 블루투스 시스템이 충돌하고 헤드폰을 다시 연결하려면 헤드폰을 재부팅해야합니다. 다음은 명령의 출력입니다.

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: 45876 /  70% / -9.29 dB,   front-right: 45876 /  70% / -9.29 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 = "ALC257 Analog"
        alsa.id = "ALC257 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 0x6001110000 irq 142"
        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 = "34c8"
        device.product.name = "Smart Sound Technology 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 = "Analog Stereo"
        device.description = "Built-in Audio Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
            properties:
                device.icon_name = "audio-speakers"
        analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-headphones"
    active port: <analog-output-speaker>
  * index: 1
    name: <bluez_sink.38_F3_2E_BA_F6_B6.a2dp_sink>
    driver: <module-bluez5-device.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY 
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9050
    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
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 3 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
    fixed latency: 45.32 ms
    card: 1 <bluez_card.38_F3_2E_BA_F6_B6>
    module: 23
    properties:
        bluetooth.protocol = "a2dp_sink"
        device.description = "Crusher Wireless"
        device.string = "38:F3:2E:BA:F6:B6"
        device.api = "bluez"
        device.class = "sound"
        device.bus = "bluetooth"
        device.form_factor = "headset"
        bluez.path = "/org/bluez/hci0/dev_38_F3_2E_BA_F6_B6"
        bluez.class = "0x240404"
        bluez.alias = "Crusher Wireless"
        device.icon_name = "audio-headset-bluetooth"
        device.intended_roles = "phone"
    ports:
        headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
            properties:
                
    active port: <headset-output>

헤드폰은 음소거되지 않았으며 출력 볼륨은 100 %입니다.

  1. 내가 실행하면 aplay /usr/share/sounds/alsa/Front_Center.wav소리가 헤드폰에서 나옵니다! 그러나 설정 메뉴로 돌아가서 test스피커를 사용해 보거나 Firefox를 통해 음악을 재생하면 사운드가 여전히 내부 스피커에서 나옵니다.

  2. 나머지 단계는 정상적으로 나왔습니다. aplay -l목록을 사용할 때 헤드폰이 오디오 싱크로 포함되지 않는다는 점을 제외하면 중요 할 수 있습니다. 모르겠어요.

다음은 가이드에 해당하는 명령의 출력입니다.

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC257 Analog [ALC257 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

find /lib/modules/uname -r | grep snd

/lib/modules/5.4.0-42-generic/kernel/sound/synth/snd-util-mem.ko
/lib/modules/5.4.0-42-generic/kernel/sound/synth/emux/snd-emux-synth.ko
/lib/modules/5.4.0-42-generic/kernel/sound/pci/snd-es1968.ko
...
/lib/modules/5.4.0-42-generic/kernel/sound/drivers/snd-virmidi.ko
/lib/modules/5.4.0-42-generic/kernel/sound/drivers/opl3/snd-opl3-lib.ko
/lib/modules/5.4.0-42-generic/kernel/sound/drivers/opl3/snd-opl3-synth.ko

전체 출력은 여기에서 찾을 수 있습니다. https://pastebin.com/6dXhsa8h

lspci -v | grep -A7 -i "audio"

00:1f.3 Audio device: Intel Corporation Smart Sound Technology Audio Controller (rev 30) (prog-if 80)
    Subsystem: Lenovo Smart Sound Technology Audio Controller
    Flags: bus master, fast devsel, latency 32, IRQ 142
    Memory at 6001110000 (64-bit, non-prefetchable) [size=16K]
    Memory at 6001000000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel, snd_sof_pci

최신 정보

요청에 따라 여기에서 지정된 단계의 출력은 다음과 같습니다.

1.1 cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x6001110000 irq 142

1.2 lsmod | grep snd

snd_sof_pci            20480  0
snd_sof_intel_hda_common    69632  1 snd_sof_pci
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_intel_byt      20480  1 snd_sof_pci
snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
snd_hda_codec_hdmi     61440  1
snd_sof               106496  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc
snd_sof_xtensa_dsp     16384  1 snd_sof_pci
snd_hda_ext_core       28672  3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    32768  2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_acpi           16384  2 snd_sof_pci,snd_soc_acpi_intel_match
snd_soc_core          245760  3 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress           24576  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_codec_realtek   122880  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
ledtrig_audio          16384  3 snd_hda_codec_generic,snd_hda_codec_realtek,snd_sof
snd_hda_intel          53248  4
snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common
snd_hda_codec         131072  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_hda_core           90112  9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               106496  9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
snd                    90112  20 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
soundcore              16384  1 snd

1.4 inxi -SA

System:    Host: aaron-Lenovo-IdeaPad-S340-15IILTouch Kernel: 5.4.0-42-generic x86_64 bits: 64 Desktop: Gnome 3.36.4 
           Distro: Ubuntu 20.04.1 LTS (Focal Fossa) 
Audio:     Device-1: Intel Smart Sound Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.4.0-42-generic 

1.5 lspci -nnk | grep -n -A 4 Audio

55:00:1f.3 Audio device [0403]: Intel Corporation Smart Sound Technology Audio Controller [8086:34c8] (rev 30)
56: Subsystem: Lenovo Smart Sound Technology Audio Controller [17aa:3821]
57- Kernel driver in use: snd_hda_intel
58- Kernel modules: snd_hda_intel, snd_sof_pci
59-00:1f.4 SMBus [0c05]: Intel Corporation Ice Lake-LP SMBus Controller [8086:34a3] (rev 30)
60- Subsystem: Lenovo Ice Lake-LP SMBus Controller [17aa:3804]

1.6 uname -a

Linux aaron-Lenovo-IdeaPad-S340-15IILTouch 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

1.7 aplay -l이전 업데이트보기 1.8sudo lshw -C multimedia

  *-usb:2
       description: Video
       product: Integrated Camera
       vendor: SunplusIT Inc
       physical id: 6
       bus info: usb@1:6
       version: 17.11
       capabilities: usb-2.01
       configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
  *-multimedia
       description: Audio device
       product: Smart Sound Technology Audio Controller
       vendor: Intel Corporation
       physical id: 1f.3
       bus info: pci@0000:00:1f.3
       version: 30
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=32
       resources: iomemory:600-5ff iomemory:600-5ff irq:142 memory:6001110000-6001113fff memory:6001000000-60010fffff

1.9 dpkg -l | grep alsa

ii  alsa-base                                  1.0.25+dfsg-0ubuntu5                  all          ALSA driver configuration files
ii  alsa-topology-conf                         1.2.2-1                               all          ALSA topology configuration files
ii  alsa-ucm-conf                              1.2.2-1ubuntu0.1                      all          ALSA Use Case Manager configuration files
ii  alsa-utils                                 1.2.2-1ubuntu1                        amd64        Utilities for configuring and using ALSA
ii  gstreamer1.0-alsa:amd64                    1.16.2-4                              amd64        GStreamer plugin for ALSA

1.10 dpkg -l | grep linux- | grep $(uname -r)

ii  linux-headers-5.4.0-42-generic             5.4.0-42.46                           amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii  linux-image-5.4.0-42-generic               5.4.0-42.46                           amd64        Signed kernel image generic
ii  linux-modules-5.4.0-42-generic             5.4.0-42.46                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.4.0-42-generic       5.4.0-42.46                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP

답변

3 Raffa Sep 03 2020 at 18:27

먼저 사용자 계정에 대한 새로운 pulseaudio 구성을 재 구축하는 것이 좋습니다 . 이것은 대부분의 경우 문제를 해결하거나 적어도 pulseaudio 구성과 관련된 문제를 배제 할 수 있습니다.

이전 pulseaudio구성 파일은 때때로 pulseaudio패키지 업그레이드 후의 최신 버전과 충돌 할 수 있습니다 . 이 문제를 해결하려면 다음 단계를 따르십시오.

  • 터미널에서 다음 명령을 실행하여 ~/.config/pulse/구성 디렉토리를 백업 ~/.config/pulse_old/하십시오.

    mv ~/.config/pulse/ ~/.config/pulse_old/

  • 그 후 시스템을 재부팅하여 새 pulseaudio구성 파일을 작성하십시오. 새 ~/.config/pulse/디렉토리가 자동으로 생성됩니다.

  • 지금 오디오를 테스트하십시오.

어떻게 든 경우 이 수정 프로그램을 적용한 후 수정 프로그램을 적용하기 전에 이전 상태로 되돌아 가기로 결정, 다음 단계를 따르십시오

  1. 터미널에서 다음 명령을 실행하십시오.

    rm -r ~/.config/pulse/

  2. 터미널에서 다음 명령을 실행하십시오.

    mv ~/.config/pulse_old/ ~/.config/pulse/

  3. 시스템을 재부팅하십시오.

그러나 모든 것이 정상이고 문제가 해결~/.config/pulse_old/경우 터미널에서 다음 명령을 실행하여 백업 된 이전 구성 디렉토리 를 제거하여 여유 공간을 확보 할 수 있습니다 (원하는 경우).

rm -r  ~/.config/pulse_old/
3 CarlosPinzón Aug 24 2020 at 23:40

한 번 WindowsLinux 에서 비슷한 문제가 발생 했으며 두 시스템의 솔루션 은 헤드셋 마이크비활성화하는 것이 었습니다 (내부 마이크 선택).

블루투스 인터페이스가 다음 중 하나만 지원하는 것 같습니다 (여기에서 논의).

  • 고품질 (a2dp) 오디오 출력 또는
  • 고품질 (a2dp) 마이크 입력 또는
  • 저품질 (hsp / hfp) 입력 및 출력.

헤드셋 마이크가 고품질로 캡처하여 헤드셋 스피커를 차단하는 경우 일 수 있습니다.