Bug 692017 - Bluetooth works just sometimes.
Bluetooth works just sometimes.
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-30 04:06 EDT by Vít Ondruch
Modified: 2011-09-26 10:15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-26 10:15:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
/var/log/messages (2.05 MB, text/plain)
2011-03-30 04:06 EDT, Vít Ondruch
no flags Details
/var/log/messages (590.68 KB, text/plain)
2011-05-04 02:49 EDT, Vít Ondruch
no flags Details
/var/log/messages (696.08 KB, text/plain)
2011-05-09 02:19 EDT, Vít Ondruch
no flags Details
colleague's /var/log/messages (94.60 KB, text/plain)
2011-05-10 04:27 EDT, Vít Ondruch
no flags Details

  None (edit)
Description Vít Ondruch 2011-03-30 04:06:36 EDT
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 08:36:36 EDT
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 06:03:12 EDT
After several restarts, it seems it works.
Comment 3 Vít Ondruch 2011-04-05 09:02:04 EDT
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 02:49:14 EDT
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 13:22:46 EDT
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 13:23:04 EDT

*** This bug has been marked as a duplicate of bug 694519 ***
Comment 7 Vít Ondruch 2011-05-09 02:19:01 EDT
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 08:15:26 EDT
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 08:58:38 EDT
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 09:36:37 EDT
(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 02:03:16 EDT
(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 04:27:37 EDT
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 04:28:42 EDT
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 05:17:42 EDT
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-10 20:05:31 EDT
(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 06:37:27 EDT
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 12:19:48 EDT
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 12:32:16 EDT
> 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 08:28:18 EDT
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 10:15:59 EDT
This seems fixed per comment #19.  If that is not the case, please reopen.

Note You need to log in before you can comment on or make changes to this bug.