2021-12-30 09:21:47

by Chris Clayton

[permalink] [raw]
Subject: 5.16.0-rc7+ Bluetooth error

Hi,

I pulled the latest changes into my clone of Linus' tree and built and installed the kernel. (git describe gives
v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the bluetooth subsystem that i don't see in 5.15.12 or 5.10.89

The problem seems to occur twice during system startup and on each occasion I see a batch of identical error messages:

[ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
[ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)

A full dmesg log is attached. I've also attached Two files containing the output from "lsusb -v" run on 5.10.89 and
5.16-rc7.

Please let me know if I can provide any other diagnostic information or test any patches. You'll need to cc me on
replies because I'm not subscribed to LKML or linux-bluetooth.

Thanks


Attachments:
BT-error.dmesg.txt (56.35 kB)
lsusb-v_5.10.89.txt (43.24 kB)
lsusb-v_5.16-rc7+.txt (43.10 kB)
Download all attachments

2021-12-31 06:22:00

by Chris Clayton

[permalink] [raw]
Subject: Re: 5.16.0-rc7+ Bluetooth error

On 30/12/2021 09:21, Chris Clayton wrote:
> Hi,
>
> I pulled the latest changes into my clone of Linus' tree and built and installed the kernel. (git describe gives
> v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
>
> The problem seems to occur twice during system startup and on each occasion I see a batch of identical error messages:
>
> [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
> [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
>

Sorry, I should have said that despite the above errors, my bluetooth devices still work fine.


> A full dmesg log is attached. I've also attached Two files containing the output from "lsusb -v" run on 5.10.89 and
> 5.16-rc7.
>
> Please let me know if I can provide any other diagnostic information or test any patches. You'll need to cc me on
> replies because I'm not subscribed to LKML or linux-bluetooth.
>
> Thanks

2021-12-31 19:53:25

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: 5.16.0-rc7+ Bluetooth error

Hi Chris,

On Fri, Dec 31, 2021 at 2:35 AM Chris Clayton <[email protected]> wrote:
>
> On 30/12/2021 09:21, Chris Clayton wrote:
> > Hi,
> >
> > I pulled the latest changes into my clone of Linus' tree and built and installed the kernel. (git describe gives
> > v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
> >
> > The problem seems to occur twice during system startup and on each occasion I see a batch of identical error messages:
> >
> > [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
> >
>
> Sorry, I should have said that despite the above errors, my bluetooth devices still work fine.

Would be great to have the HCI trace (btmon).

@Kiran K Is this to be expected?

>
> > A full dmesg log is attached. I've also attached Two files containing the output from "lsusb -v" run on 5.10.89 and
> > 5.16-rc7.
> >
> > Please let me know if I can provide any other diagnostic information or test any patches. You'll need to cc me on
> > replies because I'm not subscribed to LKML or linux-bluetooth.
> >
> > Thanks



--
Luiz Augusto von Dentz

2022-01-01 11:03:10

by Chris Clayton

[permalink] [raw]
Subject: Re: 5.16.0-rc7+ Bluetooth error



On 31/12/2021 19:53, Luiz Augusto von Dentz wrote:
> Hi Chris,
>
> On Fri, Dec 31, 2021 at 2:35 AM Chris Clayton <[email protected]> wrote:
>>
>> On 30/12/2021 09:21, Chris Clayton wrote:
>>> Hi,
>>>
>>> I pulled the latest changes into my clone of Linus' tree and built and installed the kernel. (git describe gives
>>> v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
>>>
>>> The problem seems to occur twice during system startup and on each occasion I see a batch of identical error messages:
>>>
>>> [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>> [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>
>>
>> Sorry, I should have said that despite the above errors, my bluetooth devices still work fine.
>
> Would be great to have the HCI trace (btmon).
>

How would I go about capturing that, please? This all happens during boot, so I don't have access to the system to set
up a trace.


> @Kiran K Is this to be expected?
>
>>
>>> A full dmesg log is attached. I've also attached Two files containing the output from "lsusb -v" run on 5.10.89 and
>>> 5.16-rc7.
>>>
>>> Please let me know if I can provide any other diagnostic information or test any patches. You'll need to cc me on
>>> replies because I'm not subscribed to LKML or linux-bluetooth.
>>>
>>> Thanks
>
>
>

2022-01-01 13:20:55

by Chris Clayton

[permalink] [raw]
Subject: Re: 5.16.0-rc7+ Bluetooth error



On 01/01/2022 11:03, Chris Clayton wrote:
>
>
> On 31/12/2021 19:53, Luiz Augusto von Dentz wrote:
>> Hi Chris,
>>
>> On Fri, Dec 31, 2021 at 2:35 AM Chris Clayton <[email protected]> wrote:
>>>
>>> On 30/12/2021 09:21, Chris Clayton wrote:
>>>> Hi,
>>>>
>>>> I pulled the latest changes into my clone of Linus' tree and built and installed the kernel. (git describe gives
>>>> v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
>>>>
>>>> The problem seems to occur twice during system startup and on each occasion I see a batch of identical error messages:
>>>>
>>>> [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>>
>>>
>>> Sorry, I should have said that despite the above errors, my bluetooth devices still work fine.
>>
>> Would be great to have the HCI trace (btmon).
>>
>
> How would I go about capturing that, please? This all happens during boot, so I don't have access to the system to set
> up a trace.
>

I thought about this a bit more and realised that one batch of the errors messages occurs when the bluetooth service is
being started in userspace. Si I stopped that service, started btmon and restarted the service. The trace is attached.

The error messages I am seeing seem to coincide with the "Status: Unknown HCI Command (0x01)" messages that are in the
trace. The first instance of that is at line 951 of the trace.


>
>> @Kiran K Is this to be expected?
>>
>>>
>>>> A full dmesg log is attached. I've also attached Two files containing the output from "lsusb -v" run on 5.10.89 and
>>>> 5.16-rc7.
>>>>
>>>> Please let me know if I can provide any other diagnostic information or test any patches. You'll need to cc me on
>>>> replies because I'm not subscribed to LKML or linux-bluetooth.
>>>>
>>>> Thanks
>>
>>
>>


Attachments:
hcitrace.txt (60.00 kB)

2022-01-03 09:55:14

by K, Kiran

[permalink] [raw]
Subject: RE: 5.16.0-rc7+ Bluetooth error

Hi Luiz, Chris,

> -----Original Message-----
> From: Luiz Augusto von Dentz <[email protected]>
> Sent: Saturday, January 1, 2022 1:23 AM
> To: Chris Clayton <[email protected]>
> Cc: LKML <[email protected]>; [email protected];
> K, Kiran <[email protected]>
> Subject: Re: 5.16.0-rc7+ Bluetooth error
>
> Hi Chris,
>
> On Fri, Dec 31, 2021 at 2:35 AM Chris Clayton <[email protected]>
> wrote:
> >
> > On 30/12/2021 09:21, Chris Clayton wrote:
> > > Hi,
> > >
> > > I pulled the latest changes into my clone of Linus' tree and built
> > > and installed the kernel. (git describe gives
> > > v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the
> > > bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
> > >
> > > The problem seems to occur twice during system startup and on each
> occasion I see a batch of identical error messages:
> > >
> > > [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > > [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
> > >
> >
> > Sorry, I should have said that despite the above errors, my bluetooth
> devices still work fine.
>
> Would be great to have the HCI trace (btmon).
>
> @Kiran K Is this to be expected?

May be the BT controller here is not supporting HCI_READ_CODEC_CAPABILITIES command.

This has been fixed - https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=107fe0482b549a0e43a971e5fd104719c6e495ef

A check has been added to read codec capabilities only if supported.

Thanks,
Kiran

2022-01-03 13:35:29

by Chris Clayton

[permalink] [raw]
Subject: Re: 5.16.0-rc7+ Bluetooth error



On 03/01/2022 09:55, K, Kiran wrote:
> Hi Luiz, Chris,
>
>> -----Original Message-----
>> From: Luiz Augusto von Dentz <[email protected]>
>> Sent: Saturday, January 1, 2022 1:23 AM
>> To: Chris Clayton <[email protected]>
>> Cc: LKML <[email protected]>; [email protected];
>> K, Kiran <[email protected]>
>> Subject: Re: 5.16.0-rc7+ Bluetooth error
>>
>> Hi Chris,
>>
>> On Fri, Dec 31, 2021 at 2:35 AM Chris Clayton <[email protected]>
>> wrote:
>>>
>>> On 30/12/2021 09:21, Chris Clayton wrote:
>>>> Hi,
>>>>
>>>> I pulled the latest changes into my clone of Linus' tree and built
>>>> and installed the kernel. (git describe gives
>>>> v5.16-rc7-9-ge7c124bd0463). I'm seeing errors reported by the
>>>> bluetooth subsystem that i don't see in 5.15.12 or 5.10.89
>>>>
>>>> The problem seems to occur twice during system startup and on each
>> occasion I see a batch of identical error messages:
>>>>
>>>> [ 3.980822] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.982812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.984812] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.986608] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.987621] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.988606] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>> [ 3.989650] Bluetooth: hci0: Failed to read codec capabilities (-56)
>>>>
>>>
>>> Sorry, I should have said that despite the above errors, my bluetooth
>> devices still work fine.
>>
>> Would be great to have the HCI trace (btmon).
>>
>> @Kiran K Is this to be expected?
>
> May be the BT controller here is not supporting HCI_READ_CODEC_CAPABILITIES command.
>
> This has been fixed - https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=107fe0482b549a0e43a971e5fd104719c6e495ef
>

I've applied the patch to 5.16.0-rc8 and the error messages are no longer produced. My bluetooth devices are stiil working.

Tested-By: Chris Clayton <[email protected]>

> A check has been added to read codec capabilities only if supported.
>
> Thanks,
> Kiran
>