6

I can add and connect the bluetooth speaker in Linux (UE BOOM speaker; some details in this answer here). At that point it is paired and trusted and works perfectly.

The problem is that after almost every logout and after every restart the bluetooth speaker is absent in the list of output devices that can be selected in pavucontrol or in a panel applet that I have installed in this Mint Xfce.

The same happens if the speaker was disconnected and used by another machine or a phone.

It is still present in the devices list of the bluetooth settings but is disabled and cannot be enabled

enter image description here

In rare cases the device is marked as "soft blocked" in sudo rfkill list. In such cases I can unblock it with sudo rfkill unblock bluetooth, which sometimes is enough, but in most of those cases is not enough (I have to connect it manually). But in most of all cases (that is: when the device is seen but not connecting), it is not blocked.


What works in all cases

(but that I would like to avoid doing after each restart/login):

  • removing the device completely from the Xfce Bluetooth settings,
  • pushing the bluetooth button of the speaker (image),
  • letting the laptop find the UE BOOM speaker again. (In most cases this is enough for the speaker to be connected automatically and appear in pavucontrol and the panel applet. In some cases the command sudo rfkill unblock bluetooth is needed before the computer can see the speaker.)

Therefore, there seem to be two issues here, that may or may not happen on the same occasion:

  • the speaker being 'soft blocked'

  • the speaker being seen but without connection

This problem is not Ubuntu, Xfce or kernel specific, I have seen it in the same terms in Ubuntu Gnome, KDE-neon, and in Solus (Gnome and Budgie).


Changing #AutoEnable=false to AutoEnable=true in the /etc/bluetooth/main.conf doesn't help.


Systems where I encountered this problem:

  • Linux Mint 18.2 Xfce

  • Ubuntu-Gnome 17.04

  • KDE-neon (ubuntu-16.04-based),

  • Solus (Gnome and Budgie)

  • Kubuntu 17.10

2
  • In my experience (with the first UE BOOM), there is very little compatibility and establishing a connection can be very difficult. Have you tried connecting to the device with bluetoothctl?
    – Torin
    Mar 6, 2018 at 11:41
  • @TorinCarey - please see my answer below. I have fixed this by chance when I changed my system (I often do...)
    – user32012
    Mar 6, 2018 at 11:51

2 Answers 2

3

Before anything else: be sure there no other devices like smartphones or laptops are connecting to the same USB external device.


I think it is normal to mention under this question the practical solution that I have found - or more correctly the practical circumstance under which the problem has vanished - and that may shed some light on what the problem really is (or is not).

So - after seeing this problem in Linux Mint 18.2 Xfce, Ubuntu-Gnome (17.04, if I'm not mistaken), KDE-neon (ubuntu-16.04-based I think), and in Solus (Gnome and Budgie, a rolling release), I can confirm that Ubuntu 16.04 proper ("Ubuntu Desktop", aka Unity) is not affected by this.

Once added and connected, the speaker bluetooth device is remembered and is automatically connected if powered on without previous or further ado.

It only needs to be selected in the sound settings.

enter image description here

That's that, I don't know what to conclude, except that the most central distributions are recommendable in critical cases.


UPDATE ~ Other systems that are not affected by this problem:

  • Linux Mint 18.3 KDE

  • Linux Mint 18.3 Mate


What works on systems where this problem appears:

In such cases running sudo rfkill list gives Soft blocked: yes, which can be unblocked with sudo rfkill unblock bluetooth or even rfkill unblock bluetooth.

If that doesn't work to unblock (or even in any case) it might be a good idea to do:

systemctl enable bluetooth.service
systemctl start bluetooth.service

(as indicated here; the first command will ask for password multiple times)


The UE BOOM2 device can be reset with a long push at the same time on the power button and the down volume button (until a sound is heard and the device shuts down), which may be helpful in combination with the above.

1

The UE Boom 2 speaker uses Bluetooth Low Energy (LE) to report its power level periodically and enable the remote power-on function using the mobile phone application even whilst powered-off.

Having experienced the same problem as OP, I believe that this is the cause to the problem... For whatever reason, Bluez attempts to connect to the speaker using LE instead of BR/EDR (normal bluetooth) and immediately fails. The log messages usually relate to GATT and as additional evidence, when a device is powered-down it will still attempt to connect but not return the expected 'host is down' message because LE is always-on and available. It doesn't actually connect to the audio sink and most of the time reports 'resource unavailable'.

So... During the pairing process, a configuration file records that the device supports LE. To solve the problem, I simply removed this support attribute. I haven't had a connection problem since (except when the speaker is already connected to my phone, but that is another issue) even when rebooting or logging off.

After you've paired the speaker. Turn off bluetooth with:

sudo rfkill block bluetooth

Open the file in an editor (nano/vim) as root:

/var/lib/bluetooth/<bluetooth-adapter-mac-address>/<speaker-mac-address>/info

If you don't know your bluetooth-adapter mac address or the speaker-mac-address then running sudo grep -rnw '/var/lib/bluetooth/' -e 'UE' should give you a hint. If you renamed your speaker, then replace the string 'UE' with the name.

In this file you should see the line:

SupportedTechnologies=BR/EDR;LE;

Replace it with:

SupportedTechnologies=BR/EDR;

Save the file. Make sure the speaker is turned off. Enable bluetooth Preferably, restart your computer - but restarting the bluetooth service would probably work:

sudo rfkill unblock bluetooth
sudo systemctl restart bluetooth

Now it should never connect using LE again, even on reboot & logoff. If you re-pair the device for whatever reason, then this change is lost. Give it ago, I hope it also works for anyone looking a solution to this problem...

An alternative to try and which I used before I made the change using the file above but much less efficient solution is disabling LE on the adapter using the command: sudo btmgmt le off - which had the same outcome.

You must log in to answer this question.