PulseAudio 실패를 설정하는 카드에 프로필'a2dp_sink'. 인지를 확인하려면 어떻게 로그를 파악 잘못입니까?

나는 현재 설치된 우분투 16.04 및 a2dp 작업에 사용되는 신선한 설치는 나는'd 아보세요로 떠나는 지난 옵션입니다. 때 페어링이에서 삭제 블루투스 설정 및 연결을 다시 때때로 그것을 관리하에 있 a2dp 프로필하지만,경우에 헤드셋 연결을 끊고 다시 연결 a2dp 프로파일하지 않't 는 더 이상 작동(지만 그것은 말이에 a2dp),그것은 작동 후 전환 HSP/HSF 그리고 나는'm 을 설정할 수 없습에 a2dp.

내가 노력 하고 있:

 pacmd set-card-profile <index> a2dp_sink

그러나 다음과 같은 오류가 나온다:

"Failed to set card profile to 'a2dp_sink'"

나는'm 주 경험이 리눅스에서는 그래서 나는't 을 얻는 방법을 알고 로그 또는 무엇을 찾기 위해서는 그들에게,그러나 내가 이것에서 pacmd 목록 카드:

할 때 그것은 작품:

name: <bluez_card.50_C9_71_97_A1_86>
driver: <module-bluez5-device.c>
owner module: 27
properties:
    device.description = "Jabra REVO a4.0.0"
    device.string = "50:C9:71:97:A1:86"
    device.api = "bluez"
    device.class = "sound"
    device.bus = "bluetooth"
    device.form_factor = "headset"
    bluez.path = "/org/bluez/hci0/dev_50_C9_71_97_A1_86"
    bluez.class = "0x240404"
    bluez.alias = "Jabra REVO a4.0.0"
    device.icon_name = "audio-headset-bluetooth"
    device.intended_roles = "phone"
profiles:
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: unknown)
    off: Off (priority 0, available: yes)
active profile: <a2dp_sink>
sinks:
    bluez_sink.50_C9_71_97_A1_86/#6: Jabra REVO a4.0.0
sources:
    bluez_sink.50_C9_71_97_A1_86.monitor/#10: Monitor of Jabra REVO a4.0.0
ports:
    headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
        properties:

    headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)
        properties:

할 경우에는't:

name: <bluez_card.50_C9_71_97_A1_86>
driver: <module-bluez5-device.c>
owner module: 25
properties:
    device.description = "Jabra REVO a4.0.0"
    device.string = "50:C9:71:97:A1:86"
    device.api = "bluez"
    device.class = "sound"
    device.bus = "bluetooth"
    device.form_factor = "headset"
    bluez.path = "/org/bluez/hci0/dev_50_C9_71_97_A1_86"
    bluez.class = "0x240404"
    bluez.alias = "Jabra REVO a4.0.0"
    device.icon_name = "audio-headset-bluetooth"
    device.intended_roles = "phone"
profiles:
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: yes)
    off: Off (priority 0, available: yes)
active profile: <off>
ports:
    headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
        properties:

    headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)
        properties:

과를 소유하 모듈:

name: <module-bluez5-device>
argument: <path=/org/bluez/hci0/dev_50_C9_71_97_A1_86>
used: 0
load once: no
properties:
    module.author = "João Paulo Rechi Vita"
    module.description = "BlueZ 5 Bluetooth audio sink and source"
    module.version = "8.0"

나가도 수정/etc/bluetooth/오디오입니다.conf 설치 blueman 지 않았't work. 리스도를 다시 설치 bluez 및 pulseaudio 하지만 아무것도 변경되었습니다.

방법은 없을 알 수있는 무엇's 잘못은 그것을 해결?

질문에 대한 의견 (2)

기반으로 줄"성:<<해>해>"sound 프로필지 않았't 활성화합니다.

하나의 프로그램을 쉽게 사용을 변경하는 프로필 pavucontrol. 당신은 그것을 설치할 수 있으로sudo apt 설치 pavucontrol-y. 한 후 실행 pavucontrol 명령행에서 또는 Alt+F2 는 경우에학 및를 입력 pavucontrol.

구성 탭을 선택합한 다음 변경하십시오 프로필에 대한 귀하의 헤드폰과는 경우를 참조하십시오 업데이트습니다. 있을 것으로 버그 블루투스 a2dp 도에서 리눅스과에 영향을 미치는 두 나의 16.04 설치합니다. 면 이미 말 A2DP 변경은 그것을 끄기 분리 장치에서 블루투스 애플릿,다시 연결합니다. 그런 다음 마지막으로 진행하는 프로파일을 변경 다시 A2DP 고 그것을 작동합니다.

수도 있습에서 다음 명령 라인과 그것은 탭을 완료하고 그것의 대부분은 당신을 위해. 대체 숫자 2 인덱스 번호 현재 모두를 위해 pacmd 아래 명령.

pacmd set-card-profile 2 off
bluetoothctl
disconnect 50:C9:71:97:A1:86
connect 50:C9:71:97:A1:86
pacmd set-card-profile 2 a2dp_sink

더 복잡하지만 자동화된 방법으로 이를 위한 사이클 프로파일을 다시 사하 a2dp 하지 않 블루투스 장치의 분리와 연결할

index=`pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'`;pacmd set-card-profile $index off; pacmd set-card-profile $index a2dp_sink 

또한을 작동하는지 스크립트 실수 같은 일을 하지만 또한 연결을 끊고 다시 연결 블루투스 헤드폰. 그것을 잡고 프로파일 인덱스이기 때문에 인덱스를 때마다 변화 장치의 연결을 끊고 다시 연결. 이것은 하드 장치 id 를 위한 헤드폰을 위에 나열된

pacmd set-card-profile `pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` off; sleep 2 ; echo -e "disconnect 50:C9:71:97:A1:86\n quit"|bluetoothctl;sleep 5; echo -e "connect 50:C9:71:97:A1:86\n quit"|bluetoothctl; sleep 5; pacmd set-card-profile `pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` a2dp_sink

테스트 기간 동안 나는 종료와 함께 5 초간에 대한 잠을 대신 3 기 때문에 장치지 않았't 준비가 변경합 오디오 프로필 아직입니다. 의 결과에 따라 다를 수 있습니다 몇 초+/-5seconds. 편집에 관한 잠재적인 문제. 내가 찾았어요는's 은 때때로 실행에 필요한 더 큰 스크립트를 하기 전에 두 번 작동합니다. 나는'하는지 확인하는 증가하는데 도움이 될 것이라 나는't 테스트니다. 하지만 내가 사용한 그것은 두 컴퓨터에서 동일한 브랜드의 BT 헤드폰과 그's doing what it's 을 위한 프로세스를 자동화하는 사운드를 얻을에서 작업합니다.

결국 문제가 될 것입니다 패치 블루투스 패키지는 것 같아에 새로운 자료의 우분투뿐만 아니라 다른 버전의 리눅스. 하지만 어쨌든 도움이 됐으면 좋겠어 너를 위해

해설 (5)

할 수 있도록하기 위해 귀하의 시스템을 감지하는 A2DP 싱크(예:음악을 재생하는 휴대전화에서 컴퓨터를 통해 스피커)을 추가 Enable=원본,싱크대,미디어,소켓에서[일반]에서/etc/bluetooth/오디오입니다.conf`.

이렇게 한 후,다시 시작 블루투스 디몬

systemctl restart bluetooth

헤드폰 연결 장치

bluetoothctl
connect 

체크인 카드 설정 프로파일

pacmd list-cards
pacmd set-card-profile  
해설 (5)

나는 이 문제는 우분투에서 16.04.1LTS,그리고 적용 GDM 일 주위에서 발견 https://wiki.debian.org/BluetoothUser/a2dp 그것을 해결했다.

특히,생성/수정/var/lib/gdm3/.config/펄스/클라이언트입니다.conf`을 읽기:

autospawn = no
daemon-binary = /bin/true

다음

sudo chown gdm:gdm /var/lib/gdm3/.config/pulse/client.conf

또한 추가하는/etc/펄스/기본입니다.pa

load-module module-switch-on-connect

하지만 이 되지 않을 수도 있습 엄격히 필요합니다.

후 재부팅,나 블루투스를 통해 연결되어있는 관리자할 수 있었을 성공적으로 스위치의 오디오 프로파일을a2dp_sink.

해설 (2)

lagerismi에 게시 스크립트여기에 launchpad에 따라답 by Jamie S.

-변화 장치 MAC 주소 변수의 내부는 스크립트! (에 발견될 수 있는bluetoothctl-->장치)

-스크립트를 실행chmod a-x bluetooth_headphone_reactivation.sh

자동 실행에서 시작(작동하는 경우 헤드폰은 이미 설정한다):

-추가로 스크립트 시작/종료 스크립트에서 KDE's 컨트롤 패널

에 대한 빠르게 수동 실행:

-에 항목을 추가 응용 프로그램-시동기(설정할 수도 있습니다견을 더욱 쉽게 확인할 바로 가기를 다음과 같"<Ctrl>+<Alt>+H"그리고/또는 핀이 스타를 창 bar)

스크립트:

#!/bin/sh
device_mac=''
pacmd set-card-profile `pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` off
sleep 2 
echo "disconnect $device_mac\n quit"|bluetoothctl
sleep 5
echo "connect $device_mac\n quit"|bluetoothctl
sleep 5
pacmd set-card-profile `pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}'` a2dp_sink
해설 (1)

에 분투 16.04.2 사용 blueman-manager:

  1. 연결->트 프로파일 off
  2. 다시 연결->트 프로파일 a2dp
  3. 지금 당신의 헤드셋 ok!

나 JBL bash 스크립트

#!/bin/bash
#headset mac
mac="00:1D:DF:67:0A:29"
profile="a2dp"
# Special Bluetooth controller, default is empty
btMac=""
#connect|disconnect wait time
waitTime=5

macId="${mac//:/_}"
deviceId="bluez_card.$macId"

declare -A profiles
profiles['a2dp']='a2dp_sink'
profiles['hsp']='headset_head_unit'
profiles['off']='off'

function btCmd() {
    cmd="$1\nquit"
    [ ! -z "$btMac" ] && cmd="select $btMac\n$cmd"
    echo -e "$cmd" | bluetoothctl
}
function setProfile() {
    cmd="pactl set-card-profile $deviceId ${profiles[$1]}"
    echo $cmd
    $cmd
}
function btWaitConnect() {
    conState=$1
    for ((i=1;i set off
echo ""
tmp="`btCmd paired-devices | grep '^Device' | grep " $mac"`"
echo -e "paired-devices:\n$tmp"
[ `echo "$tmp" | wc -l` != 1 ] && echo "Please pair the Bluetooth headset first: $mac" && exit 1
btConnect || exit $?
setProfile off

# reconnect -> set profile
btDisConnect || exit $?
btConnect || exit $?
setProfile $profile
해설 (2)

그래서 사용하는 경우에는 데비안 다음을 수행할 수 있습니다:전환을 거부 프로파일 a2dp_sink:연결되지

문제

블루투스 헤드셋 연결되어 있지만,ALSA/PulseAudio 실패를 선택하는 연결된 장치 또는's no 장치를 선택합니다. 이 때문에 발생 GDM 캡처 A2DP 싱크대에 세션을 시작으로,GDM 필요 펄스에서 gdm 세션에 대한 접근성. 예를 들면,화면의 리더가 필요합니다.

솔루션

을 방지하기 위해서 GDM 서 A2DP 싱크대에 세션을 시작,편집/usr/lib/gdm3/.config/펄스/클라이언트입니다.conf(또는 그것을 만들면 그것이't 존재하):

autospawn = no
daemon-binary = /bin/true

그 후 당신은에 액세스 권한을 부여하려면 이 파일 Debian-gdm 사용:

chown Debian-gdm:Debian-gdm /var/lib/gdm3/.config/pulse/client.conf

당신은 또한 필요를 해제하 펄스 시작:

rm /var/lib/gdm3/.config/systemd/user/sockets.target.wants/pulseaudio.socket

하기 위해서 자동 연결 a2dp 일부 장치에 대한 추가,이에/etc/펄스/기본입니다.pa:

load-module module-switch-on-connect

재부팅합니다.

해설 (1)

문서화된여기서,그것 때문에 GDM 캡처 A2DP 싱크대에 세션을 시작으로,GDM 필요 펄스에서 gdm 세션에 대한 접근성.
를 추가하려고 이를"var/lib/gdm3/.config/펄스/기본입니다.pa"거나 그것을 만들고,다시 재부팅:

#!/usr/bin/pulseaudio -nF
#

# load system wide configuration
.include /etc/pulse/default.pa

### unload driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
  unload-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
  unload-module module-bluetooth-discover
.endif
해설 (0)

나는'm 는 이 대답은 실제로 해결하려고의 근본 원인 문제입니다. 나는,그러나지 않았을 얻을 수 있는 모든 그들의 작동합니다. 나는 정확히 동일한 문제로 협동,하지만 리눅스 민트에 17/18. 내가 쓴[이 스크립트](https://gist.github.com/Knetic/4fbf62dfb59a5c0a0feac34b818ce621 는)안정적으로 얻 블루투스 연결을 사용하여 a2dp.

복사/붙여넣에 대한 후손이지만,정면의 문제는 그것을 정확히 복제하는 것 OP(와 I)해야 할 것입니다.

스크립트에 의해 도미니크 것't 안정적으로 작동하기 때문에,나를 위해 그만하려고 once 를 설정합니다. 나는'd 을 여러 번 실행하고 그것을 얻을 작동합니다. 이것은 내가 종료와 함께,그 모든 시간을 작동합니다.


#!/bin/bash

MAC=$1
CARD=$(echo "${MAC}" | sed -e 's/:/_/g')
CARD="bluez_card.${CARD}"

$(pactl list | grep -qi 'Active Profile: a2dp_sink')
a2dpUsed=$?

# this loops until a2dp is _actually used_ on the given MAC.
while [ ${a2dpUsed} -ne 0 ];
do
    #
    echo "Restarting bluetooth."
    rfkill unblock bluetooth
    sudo service bluetooth restart
    sudo hciconfig hci0 up

    # reconnect
    echo -e "power on\nconnect ${MAC}" | bluetoothctl

    #
    echo "Waiting for headset to be connected..."
    btConnected=1

    while [ ${btConnected} -gt 0 ];
    do

        sleep .1
        $(bluetoothctl 
해설 (0)
systemctl restart bluetooth

-오픈 소리 설정(클릭하여 액세스할 수 있는 스피커에서 아이콘 트레이) -시도하고 출력물 프로파일 A2DP 다. -는 경우에는't,작동 장치를 변경 스피커,또는 다른 뭔가가 다음 스위치합니다. -나는 일반적으로 찾을 수 있는 다음 설정 출력 프로필

해설 (0)

었을 설정하려고 나 블루투스는 항상 이 오류가 있습니다.

내가 찾는 것이 문제였습니다. 가 있는 경우 Skype 실행 저는'm 을 설정할 수 없습a2dp_sink프로필입니다.

그래서,당신은 당신이 문제로 실행,당신은 Skype 실행하고 그것을 해제합니다.

해설 (0)

선택하에 그것을 해결하 udev 규칙으로,나는 유일한 사용자의 시스템이므로,$사용자,$XAUTHORITY$디스플레이잘 알려져 있습니다.

아마도 이용하는 누군가를 원하는 솔루션에 정의된 단일 파일에서 실행,우분투 18.04.1LTS.

후크를 통해 트리거 입력 하위 시스템이기 때문에 스피커 나타나는 것을 완전히 초기화된 이 단계에 있습니다.

``

file:/etc/udev/rules.d/99-jbl-go2.규정

fix JBL GO2CSR 블루투스위 a2dp 프로필에 연결

byteborg20190110

하위 시스템을=="input",ACTION=="추가",ATTRS{이름}=="70:99:1C:41:C6:EB",ENV{디스플레이}=":0",ENV{XAUTHORITY}="//실행용/1000/gdm/Xauthority",실행+="/bin/스와 알파-c'/usr/bin/pacmd 설정 카드로 bluez_card.70_99_1C_41_C6_EB a2dp_sink'" ``

이 Archlinux Wiki 언급 캠브리지 실리콘 라디오 장치를 제공하는 잘못된 프로필에 연결(https://wiki.archlinux.org/index.php/Bluetooth_headset#A2DP_sink_profile_is_unavailable). 나는 이것을 인정하고 행동하는 a"JBL 갈 2"블루투스 스피커,오작동하는 같은 이미 언급했다. a2dp 것을 사용할 수 있는 짧은 동안 후에 연결--아마 타이밍 문제가?

해설 (0)

이 고정된 설정된 카드이 프로파일 문제에 대한 저:https://bugs.launchpad.net/ubuntu/+원/pulseaudio/+bug/1181106/comments/15

견적: `` 1)수정/etc/bluetooth/오디오입니다.conf

[일반] Enable=원본,싱크대,헤드폰,게이트웨이,컨트롤,미디어 Disable=Socket

HFP=false

[A2DP] SBCSources=1 MPEG12Sources=0

2)확인을 위한 펄스 모듈:

$pactl 목록|grep-i 모듈 블루투스

는 경우가 있다: 모듈 블루투스-책 모듈 블루투스-발견 모듈 블루투스 장치

그냥: $sudo apt-get install pulseaudio-모듈 블루투스 $pulseaudio-k $pactl 드-모듈 모듈 블루투스 장치 $pactl 드-모듈 모듈 스위치에 연결

3)연결 블루투스 헤드셋

사용 blueman 쌍을 연결 오디오 싱 사용 pavucontrol 을 변경하는 대한 A2DP(는 경우에도 blueman 말했"오디오 프로필 해")

하는지 확인하시기 바랍에 작동합니다. ``

해설 (0)