9

I use LXQT in Lubuntu 18.10 and I have a problem with keeping the Bluetooth-speaker connected to the laptop after logging out and in. It works fine after reboot though.

So, I have a solution that always works: rebooting - OR: reinstalling bluez:

sudo apt-get install --reinstall bluez

and that always works!

In any case, when my problem happens, the bluetooth is never blocked.

If I reboot or reinstall bluez there is no need to remove and add again the device, setting it to "Audio sink" is enough.


When this happens, after logging out and in:

  • The speaker is listed by blueman-manager, setting to 'Audio Sink' brings the error Protocol Not available.

enter image description here

In terminal:

~$ blueman-manager
_________
Load (/usr/lib/python3/dist-packages/blueman/main/PluginManager.py:60)
['PulseAudioProfile', 'Services'] 
_________
__load_plugin (/usr/lib/python3/dist-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.manager.PulseAudioProfile.PulseAudioProfile'> 
_________
pa_context_event (/usr/lib/python3/dist-packages/blueman/main/PulseAudioUtils.py:341)
1 
_________
__load_plugin (/usr/lib/python3/dist-packages/blueman/main/PluginManager.py:133)
loading <class 'blueman.plugins.manager.Services.Services'> 
blueman-manager version 2.0.5 starting
Stale PID, overwriting
_________
pa_context_event (/usr/lib/python3/dist-packages/blueman/main/PulseAudioUtils.py:341)
2 
_________
on_bluez_name_owner_changed (/usr/bin/blueman-manager:96)
org.bluez owner changed to  :1.238 
_________
get_interface_version (/usr/lib/python3/dist-packages/blueman/bluez/BlueZInterface.py:13)
Detected BlueZ 5 
_________
SetAdapter (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:271)

_________
on_adapter_changed (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerToolbar.py:83)
toolbar adapter /org/bluez/hci0 
_________
__init__ (/usr/lib/python3/dist-packages/blueman/main/Device.py:26)
caching initial properties 
_________
add_device (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:317)
adding new device 
_________
do_cache (/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py:496)
Caching new device C0:28:8D:81:64:5A 
_________
row_update_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:264)
row update event Fake False 
_________
row_update_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:264)
row update event Trusted 0 
_________
row_update_event (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceList.py:264)
row update event Paired 1 
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
UE BOOM 2 
_________
pa_context_event (/usr/lib/python3/dist-packages/blueman/main/PulseAudioUtils.py:341)
3 
_________
pa_context_event (/usr/lib/python3/dist-packages/blueman/main/PulseAudioUtils.py:341)
4 
_________
on_pa_ready (/usr/lib/python3/dist-packages/blueman/plugins/manager/PulseAudioProfile.py:29)
connected 
_________
<lambda> (/usr/lib/python3/dist-packages/blueman/main/PulseAudioUtils.py:353)
1 
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
UE BOOM 2 
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
UE BOOM 2 
_________
set_op (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:85)
op: regenerating instance <ManagerDeviceMenu.ManagerDeviceMenu object at 0x7f8fd0e05e10 (blueman+gui+manager+ManagerDeviceMenu+ManagerDeviceMenu at 0x1efcb60)> 
_________
set_op (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:85)
op: regenerating instance <ManagerDeviceMenu.ManagerDeviceMenu object at 0x7f8fd0e0eee8 (blueman+gui+manager+ManagerDeviceMenu+ManagerDeviceMenu at 0x1efce40)> 
_________
unset_op (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:99)
op: regenerating instance <ManagerDeviceMenu.ManagerDeviceMenu object at 0x7f8fd0e05e10 (blueman+gui+manager+ManagerDeviceMenu+ManagerDeviceMenu at 0x1efcb60)> 
_________
Generate (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:173)
UE BOOM 2 
_________
unset_op (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:99)
op: regenerating instance <ManagerDeviceMenu.ManagerDeviceMenu object at 0x7f8fd0e0eee8 (blueman+gui+manager+ManagerDeviceMenu+ManagerDeviceMenu at 0x1efce40)> 
_________
fail (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:124)
fail org.freedesktop.DBus.Python.blueman.bluez.errors.DBusFailedError: blueman.bluez.errors.DBusFailedError: Protocol not available

/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerProgressbar.py:165: Warning: Source ID 697 was not found when attempting to remove it
  GObject.source_remove(self.gsource)

and

~$ pactl load-module module-bluetooth-discover
Failure: Module initialization failed

because it was already loaded.

Removing the device and trying to add it again: it is not found at all!


Which aspect in the normal operation of bluez - one that is available at system startup as well as by reinstalling the package - could be lost by restarting the session? - And how to avoid that loss?


UPDATE/EDIT by the OP:

[I am the OP. At some point I have deleted my account and then I came back with the same id.] I want to add that this is a Lubuntu-LXQt-specific problem. I have seen this problem in many Ubuntu and Ubuntu-based distros before 18.04, but in none since 18.x. Since 18.04 it is fixed excepting in Lubuntu-LXQt.

Details of the bluetooth adapter:

lsusb | grep Bluetooth
Bus 001 Device 013: ID 0489:e00f Foxconn / Hon Hai Foxconn T77H114 BCM2070 [Single-Chip Bluetooth 2.1 + EDR Adapter]
5
  • 2
    You could add the lxqt tag if you wish. – DK Bose Oct 29 '18 at 14:07
  • @DKBose - I will update the question too. – user47206 Oct 29 '18 at 14:10
  • I have decided to ask for a specific solution to the post-logout-login bluez error (while initially I was just trying to understand what happens when bluez is reinstalled or the pc restarted). – user47206 Nov 5 '18 at 17:01
  • the same problem affects the same machine in Lubuntu/LXQt 19.10 (I'm the OP) – cipricus Jan 14 '20 at 9:20
  • I'm the comeback OP: lsusb | grep Bluetooth Bus 001 Device 013: ID 0489:e00f Foxconn / Hon Hai Foxconn T77H114 BCM2070 [Single-Chip Bluetooth 2.1 + EDR Adapter] – cipricus Jan 14 '20 at 10:21
0

It could be unrelated to your strange issue but there have been bugs in bluez for a long time: [Bug 1499858] Re: bluetoothd[650]: Failed to obtain handles for "Service Changed" characteristic

The latest posting this morning reads:

Hello again,

I compiled bluez-5.46 & installed it on ubuntu 16.04 and this has taken care of all of the "Not enough free handles to register service" errors and also "Failed to obtain handles for "Service Changed" characteristic" errors and bluetooth is working better than it ever has, for me anyway. So for me this is solved, I suppose.

Don't know if this will help anyone?? But I hope so!

Cheers,

Singtoh


Consider installing tlp radio device wizard. It will:

  • Enable or disable integrated wifi, bluetooth or wwan devices upon system startup and shutdown
  • Restore radio device state on system startup (from previous shutdown).
  • Radio device wizard: switch radios upon network connect/disconnect and dock/undock
  • Disable Wake On LAN
  • Integrated WWAN and bluetooth state is restored after suspend/hibernate

Source: Welcome to TLP!

7
  • 1
    Use journalctl -b | grep -i blue and if you see the error messages listed in the bug report then it may resolve your issue. You might have to compile version 5.46 as the user did. Not sure at this stage if you are effected or not. If you don't have the error messages let me know and I'll delete the answer. Thank you. – WinEunuuchs2Unix Nov 9 '18 at 23:46
  • 1
    Result of the above command gives something different (here) than the bug report error, namely the error I mention in the question (Protocol not available), not Failed to obtain handles. So I think it is not that bug. And even if it were: the initial bug report involves bluez version 5.35 in ubuntu 15.10. I guess the installation of 5.46 is an upgrade in those cases, while for me it would be a downgrade. – user47206 Nov 12 '18 at 8:28
  • 1
    - Considering tlp: Enable or disable integrated wifi, bluetooth or wwan devices upon system startup and shutdown: my problem is with log-out/in, while restarting simply fixes the problem. If I don't want to restart, I can re-install bluez rather easily as indicated in the question. I find that simpler than messing with tools that are obscure to me and of doubtful usefulness. – user47206 Nov 12 '18 at 8:33
  • 1
    @cipricus Granted your situation is very unique. tlp also handles wifi/bluetooth during suspend/resume which involves logging in. There is a chance it will override your login issues with it's own framework. But no guarantee. – WinEunuuchs2Unix Nov 12 '18 at 15:37
  • 1
    Simply installing tlp and restarting the computer doesn't fix the problem: that is, after reboot it is fixed (as expected), but if I log out and back in the problem is there (as detailed in the question).. – user47206 Nov 12 '18 at 17:45
0

After trying a myriad of different commands, and modules, and etc, what ended up working for me was this:

$ 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, do 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 that worked for me 10 minutes ago.
But OK, at least it works now :)
It's not immediately intuitive that it would be related to pulseaudio at all. Welcome to linux weirdness :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy