Bug 337193 - With latest update BlueDevil stopped to recognize BT adapter.
Summary: With latest update BlueDevil stopped to recognize BT adapter.
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Unclassified
Component: bluetooth (show other bugs)
Version: 4.13.2
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-07 16:17 UTC by S.Trzmiel
Modified: 2014-12-13 12:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
libbluedevil-remove-default-power-on.patch (920 bytes, patch)
2014-12-13 08:24 UTC, fademind
Details
bluedevil-1:2.0-1.src-with-FIX.tar.gz (2.23 KB, application/gzip)
2014-12-13 12:15 UTC, fademind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S.Trzmiel 2014-07-07 16:17:36 UTC
Bluedevil/libbluedevil update  to 2.0.0-0.13.36f0438agit20140630 / 2.0-0.8.rc1 (rhbz #1114397)
caused made bluedevill stop recognizing bluetooth adapter on Dell Vostro (Intel Centrino Wireless-N 2230 + BT combo card). 


Reproducible: Always

Steps to Reproduce:
1. update bluedevil, logout/login
2. attempt to perform any action on bluetooth (turn it off/on, connect device)

Actual Results:  
Applet icon in system tray is greyed out, when clicked, displays message "no adapters found"


Expected Results:  
Applet shows usual menu with options and paired devices.

Software: Fedora 20 / KDE 4.13.2

Bluetooth stack:
bluez-libs-5.18-1.fc20.x86_64
bluez-5.18-1.fc20.x86_64

Rollback to previous version: 
 - bluedevil-2.0.0-0.11.rc1.fc20
 - libbluedevil-2.0-0.6.rc1.fc20

restores expected funcionality.

No bluez/bluedevil crash indicated in logs
Snippet from logs with BT not-working;
=============================
[...]
lip 03 22:16:14 xeno kernel: Bluetooth: Core ver 2.19
lip 03 22:16:14 xeno kernel: NET: Registered protocol family 31
lip 03 22:16:14 xeno kernel: Bluetooth: HCI device and connection manager initialized
lip 03 22:16:14 xeno kernel: Bluetooth: HCI socket layer initialized
lip 03 22:16:14 xeno kernel: Bluetooth: L2CAP socket layer initialized
lip 03 22:16:14 xeno kernel: Bluetooth: SCO socket layer initialized
lip 03 22:16:14 xeno kernel: microcode: CPU0 sig=0x306a9, pf=0x10, revision=0x15
lip 03 22:16:14 xeno kernel: ACPI Warning: SystemIO range 0x0000000000005040-0x000000000000505f conflicts with OpRegion 0x0000000000005040-0x000000000000504f (\_SB_.PCI0.SBUS.SMBI) (20140214
lip 03 22:16:14 xeno kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
lip 03 22:16:14 xeno kernel: usbcore: registered new interface driver btusb
[...]
lip 03 22:16:15 xeno bluetoothd[985]: Bluetooth daemon 5.18
[...]
lip 03 22:16:16 xeno bluetoothd[985]: Starting SDP server
lip 03 22:16:16 xeno kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
lip 03 22:16:16 xeno kernel: Bluetooth: BNEP filters: protocol multicast
lip 03 22:16:16 xeno bluetoothd[985]: Bluetooth management interface 1.5 initialized
lip 03 22:16:16 xeno kernel: Bluetooth: BNEP socket layer initialized
lip 03 22:16:16 xeno systemd[1]: Started RealtimeKit Scheduling Policy Service.
lip 03 22:16:16 xeno systemd[1]: Starting Bluetooth.
lip 03 22:16:16 xeno systemd[1]: Reached target Bluetooth.
[...]
=============================================================
no other entry for bluetooth
Comment 1 Rex Dieter 2014-07-07 17:49:00 UTC
I can confirm this too with latest libbluedevil/bluedevil master branch code as of today.

In short, on each boot, I have no bluedevil systray applet, and the bluetooth adapter is reported as not powered in:
systemsettings->bluetooth->adapters
Once I explicitly check the "Powered" checkbox, then it starts working, and bluedevil applet appears.

I believe this symptom stems from this commit:
https://projects.kde.org/projects/playground/libs/libbluedevil/repository/revisions/c76d6e50ba6466403457371ab8416b0600af4a77

and related bug:
https://bugs.kde.org/show_bug.cgi?id=329411
Comment 2 fademind 2014-12-11 11:30:33 UTC
OS: Arch Linux x64
https://bugs.archlinux.org/task/43074

After install updates:
* bluedevil-1:2.0-1
* libbluedevil-1:2.0-1
and reboot Bluetooth applet not working anymore, device is not recognized.

After revert changes = downgrade to:
* bluedevil-1:2.0rc1-2
* libbluedevil-1:2.0rc1-2
and reboot Bluetooth applet working fine, device recognized.

service Status:

sudo systemctl status bluetooth -l
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since czw 2014-12-11 05:27:50 CET; 54min ago
Docs: man:bluetoothd(8)
Main PID: 753 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─753 /usr/lib/bluetooth/bluetoothd --noplugin=sap

gru 11 05:27:50 arch bluetoothd[753]: Bluetooth daemon 5.25
gru 11 05:27:50 arch bluetoothd[753]: Starting SDP server
gru 11 05:27:50 arch bluetoothd[753]: Excluding (cli) sap
gru 11 05:27:50 arch bluetoothd[753]: Bluetooth management interface 1.7 initialized
gru 11 05:27:53 arch bluetoothd[753]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSource
gru 11 05:27:53 arch bluetoothd[753]: Endpoint registered: sender=:1.31 path=/MediaEndpoint/A2DPSink

pacman -Q |grep bluez

bluez 5.25-2
bluez-firmware 1.2-8
bluez-libs 5.25-2
bluez-plugins 5.25-2
bluez-utils 5.25-2

Adapter info:

Adapter info:

Bus 001 Device 003: ID 13d3:3362 IMC Networks 
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
bMaxPacketSize0 64
idVendor 0x13d3 IMC Networks
idProduct 0x3362 
bcdDevice 0.02
iManufacturer 1 Atheros Communications
iProduct 2 Bluetooth USB Host Controller
iSerial 3 Alaska Day 2006
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 177
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4 BT HCI
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0009 1x 9 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0011 1x 17 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0019 1x 25 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0019 1x 25 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 2
bInterfaceClass 224 Wireless
bInterfaceSubClass 1 Radio Frequency
bInterfaceProtocol 1 Bluetooth
iInterface 0 
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0031 1x 49 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0031 1x 49 bytes
bInterval 1
Device Status: 0x0001
Self Powered
Comment 3 David Rosca 2014-12-12 22:31:34 UTC
(In reply to fademind from comment #2)
> OS: Arch Linux x64
> https://bugs.archlinux.org/task/43074
> 
> After install updates:
> * bluedevil-1:2.0-1
> * libbluedevil-1:2.0-1
> and reboot Bluetooth applet not working anymore, device is not recognized.
> 
> After revert changes = downgrade to:
> * bluedevil-1:2.0rc1-2
> * libbluedevil-1:2.0rc1-2
> and reboot Bluetooth applet working fine, device recognized.
> 

Can you please check from System Settings -> Bluetooth -> Adapters if the adapter is recognized? And if it is powered off, try to power it on.
Comment 4 fademind 2014-12-13 08:24:29 UTC
Created attachment 89950 [details]
libbluedevil-remove-default-power-on.patch

commit c76d6e50ba6466403457371ab8416b0600af4a77
Author: Àlex Fiestas <afiestas@kde.org>
Date:   Sun Mar 9 04:04:11 2014 +0100

    Do not set the Adapter back to powered
    
    This seems to be some code back from the port, an
    attemp to save the state.
    
    Imho the library should not do that but rather an external
    entity such the bluedevil daemon.
    
    BUG:329411
Comment 5 fademind 2014-12-13 08:28:15 UTC
@David Rosca 
With installed libbluedevil-1:2.0-1 KDE Bluetooth applet not found any device.
I've got working patch. It was found by Philip Muller (philm). 

tl;dr:

After install 2.0 Final (without patch) and reboot Bluetooth applet (in system settings KDE) not recognized any adapter, tray icon BT is not showed. I can't enabling adapter, when it is not showed anywhere except lsusb and bluetooth service.

After applied the patch, install updated version and reboot, adapter working good and it is powered.

Cheers
Comment 6 David Rosca 2014-12-13 10:59:10 UTC
This patch will fix your issue, but it is not completely correct.
Can you please try patch from bug #341546 ?
Comment 7 fademind 2014-12-13 12:15:50 UTC
Created attachment 89954 [details]
bluedevil-1:2.0-1.src-with-FIX.tar.gz

PKGBUILD and save-and-restore-adapters-state-in-kded-module.patch file.
Comment 8 fademind 2014-12-13 12:17:08 UTC
@David Rosca 

I revert to default libbluedevil 1:2.0-1 version without libbluedevil-remove-default-power-on.patch and I installed bluedevil1:2.0-1 with save-and-restore-adapters-state-in-kded-module.patch from  bug #341546 and I rebooted.

Now is ok. Adapter is recognized and usable.

Cheers
Comment 9 David Rosca 2014-12-13 12:23:36 UTC
Git commit ff6ae6022286e118e98efd69ba1833f2be2e4842 by David Rosca.
Committed on 13/12/2014 at 12:20.
Pushed by drosca into branch 'master'.

Bluedevil daemon: Save and restore adapters state

Fixes issue that some adapters were always powered off
on startup.

M  +55   -0    src/daemon/kded/BlueDevilDaemon.cpp
M  +6    -0    src/daemon/kded/BlueDevilDaemon.h

http://commits.kde.org/bluedevil/ff6ae6022286e118e98efd69ba1833f2be2e4842