0

Every time I reboot my Ubuntu 16.04 I need to run manually this command sudo pactl load-module module-bluetooth-discover before I can connect to my bluetooth headphone or I get error "Connection Failed: blueman.bluez.errors.DBusFailedError: Protocol not available..."

What file should I add this to make sure this command is run during startup?

  • Have you tried this? https://askubuntu.com/a/833323/393832 You can also try installing the following packages: bluez, bluez-cups, bluez-obexd, gnome-bluetooth, indicator-bluetooth, libbluetooth3:amd64,l ibgnome-bluetooth13:amd64, pulseaudio-module-bluetooth. Got the list here (german ubuntu wiki): https://wiki.ubuntuusers.de/Bluetooth/Einrichtung/ – DamBedEi Jan 15 '18 at 12:21
  • Adding ControllerMode = bredr did not help – Margus Pala Jan 15 '18 at 13:48
  • Did you try to install the other packages? They should create a startup-script for bluetooth for you. Then you just need to setup your connection to your headphones using the System Settings > Bluetooth dialog – DamBedEi Jan 15 '18 at 14:50
  • All of these packages are already installed and newest versions – Margus Pala Jan 16 '18 at 15:18

1 Answers1

0

You need to install the bluez package:

sudo apt-get install bluez

A startup-script called bluetooth gets created in your /etc/init.d folder. Also don't forget to enable bluetooth: Go to System Settings -> Bluetooth

DamBedEi
  • 303
  • It did not help. Where exactly to add it in this file? I added it to the case start like this
        log_progress_msg "${DAEMON##*/}"
    
        run_sdptool || :
        pactl load-module module-bluetooth-discover
        if test "$HID2HCI_ENABLED" = 1; then
    
    – Margus Pala Jan 15 '18 at 13:45
  • I didn't edit this file. It was generated by one of the bluetooth packages – DamBedEi Jan 15 '18 at 14:50