2022-01-24 04:33:26

by Kenneth Crudup

[permalink] [raw]
Subject: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


I'm running Linus' master (as of today, 1c52283265a462a100). With this commit in
place I get no bluetooth ("hcitool dev" shows no adapters) and/or I can't see my
MS ArcTouch mouse.

I have an Intel 7260 BT adapter (and have the latest linux-firmware version of
intel/ibt-19-32-4.sfi).

I'm sure you'll need more information, so let me know. I'm in the process of
reverting this from my branch, but it's not coming out cleanly so if there's
some code to try (nothing obvious in the linux-bt git), please let me know.

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA


2022-01-24 20:54:08

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


On Mon, 24 Jan 2022, Luiz Augusto von Dentz wrote:

> > I'm running Linus' master (as of today, 1c52283265a462a100). With this commit in
> > place I get no bluetooth ("hcitool dev" shows no adapters) and/or I can't see my
> > MS ArcTouch mouse.

> It would be great to have some logs, btmon, dmesg, etc.

That's just it- nothing shows up in any log/dmesg; unlike when a non-MS mouse is
detected and I get the notification from the HID layer.

I even did an s/{bt}_debug/{bt}_info/g over all the files in the commit, and when
that mouse is power-cycled it doesn't even make a peep in the logs- it's like it's
not even being seen (vs. several lines when I use my ordinary mouse).

What params should I use for "btmon" so I can send you the output?

> If the adapter doesn't work this might be related to firmware loading

Turns out this was a red herring; I always have the adapter.

> anymore the LL privacy feature is not
> enabled by default so I wonder if you had it enabled in userspace?

Where would I go to check that?

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-01-24 21:15:44

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse

Hi Kenneth,

On Sun, Jan 23, 2022 at 8:33 PM Kenneth R. Crudup <[email protected]> wrote:
>
>
> I'm running Linus' master (as of today, 1c52283265a462a100). With this commit in
> place I get no bluetooth ("hcitool dev" shows no adapters) and/or I can't see my
> MS ArcTouch mouse.

It would be great to have some logs, btmon, dmesg, etc. If the adapter
doesn't work this might be related to firmware loading and not the
commit you mentioned above, anymore the LL privacy feature is not
enabled by default so I wonder if you had it enabled in userspace?

> I have an Intel 7260 BT adapter (and have the latest linux-firmware version of
> intel/ibt-19-32-4.sfi).
>
> I'm sure you'll need more information, so let me know. I'm in the process of
> reverting this from my branch, but it's not coming out cleanly so if there's
> some code to try (nothing obvious in the linux-bt git), please let me know.
>
> -Kenny
>
> --
> Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA



--
Luiz Augusto von Dentz

2022-01-25 08:28:36

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


Oh, this happens too (see attached .PNG) when I try and add a device:

"Your Bluetooth adapter is not pairable."

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA


Attachments:
Screenshot_20220124_174859001.png (22.31 kB)

2022-01-25 08:28:46

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


On Mon, 24 Jan 2022, Luiz Augusto von Dentz wrote:

> It is enabled via main.conf, if you have not modified that shouldn't be enabled.

Seems pretty generic:

----
$ nocomment /etc/bluetooth/*
/etc/bluetooth/input.conf:[General]
/etc/bluetooth/main.conf:[General]
/etc/bluetooth/main.conf:[Policy]
/etc/bluetooth/main.conf:AutoEnable=true
/etc/bluetooth/network.conf:[General]
----

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-01-25 08:29:40

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse

Hi Kenneth,

On Mon, Jan 24, 2022 at 11:59 AM Kenneth R. Crudup <[email protected]> wrote:
>
>
> On Mon, 24 Jan 2022, Luiz Augusto von Dentz wrote:
>
> > > I'm running Linus' master (as of today, 1c52283265a462a100). With this commit in
> > > place I get no bluetooth ("hcitool dev" shows no adapters) and/or I can't see my
> > > MS ArcTouch mouse.
>
> > It would be great to have some logs, btmon, dmesg, etc.
>
> That's just it- nothing shows up in any log/dmesg; unlike when a non-MS mouse is
> detected and I get the notification from the HID layer.
>
> I even did an s/{bt}_debug/{bt}_info/g over all the files in the commit, and when
> that mouse is power-cycled it doesn't even make a peep in the logs- it's like it's
> not even being seen (vs. several lines when I use my ordinary mouse).
>
> What params should I use for "btmon" so I can send you the output?

Try something like:

sudo btmon -t

Also restart the daemon just in case and then do:

bluetoothctl> power on

> > If the adapter doesn't work this might be related to firmware loading
>
> Turns out this was a red herring; I always have the adapter.
>
> > anymore the LL privacy feature is not
> > enabled by default so I wonder if you had it enabled in userspace?
>
> Where would I go to check that?

It is enabled via main.conf, if you have not modified that shouldn't be enabled.

> -Kenny
>
> --
> Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA



--
Luiz Augusto von Dentz

2022-01-25 08:31:14

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


On Mon, 24 Jan 2022, Luiz Augusto von Dentz wrote:

> Try something like:
> sudo btmon -t

----
$ sudo btmon -t
Bluetooth monitor ver 5.55
= Note: Linux version 5.17.0-rc1-XPS-Kenny+ (x86_64) 17:23:38.260348
= Note: Bluetooth subsystem version 2.22 17:23:38.260349
= New Index: C0:B8:83:1F:F4:45 (Primary,USB,hci0) [hci0] 17:23:38.260349
= Open Index: C0:B8:83:1F:F4:45 [hci0] 17:23:38.260349
= Index Info: C0:B8:83:1F:F4:45 (Intel Corp.) [hci0] 17:23:38.260350
@ MGMT Open: bluetoothd (privileged) version 1.21 {0x0001} 17:23:38.260350
----

Then nothing else, when I power/move on this MS mouse. If I power on my generic
BT mouse, I get plenty of output. Are there other options to try?

> Also restart the daemon just in case and then do:
>
> bluetoothctl> power on

It was already on:
----
$ sudo bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# quit
$
----

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-01-28 17:23:26

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


Anything else I can do to help you diagnose this regression? One thing I do
(vaguely) remember when building a custom kernel some time ago is that this
device does some sort of "GATT encryption" (I'm sure I'm misremembering this,
it's been a few years) and I couldn't connect to it either unless the
appropriate config setup was used when building the kernel.

Thanks,

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-02-01 08:50:34

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


So, it turns out that my lack of discoverability is also tied into this last
series of BT commits (and apparently the result of some commit other than the
one named in the Subject: line); while I could take the time to bisect this
issue as well, seems to me that something as basic as not being able to put
an HCI adapter in discoverable mode is a pretty big regression (especially
on something as ubiquitous as Intel BT adapters) that I can't be the only
one who's seeing these issues- have there been any other reports, and are
there any fixes upcoming?

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-03-05 03:29:54

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse

Hi Kenneth,

On Fri, Mar 4, 2022 at 4:06 PM Kenneth R. Crudup <[email protected]> wrote:
>
>
> On Sat, 29 Jan 2022, Kenneth R. Crudup wrote:
>
> > So, it turns out that my lack of discoverability is also tied into this last
> > series of BT commits
>
> So, after "for-net-next-2021-11-16" was pushed into Linus' master, my Laptop's
> Bluetooth has been horribly broken; I can't add new devices (says "can't put
> your adaptor into Discoverable mode"), and my MS ArcTouch mouse (and who knows
> what else) doesn't work anymore. I also get stalls/crashes from the BT system
> when trying to shutdown or reboot.
>
> This is a *serious* regression- I had to revert the entirety of that merge.
> I keep checking the BT changes that have made it to Linus' master of late (and
> even monitoring the Bluetooth git), after nearly 6 weeks, BT is still broken-
> certainly I can't be the only person seeing these issues. I did see where
> someone had a regression about not being able to do scans, and that was fixed,
> but trying that commit (since merged to master) doesn't fix anything for me.
>
> My BT adaptor is an Intel AX201 on USB:
>
> ----
> [Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Found device firmware: intel/ibt-19-32-4.sfi
> [Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Boot Address: 0x24800
> [Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Firmware Version: 126-5.22
> ----
>
> ----
> Bus 003 Device 003: ID 8087:0026 Intel Corp.
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.01
> bDeviceClass 224 Wireless
> bDeviceSubClass 1 Radio Frequency
> bDeviceProtocol 1 Bluetooth
> bMaxPacketSize0 64
> idVendor 0x8087 Intel Corp.
> idProduct 0x0026
> ----
>
> What can I do to help you fix this?

Have you tried with bluetooth.git tree:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/

This was the latest one that fixes the MGMT commands not working:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/commit/?h=for-net-2022-03-03&id=008ee9eb8a11bcabf12c91771dd4f470b082bd44

It seems some setups are more susceptible to it than others and CI was
one of those when only one MGMT command is ever pending which masked
the problem for us for a while.


--
Luiz Augusto von Dentz

2022-03-05 06:41:16

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


On Fri, 4 Mar 2022, Luiz Augusto von Dentz wrote:

> Have you tried with bluetooth.git tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/
> This was the latest one that fixes the MGMT commands not working:
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/commit/?h=for-net-2022-03-03&id=008ee9eb8a11bcabf12c91771dd4f470b082bd44

Yup, that seems to have fixed things! I've even merged that with Linus' current
master (which went in cleanly) and will look for these changes to me merged in.

Thanks to you and everyone else who helped find and fix this regression!

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA

2022-03-06 10:48:49

by Kenneth Crudup

[permalink] [raw]
Subject: Re: Commit ad383c2c6 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled") breaks my MS ArcTouch mouse


On Sat, 29 Jan 2022, Kenneth R. Crudup wrote:

> So, it turns out that my lack of discoverability is also tied into this last
> series of BT commits

So, after "for-net-next-2021-11-16" was pushed into Linus' master, my Laptop's
Bluetooth has been horribly broken; I can't add new devices (says "can't put
your adaptor into Discoverable mode"), and my MS ArcTouch mouse (and who knows
what else) doesn't work anymore. I also get stalls/crashes from the BT system
when trying to shutdown or reboot.

This is a *serious* regression- I had to revert the entirety of that merge.
I keep checking the BT changes that have made it to Linus' master of late (and
even monitoring the Bluetooth git), after nearly 6 weeks, BT is still broken-
certainly I can't be the only person seeing these issues. I did see where
someone had a regression about not being able to do scans, and that was fixed,
but trying that commit (since merged to master) doesn't fix anything for me.

My BT adaptor is an Intel AX201 on USB:

----
[Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Found device firmware: intel/ibt-19-32-4.sfi
[Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Boot Address: 0x24800
[Fri Mar 4 15:40:52 2022] Bluetooth: hci0: Firmware Version: 126-5.22
----

----
Bus 003 Device 003: ID 8087:0026 Intel Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
bDeviceProtocol 1 Bluetooth
bMaxPacketSize0 64
idVendor 0x8087 Intel Corp.
idProduct 0x0026
----

What can I do to help you fix this?

-Kenny

--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA