Blueman Protocol not available

Today my bluetooth headset stopped working. I haven't modified anything recently (although a few days ago I was trying to get a bluetooth headset to automatically connect in a2dp mode, which involved installing blueman and re-pairing with it, but I've connected and rebooted several times since making that change and everything was working).

Now when I try to connect the headset I get:

Connection Failed: blueman.bluez.errors.DBusFailedError: Protocol Not available

Based on a few things from here (Bluetooth - Connection Failed: blueman.bluez.errors.DBusFailedError: Protocol Not available) and other Internet searches, I've tried:

$ sudo apt-get install pulseaudio-module-bluetooth
$ pactl load-module module-bluetooth-discover

And I've tried reinstalling things:

$ sudo apt-get --purge --reinstall install bluetooth bluez blueman pulseaudio pulseaudio-module-bluetooth
$ sudo /etc/init.d/networking restart
    [ ok ] Restarting networking (via systemctl): networking.service.
$ sudo /etc/init.d/bluetooth restart
    [ ok ] Restarting bluetooth (via systemctl): bluetooth.service.

And of course rebooting, but nothing seems to help, and I can't figure out what protocol it's talking about, since I can see the headset and pair with it, but not make an audio connection.

I'm running Ubuntu 18.04.1. Some other details:

$ dpkg -l | grep blue
    blueman                            2.0.5-1ubuntu1    
    bluetooth                          5.48-0ubuntu3.1
    bluez                              5.48-0ubuntu3.1
    bluez-cups                         5.48-0ubuntu3.1
    bluez-obexd                        5.48-0ubuntu3.1
    gir1.2-gnomebluetooth-1.0:amd64    3.28.0-2ubuntu0.1
    gnome-bluetooth                    3.28.0-2ubuntu0.1
    indicator-bluetooth                0.0.6+17.10.20170605-0ubuntu3                
    libbluetooth3:amd64                5.48-0ubuntu3.1                              
    libgnome-bluetooth13:amd64         3.28.0-2ubuntu0.1
    pulseaudio-module-bluetooth        1:11.1-1ubuntu7.1

$ sudo service bluetooth status
* bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset    Active: active (running) since Mon 2019-02-04 14:36:47 PST; 1min 13s ago
     Docs: man:bluetoothd(8)  Main PID: 6912 (bluetoothd)    Status: "Running"
    Tasks: 1 (limit: 4915)    CGroup: /system.slice/bluetooth.service
           └─6912 /usr/lib/bluetooth/bluetoothd

Feb 04 14:36:47 AVB systemd[1]: Starting Bluetooth service... Feb 04 14:36:47 AVB bluetoothd[6912]: Bluetooth daemon 5.48 Feb 04 14:36:47 AVB systemd[1]: Started Bluetooth service. Feb 04 14:36:47 AVB bluetoothd[6912]: Starting SDP server Feb 04 14:36:47 AVB bluetoothd[6912]: Bluetooth management interface 1.14 initialized

$ dmesg | grep Bluetooth
    [    5.197632] Bluetooth: Core ver 2.22
    [    5.197654] Bluetooth: HCI device and connection manager initialized
    [    5.197657] Bluetooth: HCI socket layer initialized
    [    5.197660] Bluetooth: L2CAP socket layer initialized
    [    5.197664] Bluetooth: SCO socket layer initialized
    [    5.349217] Bluetooth: hci0: Firmware revision 0.1 build 185 week 49 2017
    [    5.492623] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    5.492625] Bluetooth: BNEP filters: protocol multicast
    [    5.492628] Bluetooth: BNEP socket layer initialized
    [   16.972106] Bluetooth: RFCOMM TTY layer initialized
    [   16.972113] Bluetooth: RFCOMM socket layer initialized
    [   16.972117] Bluetooth: RFCOMM ver 1.11
    [   84.672241] Bluetooth: hci0: last event is not cmd complete (0x0f)

$ hciconfig
    hci0:    Type: Primary  Bus: USB
    BD Address: 74:70:FD:B6:73:0C  ACL MTU: 1021:4  SCO MTU: 96:6
    UP RUNNING PSCAN ISCAN INQUIRY
    RX bytes:18753 acl:61 sco:0 events:738 errors:0
    TX bytes:14257 acl:60 sco:0 commands:267 errors:0

$ lspci -knn | grep Net -A3
    02:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
    Subsystem: Intel Corporation Dual Band Wireless-AC 8265 [8086:0010]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

$ lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 8087:0a2b Intel Corp.
    Bus 001 Device 002: ID 13d3:5a07 IMC Networks
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ ps aux | grep blue
    me        2032  0.0  0.6 694048 54240 tty2     Sl+  14:19   0:01 /usr/bin/python3 /usr/bin/blueman-applet
    me        2091  0.0  0.0  82728  6832 ?        Ss   14:19   0:00 /usr/lib/bluetooth/obexd
    root      6912  0.0  0.0  37992  6096 ?        Ss   14:36   0:02 /usr/lib/bluetooth/bluetoothd

Any suggestions on where to look next? Thanks.


Solution 1:

For me just reloading the module by executing:

pactl unload-module module-bluetooth-discover
pactl load-module module-bluetooth-discover

helped solving the issue.

Solution 2:

What did work for me was this: (as pointed above by Luca Mattia Ferrari)

$ sudo apt-get purge pulseaudio  
$ rm ~/.config/pulse && sudo killall pulseaudio  
$ sudo apt-get install pulseaudio  
$ pulseaudio --start

The above to ensure pulse is working first.
Then, this one, which is a bit weird that doesn't come by default with pulseaudio itself:

$ sudo apt-get install pulseaudio-module-bluetooth  
$ pactl load-module module-bluetooth-discover  

A bit redundant I know, but these were the exact steps worked for me 10 minutes ago.
But OK, at least it works now :)