Bluetooth does not coexist with WiFi

Bug #219057 reported by Greg Inozemtsev
160
This bug affects 34 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Medium
Unassigned

Bug Description

On my system bluetooth and wifi are unusable together. I have a built-in CSR-based bluetooth module in my laptop, and an Atheros wifi. Wifi transfers slow to a halt whenever there is BT traffic.

For example, if I play a music file from another machine through the network using a BT headset, only the first few seconds of the file will play until the player runs out of buffered data. No further data is downloaded. Web pages also do not download, and I even lose connection to AP from time to time.

At the same time, it looks like AFH is trying to work. If I monitor the value returned by 'hcitool afh', it changes. But this seems to have little effect on connection quality.

Is this a problem with my hardware, or the AFH implementation? Is there a way to force bluetooth to not use the channels in use by WiFi?

Revision history for this message
Greg Inozemtsev (ginozemtsev) wrote :

I have tried this with both 7.10 and 8.04. While the BT subsystem is a lot nicer in 8.04, I have the same issue. Would upgrading to the latest bluez-libs (3.30 vs 3.26 in hardy) help?

Revision history for this message
nathan (grunat) wrote :

This is an issue that will exist until the specifications of Bluetooth and Wifi become more collaperative. Unfortuntely, Bluetooth and Wifi both run on the ISM band (2.4 to 2.4835 GHz). When Wifi encounters interferance, it simply tries to resend the packet. This causes Wifi to slow to a halt as it will continue to try to resent the packet until it is successful easily cutting Wifi speeds in half or usually much more than half. When Bluetooth encounters interferance, it jumps onto another frequency and tries sending the packet again (it would perform the jump whether or not interferance was discovered on that particular frequency as it's part of the Bluetooth spec to preform frequency "hopping"). Due to the fact that this frequency "hopping" occurs at a hardware level and not software, you cannot force bluetooth to use or to not use certain channels. Unfortunately, this is hardware dependant to my knowledge.

Revision history for this message
Greg Inozemtsev (ginozemtsev) wrote :

I know Bluetooth and WiFi are in the same band. Windows drivers make this work seamlessly on the same hardware though. So it definitely can be done.

I know it's not an easy thing to implement, but there will always be people who just want things to just work. I don't expect a quick solution. Just pointing out another thing that's broken out of the box :)

Revision history for this message
Mario Limonciello (superm1) wrote :

I'm not going to deny this problem exists, but I do believe it's something outside of our immediate control in diagnosing/fixing.

Changed in bluez:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Robie Basak (racb) wrote :

I have this problem somewhat; it is mitigated for me by using a separate USB Bluetooth dongle instead of the built in one on my laptop. I then hciconfig hci0 down so that only the dongle (hci1) stays up.

Perhaps my laptop uses a single aerial for both wifi and bluetooth? If so, could the two drivers be set up with a shared lock or something? As it's wifi that has the problem, perhaps the driver could just be made to wait until bluetooth is done transmitting a frame?

Revision history for this message
Erik Lq (eriksmejl+ubuntu) wrote :

This "bug"/"behaviour" still exists and is extremly annoying.

Using a SE MW600 headset on a Samsung NC10 this behaviour started to show up a couple of weeks ago.
First it was just for a short while, but now it is consistent...
Right now the computer is running [2.6.32-26-generic #48-Ubuntu SMP] with backported (from compat-wireless-2.6.34) ath5k module (for testing purpose). The only change when using the backport is that they now supress the "noise floor calibration timeout" message in syslog....great...

So what I am experiencing is that the bluetooth module is interfering with the WiFi module when streaming audio using A2DP.
WiFi speed is decreased and at some points ceased. This goes away as soon as I disconnect the headset.

The issue is was not present a while ago (and if: not at this rate) so I am suspecting that someone updated something without telling "the other guys" (wifi vs bluetooth guys).
Issue doesn't exist in Win XP, ie hardware should be fine.

Attached output from syslog when this issue occurs.
Let me know if you need more info (and what kind of info)!

Revision history for this message
skyhard (miran-merljak-deactivatedaccount) wrote :

I have the same problem on my Acer Aspire. I'm using Ubuntu 10.04 and I also updated my wireless stack to a newer version, but the problem persists. It is VERY annoying, because WLAN and blutooth are almost unusable together. I think this is a problem that should be solved as soon as pissible. Maybe it could be added to Ubuntu's 100 paper clips project?!

Revision history for this message
vickoxy (vickoxy) wrote :

I have the same problem with lubuntu/ubuntu 11.04 on shuttle xs35gtv2 with external bluetooth dongle. Other computers with internal bluetooth adadpters have no such issues. I described my problem here:
http://ubuntuforums.org/showthread.php?t=1853104

Is there any workaround for this problem.

Revision history for this message
carrizo (c4rrizo) wrote :

I also have this problem, I'm using a 11.04 Natty installation. I would like to know if there's away I can help you to fix it.

Changed in bluez (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Rykel from Singapore (rykel98) wrote :

Somewhat related... I am running Ubuntu 12.10 on an ASUS 1215B with AMD graphics and Dual Booting with Windows 7. My Bluetooth mouse LAGS badly whenever wifi is On.... I think the wifi driver/implementation should be investigated for conflicts with Bluetooth because this does not happen in Windows 7.

Revision history for this message
Evgeny Nacu (evgeny-nacu) wrote :

WiFi disconnects every time I try to use my Bluetooth.
here is some part from dmesg:

[21437.235382] ath: phy0: Unable to reset channel, reset status -5
[21437.235414] ath: phy0: Unable to set channel
[21437.581071] ath: phy0: Could not kill baseband RX
[21437.732102] ath: phy0: Unable to reset channel, reset status -5
[21437.732152] ath: phy0: Unable to set channel
[21437.882964] ath: phy0: Unable to reset channel, reset status -5
[21437.882989] ath: phy0: Unable to set channel
[21439.474566] ath: phy0: Unable to reset channel, reset status -5
[21439.474615] ath: phy0: Unable to set channel
[21439.478175] cfg80211: Calling CRDA to update world regulatory domain
[21439.488809] cfg80211: World regulatory domain updated:
[21439.488818] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[21439.488823] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[21439.488828] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[21439.488833] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[21439.488838] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[21439.488842] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[21440.454865] wlan0: authenticate with 94:0c:6d:fe:51:b8
[21440.469040] wlan0: send auth to 94:0c:6d:fe:51:b8 (try 1/3)
[21440.669370] wlan0: send auth to 94:0c:6d:fe:51:b8 (try 2/3)
[21440.873260] wlan0: send auth to 94:0c:6d:fe:51:b8 (try 3/3)
[21441.077168] wlan0: authentication with 94:0c:6d:fe:51:b8 timed out

Revision history for this message
Donald Lhoëst (d-lhoest-y) wrote :

Hello everyone,

This bug is still present, I have Ubuntu 14.04 64bits on a Dell inspiron 14z and the wifi disconnects whenever I am streaming on my bluetooth speakers.

Revision history for this message
SecretService (moe1234512345) wrote :

I can confirm it still exists!

Annoying as fuck! And there is almost no information about this anywhere on the internet. I was lucky to google this one up, spent lots of time trying to fix this.

I can not but disagree with you nathan that this is not important, as it is quite commong that people connect bluetooth devices to their laptops.

As soon as you do this, then you can basically not use the internet anymore.

What is even more strange is that even after disabling the bluetooth, this error continues to exist. The only way to resolve it is to restart the computer.

I will try changing the channel on my router, but I doubt that will help.

I have an apple trackpad that I would like to use, and I can imagine people also having bluetooth keyboards.

Revision history for this message
luca (llucax) wrote :

Same problem for me when using the A2DP profile with a bluetooth speaker (SONY:SRS-BTS50), the wifi barely works. When using the HSP/HFP profile (less quality/mono) the wifi works decently (I didn't do any performance tests, but when using A2DP the drop in performance is noticed immediately, I can barely use a browser, intermittently).

I have a Toshiba Z830.

Revision history for this message
Kit (kmrothwell) wrote :

Just to join in here in the hope that it will be fixed, whenever I connect to a bluetooth device wifi cuts out.

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Hi!

Maybe this can be a workaround:
https://answers.launchpad.net/ubuntu/+question/239371

=====================
Try:

echo "options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1" | sudo tee /etc/modprobe.d/iwlwifi.conf > /dev/null

As one big command. Reboot to test.
=====================

I also made a change to enable A2DP in my headset. Before, when I switched to A2DP it didn't worked.

=====================
This worked for me:

1) Open /etc/bluetooth/audio.conf

gksudo gedit /etc/bluetooth/audio.conf

2) find "Enable =..." under [General] and delete Socket fron the list

[General]
Enable = ....

3) Add this line:

Disable = Socket

4) Save

5) Restart the bluetooth service

sudo service bluetooth restart

6) Restar pulseaudio for good measure.

pulseaudio -k
pulseaudio -D

7) Cross Your Fingers and try.

=====================

Now I can use my Sony SHB50 on Ubuntu with good sound (A2DP) and my WiFi is working fine.

My laptop is a Dell 3450

This is my Wifi Card:
02:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)

This is how PulseAudio detected my bluetooth device:

pacmd list-cards

    index: 2
 name: <bluez_card.94_CE_2C_F8_51_45>
 driver: <module-bluetooth-device.c>
 owner module: 24
 properties:
  device.description = "SBH50"
  device.string = "94:CE:2C:F8:51:45"
  device.api = "bluez"
  device.class = "sound"
  device.bus = "bluetooth"
  device.form_factor = "headset"
  bluez.path = "/org/bluez/542/hci0/dev_94_CE_2C_F8_51_45"
  bluez.class = "0x240404"
  bluez.name = "SBH50"
  device.icon_name = "audio-headset-bluetooth"
  device.intended_roles = "phone"
 profiles:
  hsp: Telefonía Duplex (HSP/HFP) (priority 20, available: unknown)
  a2dp: Reproducción de Alta Fidelidad (A2DP) (priority 10, available: yes)
  off: Apagado (priority 0, available: yes)
 active profile: <a2dp>
 sinks:
  bluez_sink.94_CE_2C_F8_51_45/#4: SBH50
 sources:
  bluez_sink.94_CE_2C_F8_51_45.monitor/#7: Monitor of SBH50
 ports:
  headset-output: Auriculares (priority 0, latency offset 0 usec, available: yes)
   properties:

  headset-input: Auriculares (priority 0, latency offset 0 usec, available: unknown)
   properties:

Revision history for this message
Jumpa (jumpa404) wrote :

How do I undo the effects of this command?

echo "options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1" | sudo tee /etc/modprobe.d/iwlwifi.conf > /dev/null

I tried it hoping it would help with wifi interference causing lag and stuttering in my bluetooth speakers but now I can't even connect to the speakers at all since rebooting.

Thanks!

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Hi Jumpa, just edit the file /etc/modprobe.d/iwlwifi.conf and remove de line options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1"

sudo nano /etc/modprobe.d/iwlwifi.conf

Revision history for this message
The_Legacy (es-ei6hel-n1) wrote :

Hi,
Thanks for your solution Julian Alarcon (alarconj), it worked for me.
I had the issue on all of my computers and thanks to you have been able to fix this.

Well done

Revision history for this message
Kevin Perez (kevindperezm) wrote :

I can confirm that this bug in also present in Linux Mint 17.2 (based upon Ubuntu 14.04) as early as August 25th 2015. I can also confirm that the previous workaround worked works like a charm. Seems that the weird behavior is somewhat related to the Centrino wireless adapter...

Thanks, Julian Alarcon (alarconj), sir. Thank you for share that workaround with us.

Revision history for this message
Roboload (robertas-bern) wrote :

Thank you, Julian!

My wifi problem solved just by entering your first big command.
I'm using MSI GE620 laptop with SE MW600 bt headset.

And I do confirm, Ubuntu 14.04 LTS couldn't use bt and wifi at the same time before the fix. Just as Greg posted it.

Revision history for this message
ldmdev (lucio-dimatteo) wrote :

Many thanks to alarconj!
I finally got rid of interferences between my bluetooth mouse and my portable 4g router!

Just entered

echo "options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1" | sudo tee /etc/modprobe.d/iwlwifi.conf > /dev/null

and rebooted.

I was affected by this bug running Ubuntu 15.04 with these peripherals:

Asus U36SG - Dell WM524 - ZTE MF90

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Has anybody checked if this issue is still present in Ubuntu 15.05? This version use Bluez version 5.

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Funny thing, I didn't have many hope to my workaround because in Ubuntu 15.04 because after some minutes, It failed. But now on Ubuntu 15.10, with Bluez 5, the problem still exist but my workaround works.

echo "options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1" | sudo tee /etc/modprobe.d/iwlwifi.conf > /dev/null

Revision history for this message
Pierre Réveillon (913-pierre-6nk) wrote :

Be aware that adding things that you don't understand can have unwanted results... For exemple, "power_save=0" prevents your wifi card to enter power saving mode, and could reduce your battery autonomy...

In my case (on Linux Mint 17.3), simply adding the "bt_coex_active=0" parameter in /etc/modprobe.d/iwlwifi.conf fixed the problem. See http://superuser.com/questions/924559/wifi-connection-troubles-solved-why-does-my-fix-work for more information on this parameter.

tags: added: bluez-classic
Revision history for this message
mvtlam (s-mvtlam) wrote :

It has been 8 years since this bug was reported and it still exists... Is it going to be fixed one day or are we gonna grow a community around this bug and all become part of a big family ?

Revision history for this message
ockels (ockels) wrote :

Stumbled across this bug installing 14.04.4 on my new HP 14-ac181 low-budget laptop.
First of all my wireless had unusable signal strength. After fixing it with the following code:

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get install rtlwifi-new-dkms linux-firmware rtl8723au-bt-dkms
echo "options rtl8723be ant_sel=2" | sudo tee /etc/modprobe.d/rtl8723be.conf

Wireless & BT worked.

But Wireless & BT do not coexist together. The following things happen:

- Without an AC adapter BT does not discover any device
- With BT & Wireless both enabled BT is very slow (eg: A2DP sound gets choppy and out of sync) + my wifi speeds are unusable
- With eth cable, AC adapter and wireless disabled BT works like a charm

Expected behaviour:

All interfaces should work together.

Revision history for this message
Stuart Brown (themusicman55) wrote :

Using Ubuntu 16.04 (clean install, currently fully updated) on a Dell XPS. It took me a while to uncover this problem because initially I thought it only part of the issue of getting a Microsoft Arc Touch Bluetooth Mouse to work. I succeeded in doing the latter, only to find that my WiFi had frozen. Rebooted the router, rebooted the computer, with the mouse turned off. So far, so good. Connected the mouse - works; but locks up the WiFi.

I disconnected the mouse, WiFi works immediately, no need for reboot in my case. Connected my phone (Sony Xperia Z); phone connects, WiFi freezes. Disconnected the phone, WiFi works immediately.

This is the only thread I have been able to find that deals at any length with the subject. To suggest that this is not important or of low priority is, I suggest, missing the point entirely. At least two members of my family use bluetooth keyboards with SmartPhones. Canonical has aspirations to carve out a niche in the SmartPhone market. I suggest they solve this problem pretty quickly if they want to stand any chance of doing that. I acquired the bluetooth mouse on the recommendation of my son: it took me long enough to get that to work and now I face this issue. Seriously unimpressed. Been using Ubuntu since 8.04 so not a newbie.

Revision history for this message
Mateo Salta (mateo-salta) wrote :

This also hppens on the intellect compute stick, and makes it rather unusable using only the wifi and bluetooth built in, I would say this is a critical #1 bug for using this comercialLy avaible product.

Revision history for this message
Roboload (robertas-bern) wrote :

It's kinda ridiculous... Ubuntu 16.04 LTS and still same problem. Well, it was easy to fix now, when you know the way - same way as 14.04 LTS. Thanx again to Julian Alarcon!

Still MSI GE620 laptop with SE MW600 bt headset.

Revision history for this message
Buck Evan (bukzor) wrote :

This workaround fixed this issue for me:

    echo "options iwlwifi bt_coex_active=0" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

The above instructions set a bunch of unrelated options, and also blank out any pre-existing content.

Revision history for this message
Pavel D. (pavel-dimitriev) wrote :

Hi everyone,

I had the same wifi/bluetooth interference problem. My setup is as follows:
- Ubuntu 14.04 with custom-built vanilla kernel 4.3.0
- Lenovo B50 laptop having QCA9565 / AR9565 Wireless Network Adapter (ath9k) onboard
- Linksys WRT-54GL router running DD-WRT v24-sp2 (10/10/09) mini
- Marshall Acton bluetooth speaker

Initially when I was streaming audio to the speaker, wifi degraded dramatically. After doing some research, I have successfully resolved the issue.

What I have done is:

* On my laptop:

- added
```
Enable=Source
Disable=Socket
AutoConnect=True
```
to /etc/bluetooth/audio.conf

- Added
```
options iwlwifi 11n_disable=1 bt_coex_active=1
```
to /etc/modprobe.d/iwlwifi.conf
However, since I'm not using iwlwifi, I'm not sure whether this had had any effect whatsoever.

* On my router:

- Under Wireless / Advanced Settings, I set "Bluetooth Coexistence Mode" to "Preemption"

Then I've rebooted everything just in case.

FYI, I encourage you to read through https://wireless.wiki.kernel.org/en/users/documentation/bluetooth-coexistence to find out what bluetooth coexistence is, and I wonder why everybody keeps switching it off (by setting bt_coex_active=0). On the contrary, this technique is designed to defeat interference problem.

Also, you may find nice to add "load-module module-switch-on-connect" to /etc/pulse/default.pa so that audio starts streaming to bluetooth speaker automatically when it connects (and then back to laptop speakers when it disconnects.)

Cheers,
PD.

Revision history for this message
Will Schmidt (yawngod) wrote :

This is so interesting, and such an old thread that keeps on going.

I have the exact *opposite* of this problem. On Windows 10, this:

>>"For example, if I play a music file from another machine through the network using a BT headset, only the first few seconds of the file will play until the player runs out of buffered data. No further data is downloaded. Web pages also do not download, and I even lose connection to AP from time to time."<<

is *exactly* what happens. The file buffers/downloads, the sound begins playback, and the Bluetooth signal interferes with its own download. Turning off the Bluetooth speakers instantly returns Wlan activity.

And more, amazingly, it works perfectly fine on Linux (Mint, Kali tested so far). I have to conclude at this point that this is a software problem.

Obviously I'm not looking for Win10 assistance here, but I thought it was too interesting a thread not to post in.

Revision history for this message
praveen kannan (kannanstays) wrote :

I have also same problem when wireless connection is switched on Bluetooth disconnects immediately. I can't reconnect until wifi is disconnected.

Revision history for this message
Aaahh Ahh (woohoomoo2u) wrote :

bUmP

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug looks old. Let's clean it up a little...

Users who experience this bug with the ath9k kernel driver please see bug 1746164 for more recent news.

Greg Inozemtsev: If you still experience this bug then please run 'lspci -k' and 'lsusb' on the machine and attach the output here.

Everyone else: Please report your own new bugs by running 'ubuntu-bug bluez'.

Changed in bluez (Ubuntu):
status: Confirmed → Incomplete
importance: Wishlist → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for bluez (Ubuntu) because there has been no activity for 60 days.]

Changed in bluez (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments