[ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio and network skip on Wifi activity)

Bug #1746164 reported by PeterPall
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

By default BT audio works fine on Ubuntu - if there is no WiFi active: Both work on the same frequency range, 2 WiFi channel is about 20 Bluetooth Channels wide and every time a WiFi package is sent bluetooth risks a packet loss.

Creating a file named /etc/modprobe.d/bluetooth-audio.conf with the following content:

options ath9k btcoex_enable=1 bt_ant_diversity=1

resolves the problem and drastically increases bluetooth throughput for all other use cases (bluetooth networking that doesn't drop every time the WiFi probes something, lower latency Bluetooth HIDs.

We should ship things in a way that they work out-of-the-box => I am all for providing this file with Ubuntu, possibly with Bluez.

In the case of my laptop btcoex_enable=1 would already do the trick.

Technical background:
 - https://wireless.wiki.kernel.org/en/users/drivers/ath9k/btcoex
 - https://wiki.freebsd.org/dev/ath_hal(4)/AntennaDiversity

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: bluez 5.46-0ubuntu4
Uname: Linux 4.15.0-041500rc9-lowlatency x86_64
ApportVersion: 2.20.8-0ubuntu6
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Jan 30 06:40:12 2018
EcryptfsInUse: Yes
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: Acer Aspire S7-391
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.15.0-041500rc9-lowlatency root=UUID=6d0fd0ad-9048-4fdb-881a-eba6d6d13c3b ro rootflags=subvol=@ acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable nmi_watchdog=0 quiet splash acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable video=vesafb:ywrap,mtrr=3 nmi_watchdog=0 vt.handoff=1
SourcePackage: bluez
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/16/2012
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V2.09
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Storm
dmi.board.vendor: Acer
dmi.board.version: V2.09
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: V2.09
dmi.modalias: dmi:bvnInsydeCorp.:bvrV2.09:bd11/16/2012:svnAcer:pnAspireS7-391:pvrV2.09:rvnAcer:rnStorm:rvrV2.09:cvnAcer:ct10:cvrV2.09:
dmi.product.family: ChiefRiver System
dmi.product.name: Aspire S7-391
dmi.product.version: V2.09
dmi.sys.vendor: Acer
hciconfig:
 hci0: Type: Primary Bus: USB
  BD Address: 68:94:23:49:1B:BC ACL MTU: 1022:8 SCO MTU: 183:5
  UP RUNNING PSCAN
  RX bytes:688 acl:0 sco:0 events:49 errors:0
  TX bytes:3167 acl:0 sco:0 commands:49 errors:0

Revision history for this message
PeterPall (peterpall) wrote :
Revision history for this message
PeterPall (peterpall) wrote :

The patch that resolves the problem.

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

Thanks for the suggestion. It sounds like this may fix bug 405294 for some users.

Unfortunately you forgot to attach "bluetooth-audio.conf" mentioned in your patch.

Changed in bluez (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, if all you would like to change is kernel parameters:

  options ath9k btcoex_enable=1 bt_ant_diversity=1

then that's a kernel bug/enhancement. Not something that bluez should be involved in...

It appears those two parameters are uninitialized by default (so default to zero/off??):

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath9k/init.c#n58

Sounds like a simple kernel fix/enhancement to turn them on by default.

Changed in bluez (Ubuntu):
status: Incomplete → Invalid
Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
PeterPall (peterpall) wrote : Re: Enable Bluetooth-Wifi coexistence by default [bluetooth audio and network skip on Wifi activity]

I currently run the newest vanilla kernel using an Acer Aspire S7 with an Intel chipset. Still my patch is needed on my system.

---

I have no experience in getting things changed in the kernel => attaching the corrected patch. But if you reassign the bug to "linux-kernel" and mark this bug as duplicate of bug 405294 I'll try to do my very best.

Revision history for this message
PeterPall (peterpall) wrote :

The corrected version of my patch (finally containing all files).

Revision history for this message
PeterPall (peterpall) wrote :

...or do we want to mark this bug as duplicate of bug 405294?

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

Please keep this bug about fixing the issue for ath9k wifi only.

So this bug is not a duplicate of bug 405294. This bug is open and should be fixed in the kernel (package "linux").

tags: added: patch
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.15 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That probably won't help. The link in comment #5 seems to show the ath9k source in Linus' tree is still defaulting to btcoex_enable=0 bt_ant_diversity=0.

At least I assume and hope uninitialized static variables in the kernel means they're reliably zero...?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Daniel,

IIRC, on ath9k WiFi speed drops to halve once BT coexistence is enabled.
Can you try if this is still the case?
If not, we should send a patch to enable it as default.

Revision history for this message
PeterPall (peterpall) wrote :

I'm using the mainline build right now - and I still need to module parameter in order to have more than 1 minute of bluetooth audio at a time => We should send this patch.

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Kai,

I don't have the ath9k hardware, but it sounds like that's a necessary evil... For Bluetooth users, halving the wifi speed is better than unreliable Bluetooth.

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

We should indeed default to the configuration that is reliable. And if people want to switch to the less reliable, but faster, option then they still can.

Revision history for this message
PeterPall (peterpall) wrote :

The user won't probably want to do that:
 - The new default reduces the Wifi Speed only while bluetooth is actually trying to send (which isn't too often if the user isn't currently listening to Bluetooth audio) and
 - If Bluetooth/Wifi coecistence isn't enabled Bluetooth (when trying to send on the same frequency as the WiFi) tends to make the Wifi packet impossible to read => The WiFi packet has to be retransmitted => WiFi might get even slower than with Bluetooth-WiFi coexistence enabled.
 - Also since I have enabled Bluetooth-Wifi coexistence my wifi connection has stopped dropping from time to time => my guess is that if Bluetooth can send while WiFi does, this destroys packets and this happens to happen with every packet for a while the connection WiFi might drop as the Bluetooth one might in this case.

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

Right. So we agree your patch should be applied by default to ath9k. Just as coexistence is enabled by default for Intel wifi. Unless someone more familiar with ath9k has a (better) reason otherwise...

summary: - Enable Bluetooth-Wifi coexistence by default [bluetooth audio and
- network skip on Wifi activity]
+ [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio
+ and network skip on Wifi activity)
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

This option should be default in kernel side instead of use a modprobe conf file. I'll send a patch to enable it.

no longer affects: bluez (Ubuntu)
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I guess what we want is btcoex_enable=0 bt_ant_diversity=1.
From what I can understand, bt_ant_diversity is the one that can use BT's antenna to be WiFi's RX antenna when BT is off.

Peter, can you try if btcoex_enable=0 bt_ant_diversity=1 works for you?

Here's the relevant code:
        /*
         * Enable WLAN/BT RX Antenna diversity only when:
         *
         * - BTCOEX is disabled.
         * - the user manually requests the feature.
         * - the HW cap is set using the platform data.
         */
        if (!common->btcoex_enabled && ath9k_bt_ant_diversity &&
            (pCap->hw_caps & ATH9K_HW_CAP_BT_ANT_DIV))
                common->bt_ant_diversity = 1;

Revision history for this message
PeterPall (peterpall) wrote :

In my case this configuration results in
 - a bluetooth hangs, but only if the WiFi is far away and only about once every minute. But the connection losses I experienced with btcoex_enable=0 bt_ant_diversity=0 are nearly gone.
 - and changing the file in mplayer causes a short audio hang.

With btcoex_enable=1 and bt_ant_diversity=1 I don't get any connection losses, audio runs smoothly without hangs and switching from a file to another works smoothly, too.

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

It sounds like maybe @peterpall isn't doing what @kaihengfeng asked:

  btcoex_enable=0 bt_ant_diversity=1

But at the same time it also sounds like @kaihengfeng is trying to solve the wrong problem, judging by comment #20. Actually it sounds like the fix @peterpall needs is just:

  btcoex_enable=1

Which is what the title of the bug says too :)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote : Re: [Bug 1746164] Re: [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio and network skip on Wifi activity)
Download full text (3.8 KiB)

> On Feb 2, 2018, at 10:05 AM, Daniel van Vugt <email address hidden> wrote:
>
> It sounds like maybe @peterpall isn't doing what @kaihengfeng asked:
>
> btcoex_enable=0 bt_ant_diversity=1
>
> But at the same time it also sounds like @kaihengfeng is trying to solve
> the wrong problem, judging by comment #20. Actually it sounds like the
> fix @peterpall needs is just:

Judging from the comment, bt_ant_diversity is what we want, to let WiFi use two antennas when BT is off.

>
> btcoex_enable=1

IIUC, this will let WiFi uses single antenna all the time. Not something user really want.

>
> Which is what the title of the bug says too :)
>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1746164
>
> Title:
> [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio
> and network skip on Wifi activity)
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> By default BT audio works fine on Ubuntu - if there is no WiFi active:
> Both work on the same frequency range, 2 WiFi channel is about 20
> Bluetooth Channels wide and every time a WiFi package is sent
> bluetooth risks a packet loss.
>
> Creating a file named /etc/modprobe.d/bluetooth-audio.conf with the
> following content:
>
> options ath9k btcoex_enable=1 bt_ant_diversity=1
>
> resolves the problem and drastically increases bluetooth throughput
> for all other use cases (bluetooth networking that doesn't drop every
> time the WiFi probes something, lower latency Bluetooth HIDs.
>
> We should ship things in a way that they work out-of-the-box => I am
> all for providing this file with Ubuntu, possibly with Bluez.
>
> In the case of my laptop btcoex_enable=1 would already do the trick.
>
>
> Technical background:
> - https://wireless.wiki.kernel.org/en/users/drivers/ath9k/btcoex
> - https://wiki.freebsd.org/dev/ath_hal(4)/AntennaDiversity
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: bluez 5.46-0ubuntu4
> Uname: Linux 4.15.0-041500rc9-lowlatency x86_64
> ApportVersion: 2.20.8-0ubuntu6
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Tue Jan 30 06:40:12 2018
> EcryptfsInUse: Yes
> InterestingModules: rfcomm bnep btusb bluetooth
> MachineType: Acer Aspire S7-391
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=de_DE.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.15.0-041500rc9-lowlatency root=UUID=6d0fd0ad-9048-4fdb-881a-eba6d6d13c3b ro rootflags=subvol=@ acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable nmi_watchdog=0 quiet splash acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable video=vesafb:ywrap,mtrr=3 nmi_watchdog=0 vt.handoff=1
> SourcePackage: bluez
> UpgradeStatus: No upgrade log present (probably fresh install)
> dmi.bios.date: 11/16/2012
> dmi.bios.vendor: Insyde Corp.
> dmi.bios.version: V2.09
> dmi.board.asset.tag: No Asset Tag
> dmi.board.name: Storm
> dmi.board.vendor: Acer
> dmi.board.version: V2.09
> dmi.chassis.asset.tag: No Asset Tag
> dmi.chassis.type: 10
> dmi...

Read more...

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

"to let WiFi use two antennas when BT is off" is indeed nice to have too, yes.

However this bug is titled "Enable Bluetooth-Wifi coexistence by default". So it sounds like we need both:

  btcoex_enable=1 bt_ant_diversity=1

The problem we aim to solve here is fixing Bluetooth performance, not fixing wifi performance.

Revision history for this message
PeterPall (peterpall) wrote :

I had tried all combinations:

 - btcoex_enable=0 and bt_ant_diversity=1 does help a little bit with bluetooth. But not much
 - btcoex_enable=1 and bt_ant_diversity=0 does solve the bluetooth problem for me
 - btcoex_enable=1 and bt_ant_diversity=1 Here I have the feeling that it makes changing files and fast-forward/fast-backward smoother in mplayer (btcoex_enable=1 and bt_ant_diversity=0 in rare cases gives "bluetooth device stuck" messages, but working audio).
 - btcoex_enable=0 and bt_ant_diversity=0: Bluetooth keeps hanging *and* low wifi performance while using bluetooth.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Download full text (4.1 KiB)

> On Feb 2, 2018, at 1:14 PM, PeterPall <email address hidden> wrote:
>
> I had tried all combinations:
>
> - btcoex_enable=0 and bt_ant_diversity=1 does help a little bit with bluetooth. But not much

Do you see "Set BT/WLAN RX diversity capability” in dmesg? Your wireless chip doesn’t support bt_ant_diversity if you don’t see this message.

> - btcoex_enable=1 and bt_ant_diversity=0 does solve the bluetooth problem for me
> - btcoex_enable=1 and bt_ant_diversity=1 Here I have the feeling that it makes changing files and fast-forward/fast-backward smoother in mplayer (btcoex_enable=1 and bt_ant_diversity=0 in rare cases gives "bluetooth device stuck" messages, but working audio).

BT antenna diversity won’t get set when btcoex_enable is 1. So both bt_ant_diversity=[0,1] have the same effect.

> - btcoex_enable=0 and bt_ant_diversity=0: Bluetooth keeps hanging *and* low wifi performance while using bluetooth.
>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1746164
>
> Title:
> [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio
> and network skip on Wifi activity)
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> By default BT audio works fine on Ubuntu - if there is no WiFi active:
> Both work on the same frequency range, 2 WiFi channel is about 20
> Bluetooth Channels wide and every time a WiFi package is sent
> bluetooth risks a packet loss.
>
> Creating a file named /etc/modprobe.d/bluetooth-audio.conf with the
> following content:
>
> options ath9k btcoex_enable=1 bt_ant_diversity=1
>
> resolves the problem and drastically increases bluetooth throughput
> for all other use cases (bluetooth networking that doesn't drop every
> time the WiFi probes something, lower latency Bluetooth HIDs.
>
> We should ship things in a way that they work out-of-the-box => I am
> all for providing this file with Ubuntu, possibly with Bluez.
>
> In the case of my laptop btcoex_enable=1 would already do the trick.
>
>
> Technical background:
> - https://wireless.wiki.kernel.org/en/users/drivers/ath9k/btcoex
> - https://wiki.freebsd.org/dev/ath_hal(4)/AntennaDiversity
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: bluez 5.46-0ubuntu4
> Uname: Linux 4.15.0-041500rc9-lowlatency x86_64
> ApportVersion: 2.20.8-0ubuntu6
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Tue Jan 30 06:40:12 2018
> EcryptfsInUse: Yes
> InterestingModules: rfcomm bnep btusb bluetooth
> MachineType: Acer Aspire S7-391
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=de_DE.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.15.0-041500rc9-lowlatency root=UUID=6d0fd0ad-9048-4fdb-881a-eba6d6d13c3b ro rootflags=subvol=@ acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable nmi_watchdog=0 quiet splash acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable video=vesafb:ywrap,mtrr=3 nmi_watchdog=0 vt.handoff=1
> SourcePackage: bluez
> UpgradeStatus: No upgrade log present (probably fresh install)
>...

Read more...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Download full text (3.6 KiB)

> On Feb 2, 2018, at 12:56 PM, Daniel van Vugt <email address hidden> wrote:
>
> "to let WiFi use two antennas when BT is off" is indeed nice to have
> too, yes.
>
> However this bug is titled "Enable Bluetooth-Wifi coexistence by
> default". So it sounds like we need both:
>
> btcoex_enable=1 bt_ant_diversity=1
>
> The problem we aim to solve here is fixing Bluetooth performance, not
> fixing wifi performance.

This will be a regression for people don’t use WiFi.

>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1746164
>
> Title:
> [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio
> and network skip on Wifi activity)
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> By default BT audio works fine on Ubuntu - if there is no WiFi active:
> Both work on the same frequency range, 2 WiFi channel is about 20
> Bluetooth Channels wide and every time a WiFi package is sent
> bluetooth risks a packet loss.
>
> Creating a file named /etc/modprobe.d/bluetooth-audio.conf with the
> following content:
>
> options ath9k btcoex_enable=1 bt_ant_diversity=1
>
> resolves the problem and drastically increases bluetooth throughput
> for all other use cases (bluetooth networking that doesn't drop every
> time the WiFi probes something, lower latency Bluetooth HIDs.
>
> We should ship things in a way that they work out-of-the-box => I am
> all for providing this file with Ubuntu, possibly with Bluez.
>
> In the case of my laptop btcoex_enable=1 would already do the trick.
>
>
> Technical background:
> - https://wireless.wiki.kernel.org/en/users/drivers/ath9k/btcoex
> - https://wiki.freebsd.org/dev/ath_hal(4)/AntennaDiversity
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: bluez 5.46-0ubuntu4
> Uname: Linux 4.15.0-041500rc9-lowlatency x86_64
> ApportVersion: 2.20.8-0ubuntu6
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Tue Jan 30 06:40:12 2018
> EcryptfsInUse: Yes
> InterestingModules: rfcomm bnep btusb bluetooth
> MachineType: Acer Aspire S7-391
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=de_DE.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.15.0-041500rc9-lowlatency root=UUID=6d0fd0ad-9048-4fdb-881a-eba6d6d13c3b ro rootflags=subvol=@ acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable nmi_watchdog=0 quiet splash acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable video=vesafb:ywrap,mtrr=3 nmi_watchdog=0 vt.handoff=1
> SourcePackage: bluez
> UpgradeStatus: No upgrade log present (probably fresh install)
> dmi.bios.date: 11/16/2012
> dmi.bios.vendor: Insyde Corp.
> dmi.bios.version: V2.09
> dmi.board.asset.tag: No Asset Tag
> dmi.board.name: Storm
> dmi.board.vendor: Acer
> dmi.board.version: V2.09
> dmi.chassis.asset.tag: No Asset Tag
> dmi.chassis.type: 10
> dmi.chassis.vendor: Acer
> dmi.chassis.version: V2.09
> dmi.modalias: dmi:bvnInsydeCorp.:bvrV2.09:bd11/16/2012:svnAcer:pnAspireS7-391:pvrV2.09:rvnAcer:rnStorm:rvrV2.09:cvnAce...

Read more...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

It should be "This will be a regression for people who only use WiFi but not Bluetooth".

Revision history for this message
PeterPall (peterpall) wrote :

> Do you see "Set BT/WLAN RX diversity capability” in dmesg? Your wireless
> chip doesn’t support bt_ant_diversity if you don’t see this message.
Seems like my wireless chip doesn't support it: My dmesg starts with probing the CPU on starting the kernel but doesn't contain this message.

=> I would be happy with btcoex_enable=1 without using bt_ant_diversity=1.
Hope that this method isn't a regression for wifi-only users. While bluetooth is in use it enhances wifi performance a lot for me.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Download full text (3.8 KiB)

> On Feb 2, 2018, at 1:59 PM, PeterPall <email address hidden> wrote:
>
>> Do you see "Set BT/WLAN RX diversity capability” in dmesg? Your wireless
>> chip doesn’t support bt_ant_diversity if you don’t see this message.
> Seems like my wireless chip doesn't support it: My dmesg starts with probing the CPU on starting the kernel but doesn't contain this message.
>
> => I would be happy with btcoex_enable=1 without using bt_ant_diversity=1.
> Hope that this method isn't a regression for wifi-only users. While bluetooth is in use it enhances wifi performance a lot for me.

Okay, I’ll sent a patch to enable it and discuss with ath9k maintainers.

>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1746164
>
> Title:
> [ath9k] Enable Bluetooth-Wifi coexistence by default (bluetooth audio
> and network skip on Wifi activity)
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> By default BT audio works fine on Ubuntu - if there is no WiFi active:
> Both work on the same frequency range, 2 WiFi channel is about 20
> Bluetooth Channels wide and every time a WiFi package is sent
> bluetooth risks a packet loss.
>
> Creating a file named /etc/modprobe.d/bluetooth-audio.conf with the
> following content:
>
> options ath9k btcoex_enable=1 bt_ant_diversity=1
>
> resolves the problem and drastically increases bluetooth throughput
> for all other use cases (bluetooth networking that doesn't drop every
> time the WiFi probes something, lower latency Bluetooth HIDs.
>
> We should ship things in a way that they work out-of-the-box => I am
> all for providing this file with Ubuntu, possibly with Bluez.
>
> In the case of my laptop btcoex_enable=1 would already do the trick.
>
>
> Technical background:
> - https://wireless.wiki.kernel.org/en/users/drivers/ath9k/btcoex
> - https://wiki.freebsd.org/dev/ath_hal(4)/AntennaDiversity
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: bluez 5.46-0ubuntu4
> Uname: Linux 4.15.0-041500rc9-lowlatency x86_64
> ApportVersion: 2.20.8-0ubuntu6
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Tue Jan 30 06:40:12 2018
> EcryptfsInUse: Yes
> InterestingModules: rfcomm bnep btusb bluetooth
> MachineType: Acer Aspire S7-391
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=de_DE.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-4.15.0-041500rc9-lowlatency root=UUID=6d0fd0ad-9048-4fdb-881a-eba6d6d13c3b ro rootflags=subvol=@ acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable nmi_watchdog=0 quiet splash acpi_backlight=vendor init=/lib/systemd/systemd intel_pstate=enable video=vesafb:ywrap,mtrr=3 nmi_watchdog=0 vt.handoff=1
> SourcePackage: bluez
> UpgradeStatus: No upgrade log present (probably fresh install)
> dmi.bios.date: 11/16/2012
> dmi.bios.vendor: Insyde Corp.
> dmi.bios.version: V2.09
> dmi.board.asset.tag: No Asset Tag
> dmi.board.name: Storm
> dmi.board.vendor: Acer
> dmi.board.version: V2.09
> dmi.chassis.asset.tag: No Asset Tag
> dmi.chassis.type: 10
> dm...

Read more...

Changed in linux (Ubuntu):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
PeterPall (peterpall) wrote :

Cool! Thanks a lot!

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
tags: added: a2dp-skip
Revision history for this message
Vikrant Kumar (vikrant-treadstone) wrote :

I am also facing the same issue.

The wifi works perfectly until Bluetooth speaker works perfectly.

As soon as Bluetooth speaker connects the wifi activity keeps skipping.

Kindly let me know how to solve this.

Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Vikrant Kumar (vikrant-treadstone) wrote :

Any update how to solve this problem

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Write "options ath9k btcoex_enable=1" to some config file under "/etc/modprobe.conf.d/".

Changed in linux (Ubuntu):
assignee: Kai-Heng Feng (kaihengfeng) → nobody
Changed in linux (Ubuntu):
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.