bluetooth can not be enabled sometimes (when booting with flight mode on being one case)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
John McAleely | ||
| | lxc-android-config (Ubuntu) |
High
|
Mathieu Trudel-Lapierre | ||
| | urfkill (Ubuntu) |
High
|
Unassigned | ||
Bug Description
The bluetooth indicator and the bluetooth page in system settings sometimes won't turn on bluetooth until after a reboot. What I expect to happen is that if bluetooth is off in the indicator/system settings and I tap the switch, the switch will go green and in a moment the bluetooth indicator will show up and bluetooth is enabled. When bluetooth is on, I expect to go into the indicator/system settings and turn the switch off, the switch will go gray and the bluetooth indicator will hide and bluetooth is disabled. I expect this to work whenever I want while the phone is on.
Sometimes, this does not work. For example, yesterday I disabled bluetooth at some point in the evening and later I went to sleep. When I woke up, I tried to turn it on via the indicator and also system settings and it wouldn't turn on. In the indicator, the switch moves to the green position briefly, then moves back to gray (the bluetooth indicator remains hidden and bluetooth is disabled). In system settings, the switch will stay green, but the bluetooth indicator remains hidden and bluetooth is disabled. If I leave system settings and come back, the the switch is now in the off position.
/var/lib/
[BLUETOOTH]
soft=false
prev-soft=false
bluetoothd is confirmed to be running before and after using the indicator and system settings when bluetooth cannot be enabled.
Workaround: reboot the phone and bluetooth will be enabled.
Note: this is not new behavior-- I'm only reporting it now (partly because I thought it was fixed for a while, but that might have been because I was rebooting a lot at the time)
$ system-image-cli -i
current build number: 194
device name: mako
channel: ubuntu-
last update: 2015-02-11 15:34:27
version version: 194
version ubuntu: 20150211.1
version device: 20150116
version custom: mako-1.1
| Jamie Strandboge (jdstrand) wrote : | #2 |
The inconsistency of behavior between the indicator and the system settings is now being tracked in bug #1421253. Removing ubuntu-
| no longer affects: | ubuntu-system-settings (Ubuntu) |
| description: | updated |
| Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in urfkill (Ubuntu): | |
| status: | New → Confirmed |
| Sebastien Bacher (seb128) wrote : | #4 |
it's easy to trigger on vivid
- enable flight mode
- restart the device
- disable flight mode
- bluetooth is still disabled and can't be enabled
| summary: |
- bluetooth can not be enabled sometimes + bluetooth can not be enabled sometimes (when booting with flight mode on + being one case) |
I'm pretty sure this has to do with the ordering of the bluetooth-touch, bluetooth (bluez) and urfkill jobs. IIRC bluetooth-touch jobs do some firmware tweaks that can't work if the device isn't available or rfkill blocked, but we also need to be very sure that the radios are off all the while flight mode is enabled and bluetooth isn't, since this is part of regulatory requirements.
Since it's probably changes in the upstart jobs and only that, I'm adding a task for lxc-android-config. Let's keep the urfkill task in case there is any work needed there, but it seems to me like the logic in urfkill is already correct.
| Changed in urfkill (Ubuntu): | |
| status: | Confirmed → Triaged |
| importance: | Undecided → High |
| Changed in lxc-android-config (Ubuntu): | |
| assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
| importance: | Undecided → High |
| status: | New → Triaged |
| Sam Bull (dreamsorcerer) wrote : | #6 |
Note, this doesn't even need flight mode, I can reproduce it 100% just by switching off Bluetooth:
Disable bluetooth.
Reboot phone.
Enable bluetooth.
This fails to enable bluetooth. If bluetooth is disabled when the phone booted, the only was to enable it is to click enable and reboot the phone.
| Jamie Strandboge (jdstrand) wrote : | #7 |
I noticed this does not seem to affect arale (at least I couldn't reproduce it), but it is easily reproducible on mako.
| Jamie Strandboge (jdstrand) wrote : | #8 |
This appears to be fixed with the new bluetooth stack:
$ system-image-cli -i
current build number: 109
device name: mako
channel: ubuntu-
| Simon Fels (morphis) wrote : | #9 |
@Jamie: really?
Will double check that on monday.
| tags: | added: bluetooth bluez5 |
| tags: |
added: after-bluez5 removed: bluez5 |
| Jamie Strandboge (jdstrand) wrote : | #10 |
@Simon: yes, I was pleasantly surprised too. I had always heard that it was a hardware issue so when I read that rc-proposed had the new bluetooth kernel stack I thought maybe they worked around the issue in some manner in the kernel. Initially after booting into r109 I used the indicator and it all appeared to work properly (like on arale). Satisfied, I went and looked at bug #1318360 again (unrelated to this but...) then I updated the radio firmware as described in https:/
I mention the updated radio firmware only because while I don't think it had anything to do with fixing this bug, because I didn't test pairing with the car prior to updating it, I'm not 100% sure it isn't needed.
| Sam Bull (dreamsorcerer) wrote : | #11 |
"All without rebooting."
You need to reboot to reproduce the issue. Disable bluetooth, then reboot. Then enable bluetooth and see if it works. The issue only occurs (for me atleast) when booting the phone with bluetooth already disabled.
| Jamie Strandboge (jdstrand) wrote : | #12 |
@Sam, that wasn't how I remembered it, but I tried as you said. Disabled bluetooth, reboot. Enable bluetooth. It worked. I then disabled and enabled again and it works.
| Sam Bull (dreamsorcerer) wrote : Re: [Bug 1421249] bluetooth can not be enabled sometimes (whenbooting with flight mode on being one case) | #13 |
That's excellent news. Looking forward to this landing in an OTA.
| Simon Fels (morphis) wrote : | #14 |
The case where we reboot with flight mode being enable is still valid. I did some further analysis on this as I stumbled upon this again during my current BlueZ 5 work and the underlaying problems goes down to the kernel.
The bluetooth driver we have on krillin isn't implemented as a module but is initialized by a subsystem it uses. It now turns out that this is bound to the WiFi driver being initialized too. If WiFi doesn't get enabled at boot time the Bluetooth driver can proceed providing a HCI device and we end up without any Bluetooth functionality.
Needs further investigation on the kernel side what we can do to work around this.
| tags: | added: krillin |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → John McAleely (john.mcaleely) |
| importance: | Undecided → High |
| status: | New → Confirmed |
| Steven Austen (ausbuscon) wrote : | #15 |
I'm on a Nexus 7 (LTE) r.23 from ubuntu-touc/ ubuntu-rtm/proposed from system-
Bluetooth does not even become discoverable - it just times out - even when I have my bluetooth keyboard scanning


Adding an ubuntu- system- settings task because of the inconsistent behavior of the switch between the indicator and system settings (the indicator seems to have the proper behavior).