Table des matières

Connexion casque audio bluetooth a2dp

Introduction

Comment connecter son casque audio bluetooth sous Debian stretch

connexion du casque avec le profil a2dp

Gnome / GDM

Debian stretch

Configuration GDM

Troubleshooting: Refused to switch profile to a2dp_sink: Not connected

Bluetooth headset is connected, but ALSA/PulseAudio fails to pick up the connected device or there's no device to pick. This happens because GDM captures A2DP sink on session start, as GDM needs pulseaudio in the gdm session for accessibility. For example, the screen reader requires it. See 805414 for some discussion.

Workaround 1: disable pulseaudio in gdm

In order to prevent GDM from capturing the A2DP sink on session start, edit /var/lib/gdm3/.config/pulse/client.conf (or create it, if it doesn't exist):

/var/lib/gdm3/.config/pulse/client.conf
autospawn = no
daemon-binary = /bin/true

After that you have to grant access to this file to Debian-gdm user:

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

You will also need to disable pulseaudio startup:

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

In order to auto-connect a2dp for some devices, add this to /etc/pulse/default.pa:

/etc/pulse/default.pa
load-module module-switch-on-connect

Reboot.

Now the sound device (bluetooth headset) should be accessible through pavucontrol and standard audio device manager.

lien: https://wiki.debian.org/BluetoothUser/a2dp#Workaround_1:_disable_pulseaudio_in_gdm

Connexion du casque

# lister les périphériques 
pactl list cards short
3	bluez_card.D8_D4_3C_9E_F0_BB	module-bluez5-device.c
 
# changer le profile du périphérique bluetooth
pacmd set-card-profile bluez_card.D8_D4_3C_9E_F0_BB off
 
# déconnecter puis reconnecter le périphérique bluetooth 
bluetoothctl
disconnect D8:D4:3C:9E:F0:BB
connect D8:D4:3C:9E:F0:BB
 
# changer le profile du périphérique bluetooth
pacmd set-card-profile bluez_card.D8_D4_3C_9E_F0_BB a2dp_sink