I'm using Ubuntu 16.10 with Unity and KDE Plasma installed. I installed Ubuntu 16.04 (from the Dell recovery image of my XPS 13 9360 Developer Edition), upgraded to 16.10 and installed kubuntu-desktop
.
On my login screen (both sddm and lightdm), my bluetooth mouse is working. But after logging in with Plasma, my bluetooth device stops working when Bluedevil is installed. The bluetooth applet says bluetooth is off-line and the checkbox is grayed out.
The power on
command of bluetoothctl
gives
Failed to set power on: org.bluez.Error.Failed
After many many hours of experimenting, I found out bluedevil is part of the problem. After sudo apt remove bluedevil
and a reboot, everything is working fine (apart from the missing bluetooth applet of course).
Here is a tail of my syslog, just after logging in using KDE Plasma:
Apr 1 22:41:27 stephan-XPS-13-9360 bluetoothd[950]: Starting SDP server
Apr 1 22:41:28 stephan-XPS-13-9360 bluetoothd[950]: Bluetooth management interface 1.13 initialized
Apr 1 22:41:28 stephan-XPS-13-9360 bluetoothd[950]: Failed to obtain handles for "Service Changed" characteristic
Apr 1 22:41:28 stephan-XPS-13-9360 bluetoothd[950]: Sap driver initialization failed.
Apr 1 22:41:28 stephan-XPS-13-9360 bluetoothd[950]: sap-server: Operation not permitted (1)
Apr 1 22:41:28 stephan-XPS-13-9360 NetworkManager[942]: <info> [1491079288.2767] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-bluetooth.so)
Apr 1 22:41:28 stephan-XPS-13-9360 NetworkManager[942]: <info> [1491079288.2915] bluez: use BlueZ version 5
Apr 1 22:41:29 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.66 path=/MediaEndpoint/A2DPSource
Apr 1 22:41:30 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.66 path=/MediaEndpoint/A2DPSink
Apr 1 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: GATT service objects disabled
Apr 1 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
Apr 1 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: message repeated 8 times: [ bt_uhid_send: Invalid argument (22)]
Apr 1 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.96 path=/MediaEndpoint/A2DPSource
Apr 1 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.96 path=/MediaEndpoint/A2DPSink
Apr 1 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Apr 1 22:41:58 stephan-XPS-13-9360 blueproximity[2416]: started.
Apr 1 22:41:58 stephan-XPS-13-9360 dbus-daemon[2062]: Activating via systemd: service name='org.bluez.obex' unit='dbus-org.bluez.obex.service'
Apr 1 22:41:58 stephan-XPS-13-9360 dbus-daemon[2062]: Successfully activated service 'org.bluez.obex'
Apr 1 22:42:13 stephan-XPS-13-9360 bluetoothd[950]: Endpoint unregistered: sender=:1.66 path=/MediaEndpoint/A2DPSource
Apr 1 22:42:13 stephan-XPS-13-9360 bluetoothd[950]: Endpoint unregistered: sender=:1.66 path=/MediaEndpoint/A2DPSink
and
sudo systemctl status dbus-org.bluez.service :
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since za 2017-04-01 22:41:28 CEST; 1min 45s ago
Docs: man:bluetoothd(8)
Main PID: 950 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─950 /usr/lib/bluetooth/bluetoothd
apr 01 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
apr 01 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
apr 01 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
apr 01 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
apr 01 22:41:46 stephan-XPS-13-9360 bluetoothd[950]: bt_uhid_send: Invalid argument (22)
apr 01 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.96 path=/MediaEndpoint/A2DPSource
apr 01 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: Endpoint registered: sender=:1.96 path=/MediaEndpoint/A2DPSink
apr 01 22:41:55 stephan-XPS-13-9360 bluetoothd[950]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
apr 01 22:42:13 stephan-XPS-13-9360 bluetoothd[950]: Endpoint unregistered: sender=:1.66 path=/MediaEndpoint/A2DPSource
apr 01 22:42:13 stephan-XPS-13-9360 bluetoothd[950]: Endpoint unregistered: sender=:1.66 path=/MediaEndpoint/A2DPSink
How can I find out why power management kills my bluetooth device (and fix this)?
Update: I installed blueman
as an alternative manager, but
I found out that just installing blueman 'fixes' the problem.
Update 2: Blueman only temporarily fixed the problem. Disabling power management solves the problem now, but that's just a workaround. Still looking for a solution and an explanation why this problem doesn't occur on Unity.
I've disabled TLP and this solved the problem. To disable TLP, set
TLP_ENABLE=0
in/etc/default/tlp
.It solved two other problems as well: