5

Bluetooth output does not show anymore in pavucontrol "Playback" tab after successful bluetooth device connection and therefore does not output any sound into the bluetooth device.

$ bluetoothctl 
[NEW] Controller 00:1A:7D:DA:71:04 sebastien-B206 [default]
[NEW] Device 97:40:B1:EF:BD:54 PROZOR RX5.0
[bluetooth]# connect 97:40:B1:EF:BD:54
Attempting to connect to 97:40:B1:EF:BD:54
[CHG] Device 97:40:B1:EF:BD:54 Connected: yes
Connection successful

Pulse-audio bluetooth sinks :

$ pactl list sinks short | grep bluez_sink
$

Pulse-audio bluetooth modules :

$ pactl list modules short | grep module-blue
8   module-bluetooth-policy     
9   module-bluetooth-discover       
10  module-bluez5-discover      
$

Can you please help me ?

SebMa
  • 2,035

2 Answers2

1

One solution was to disable pulseaudio in GDM because pulseaudio instance of GDM was "stealing" the bluetooth sink from $USER.

So here's what I did thanks to Gnome_with_GDM :

$ ps -fC pulseaudio
UID        PID  PPID  C STIME TTY          TIME CMD
gdm       1858     1  0 14:27 ?        00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
sebasti+  3263     1  2 14:28 ?        00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
$ gdm_home=$(grep gdm /etc/passwd | cut -d: -f6)
$ sudo -u gdm mkdir -pv $gdm_home/.config/pulse/ $gdm_home/.config/systemd/user/
$ sudo test ! -s $gdm_home/.config/pulse/client.conf && printf "autospawn = no\ndaemon-binary = /bin/true\n" | sudo -u gdm tee $gdm_home/.config/pulse/client.conf
autospawn = no
daemon-binary = /bin/true
$ sudo -u gdm ln -vs /dev/null $gdm_home/.config/systemd/user/pulseaudio.socket
'/var/lib/gdm3/.config/systemd/user/pulseaudio.socket' -> '/dev/null'
$ sudo reboot
$ ps -fC pulseaudio
UID        PID  PPID  C STIME TTY          TIME CMD
sebasti+  3024     1  0 15:03 ?        Sl     0:00 /usr/bin/pulseaudio --start --log-target=syslog
$ pactl list modules short | grep blue
8   module-bluetooth-policy
9   module-bluetooth-discover
10  module-bluez5-discover
31  module-bluez5-device    path=/org/bluez/hci0/dev_97_40_B1_EF_BD_54
$ { echo disconnect 97:40:B1:EF:BD:54;sleep 2;echo connect 97:40:B1:EF:BD:54;sleep 2; } | bluetoothctl 2>/dev/null | egrep -i "(dis)?connect(ion|ed)?|successful"
[bluetooth]# disconnect 97:40:B1:EF:BD:54
Attempting to disconnect from 97:40:B1:EF:BD:54
Successful disconnected
[bluetooth]# connect 97:40:B1:EF:BD:54
Attempting to connect to 97:40:B1:EF:BD:54
[CHG] Device 97:40:B1:EF:BD:54 Connected: yes
Connection successful
$ pactl list sinks short | grep bluez_sink
4   bluez_sink.97_40_B1_EF_BD_54    module-bluez5-device.c  s16le 2ch 48000Hz   SUSPENDED
$ pactl list sink-inputs short
0   0   8   protocol-native.c   float32le 2ch 44100Hz
$ pactl move-sink-input 0 4
$
SebMa
  • 2,035
0

Quick fix: You may also simply close pulseaudio on the other user:

ssh otheruser@localhost
systemctl --user stop pulseaudio.service
Suuuehgi
  • 267