Bug 692017

Summary: Bluetooth works just sometimes.
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dwmw2, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, marcel, mhlavink, plautrba
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-26 14:15:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log/messages
none
/var/log/messages
none
/var/log/messages
none
colleague's /var/log/messages none

Description Vít Ondruch 2011-03-30 08:06:36 UTC
Created attachment 488679 [details]
/var/log/messages

Description of problem:
The Bluetooth works just every other restart.


Version-Release number of selected component (if applicable):
$ rpm -q bluez
bluez-4.87-2.fc15.x86_64

Additional info:
It appear it might be Kernel bug, however I hope you have better inside than me.

If the BT works, I can typically see the "Mar 30 08:54:12 dhcp-25-40 kernel: [   31.037619] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked" message in my log, but if it doesn't work, the message is not present.

Comment 1 Bastien Nocera 2011-03-31 12:36:36 UTC
I believe that was a regression in D-Bus caused by systemd, where bluetoothd wouldn't be activated.

Please test with an updated dbus, and if it fails to work, I'll move this bug to the kernel.

Comment 2 Vít Ondruch 2011-04-01 10:03:12 UTC
After several restarts, it seems it works.

Comment 3 Vít Ondruch 2011-04-05 13:02:04 UTC
I am not sure what is the relation with systemd. But it appeared to work correctly when I was using systemd-20-1.fc15.x86_64. Now I have updated to the most recent systemd-22-1.fc15.x86_64 and it again works just every other restart :/

Comment 4 Vít Ondruch 2011-05-04 06:49:14 UTC
Created attachment 496710 [details]
/var/log/messages

Unfortunately this is still an issue. Please see attached /var/log/messages with several consecutive reboots.

Comment 5 Bastien Nocera 2011-05-06 17:22:46 UTC
Launching:
"systemctl enable bluetooth.service"
as root should fix it.

The problem was in the upgrade scriptlets in the package. Thanks to Bill for fixing this.

Comment 6 Bastien Nocera 2011-05-06 17:23:04 UTC

*** This bug has been marked as a duplicate of bug 694519 ***

Comment 7 Vít Ondruch 2011-05-09 06:19:01 UTC
Created attachment 497710 [details]
/var/log/messages

As you can see, I have commented previously on #694519, so I am aware that there was and issues and I have definitely enabled the service:

$ systemctl status bluetooth.service
bluetooth.service - Bluetooth Manager
	  Loaded: loaded (/lib/systemd/system/bluetooth.service)
	  Active: active (running) since Fri, 06 May 2011 10:59:40 +0200; 2 days ago
	Main PID: 1012 (bluetoothd)
	  CGroup: name=systemd:/system/bluetooth.service
		  └ 1012 /usr/sbin/bluetoothd -n

But still, it works just every second reboot. Please see attached log. You can clearly see that the bluetooth is activated around 15 seconds from start of the boot, but unfortunately just every second boot.

$ rpm -q bluez
bluez-4.87-5.fc15.x86_64

Comment 8 Bastien Nocera 2011-05-09 12:15:26 UTC
A bit more details as to what I'm supposed to be reading from those logs would certainly help.

Comment 9 Vít Ondruch 2011-05-09 12:58:38 UTC
For example this line can tell you how many times I have restarted:

$ cat /var/log/messages | grep 'kernel: imklog 5.7.9, log source = /proc/kmsg started.' | wc -l
7


And the following line tells you that only 4 times the Bluetooth driver was loaded:

$ cat /var/log/messages | grep 'Bluetooth: Generic Bluetooth USB driver ver 0.6' | wc -l
4


I am not sure what I should look for in the log, I just know that the log should contain every time the same lines and that is not true.

Comment 10 Bastien Nocera 2011-05-09 13:36:37 UTC
(In reply to comment #9)
> For example this line can tell you how many times I have restarted:
> 
> $ cat /var/log/messages | grep 'kernel: imklog 5.7.9, log source = /proc/kmsg
> started.' | wc -l
> 7
> 
> 
> And the following line tells you that only 4 times the Bluetooth driver was
> loaded:
> 
> $ cat /var/log/messages | grep 'Bluetooth: Generic Bluetooth USB driver ver
> 0.6' | wc -l
> 4

Except that this isn't caused by bluetoothd not starting, but it's the cause of bluetoothd not starting. Kernel goes first, then bluetoothd. If the adapter isn't detected by the kernel, then bluetoothd has no reasons to start because you don't have Bluetooth.

> I am not sure what I should look for in the log, I just know that the log
> should contain every time the same lines and that is not true.

Looks to me that the thinkpad_acpi module isn't popping up the Bluetooth interface:
May  9 08:04:10 dhcp-25-40 kernel: [   14.631438] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked

If the radio is blocked, then bluetoothd obviously won't be started. Did you disable Bluetooth at any point?

Comment 11 Vít Ondruch 2011-05-10 06:03:16 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > For example this line can tell you how many times I have restarted:
> > 
> > $ cat /var/log/messages | grep 'kernel: imklog 5.7.9, log source = /proc/kmsg
> > started.' | wc -l
> > 7
> > 
> > 
> > And the following line tells you that only 4 times the Bluetooth driver was
> > loaded:
> > 
> > $ cat /var/log/messages | grep 'Bluetooth: Generic Bluetooth USB driver ver
> > 0.6' | wc -l
> > 4
> 
> Except that this isn't caused by bluetoothd not starting, but it's the cause of
> bluetoothd not starting. Kernel goes first, then bluetoothd. If the adapter
> isn't detected by the kernel, then bluetoothd has no reasons to start because
> you don't have Bluetooth.

I have never said that it is because bluetoothd not starting. I stated from the beginning that my bluetooth works every other restart and I would appreciate any help.

> 
> > I am not sure what I should look for in the log, I just know that the log
> > should contain every time the same lines and that is not true.
> 
> Looks to me that the thinkpad_acpi module isn't popping up the Bluetooth
> interface:
> May  9 08:04:10 dhcp-25-40 kernel: [   14.631438] thinkpad_acpi: rfkill switch
> tpacpi_bluetooth_sw: radio is blocked
> 
> If the radio is blocked, then bluetoothd obviously won't be started. Did you
> disable Bluetooth at any point?

In what point? The only thing I was doing is boot into GDM or may be log into gnome and than restart. No disabling, enabling, configuring, not touching the Radio switch of my ThinkPad.

Comment 12 Vít Ondruch 2011-05-10 08:27:37 UTC
Created attachment 497970 [details]
colleague's /var/log/messages

It is interesting. No I have checked with my colleague, who has the same hardware and he has no issues. What I have found is that:

1) He has newer BIOS than me
2) His Bluetooth hardware is detected among other USB devices, why my USB is detected later and only when it works at the end.
3) My log always states "thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked" when bluetooth works, but his states "thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked". When bluetooth doesn't work, this line does not appear in my log.

Please see attached cllleague's log if you can find some clue ...

Comment 13 Vít Ondruch 2011-05-10 08:28:42 UTC
Please note that this was never issue for F14 I was using previously, also note that the thinkpad_acpi kernel module is of the same version for F14 and F15.

Comment 14 Bastien Nocera 2011-05-10 09:17:42 UTC
I don't have any ideas what the thinkpad ACPI module might be doing, so I'll punt this to the kernel. I don't think that bluetoothd has anything to do with this, as if the hci0 device is available and present in the kernel, bluetoothd will start as expected.

Comment 15 Chuck Ebbert 2011-05-11 00:05:31 UTC
(In reply to comment #12)
> It is interesting. No I have checked with my colleague, who has the same
> hardware and he has no issues. What I have found is that:
> 
> 1) He has newer BIOS than me

The first thing to try is updating your BIOS then.

Comment 16 Vít Ondruch 2011-05-11 10:37:27 UTC
It worked fine for the F14. So while the update of BIOS might solve the issue for me, it solves nothing for other users. I do not accept this as a solution, as long as there is no understanding where the problem really is.

Comment 17 Michal Hlavinka 2011-05-28 16:19:48 UTC
I'm not sure if I see the same issue, but for me bluetooth is not working in Fedora 15. In Fedora 14 it was working fine. bluetoothd and stuff is not starting because I don't have any hciX device. I see this problem with Fedora 15 kernel 2.6.38.6, but because Fedora 14 was working I've tried older kernels.

kernel-2.6.35.13-91.fc14.x86_64 - works
kernel-2.6.37-2.fc15.x86_64 - works
kernel-2.6.38-1.fc15.x86_64 - broken
kernel-2.6.38.6-27.fc15.x86_64 - broken
kernel-2.6.38.7-30.fc15.x86_64 - broken
kernel-2.6.39-?.fc16.x86_64 - broken

I've found some discussion on lkml, but without any solution:
http://www.spinics.net/lists/linux-bluetooth/msg10772.html

but my problem (on Acer laptop) can be related to 
https://bugzilla.kernel.org/show_bug.cgi?id=31002

Comment 18 Michal Hlavinka 2011-05-28 16:32:16 UTC
> but my problem (on Acer laptop) can be related to 
> https://bugzilla.kernel.org/show_bug.cgi?id=31002

yes, this is the problem I see. I've tried to use:

echo 1 >/sys/devices/platform/acer-wmi/rfkill/rfkill5/state

and it is working now. I just don't know if this bugzilla is correct or if I should file a new one.

Comment 19 Vít Ondruch 2011-06-07 12:28:18 UTC
Today I have installed updated kernel [1] and after several updates, bluetooth was always on. Not sure if there was some which could influence the BT. Can sombeody confirm? I will continue to monitor this issue for a few days.

[1] https://admin.fedoraproject.org/updates/F15/FEDORA-2011-7823

Comment 20 Josh Boyer 2011-09-26 14:15:59 UTC
This seems fixed per comment #19.  If that is not the case, please reopen.