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?

  • 1
    You could add the lxqt tag if you wish. – DK Bose Oct 29 at 14:07
  • @DKBose - I will update the question too. – cipricus Oct 29 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). – cipricus Nov 5 at 17:01

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!

  • Could you me more specific as to where my problem is related to the link posted? And I already have the latest 5.50 in 18.10. – cipricus Nov 9 at 14:19
  • 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 at 23:46
  • 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. – cipricus Nov 12 at 8:28
  • - 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. – cipricus Nov 12 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 at 15:37

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.