All of lore.kernel.org
 help / color / mirror / Atom feed
* Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
@ 2022-02-21 22:37 Maxim Levitsky
  2022-02-22  6:27 ` Thorsten Leemhuis
  2022-02-22 18:35 ` Luiz Augusto von Dentz
  0 siblings, 2 replies; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-21 22:37 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Marcel Holtmann, linux-bluetooth

Today I updated to a new kernel and I am bisecting few regressions:

I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
and then shows only the paired devices and no scan results.

I bisected this to this commit.

For reference I am running fairly old fedora 32 on this machine, and thus I have
bluez 5.55 and stock GNOME from fedora 32.

I can provide any more info on anything if required and/or test patches.

I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
which makes sense.

I tried merging bluetooth-next master as of today,
into my kernel but no noticeable improvement.


Best regards,
	Maxim Levitsky


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-21 22:37 Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system Maxim Levitsky
@ 2022-02-22  6:27 ` Thorsten Leemhuis
  2022-02-22 18:35 ` Luiz Augusto von Dentz
  1 sibling, 0 replies; 12+ messages in thread
From: Thorsten Leemhuis @ 2022-02-22  6:27 UTC (permalink / raw)
  To: Maxim Levitsky, Luiz Augusto von Dentz
  Cc: Marcel Holtmann, linux-bluetooth, regressions


[TLDR: I'm adding the regression report below to regzbot, the Linux
kernel regression tracking bot; all text you find below is compiled from
a few templates paragraphs you might have encountered already already
from similar mails.]

Hi, this is your Linux kernel regression tracker speaking.

CCing the regression mailing list, as it should be in the loop for all
regressions, as explained here:
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html

On 21.02.22 23:37, Maxim Levitsky wrote:
> Today I updated to a new kernel and I am bisecting few regressions:
> 
> I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
> and then shows only the paired devices and no scan results.
> 
> I bisected this to this commit.
> 
> For reference I am running fairly old fedora 32 on this machine, and thus I have
> bluez 5.55 and stock GNOME from fedora 32.
> 
> I can provide any more info on anything if required and/or test patches.
> 
> I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
> which makes sense.
> 
> I tried merging bluetooth-next master as of today,
> into my kernel but no noticeable improvement.

Thanks for the report.

To be sure this issue doesn't fall through the cracks unnoticed, I'm
adding it to regzbot, my Linux kernel regression tracking bot:

#regzbot ^introduced e8907f76544ffe225ab95d70f73
#regzbot title bluetooth: scanning stopped working
#regzbot ignore-activity

Reminder for developers: when fixing the issue, please add a 'Link:'
tags pointing to the report (the mail quoted above) using
lore.kernel.org/r/, as explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'. This allows the bot to connect
the report with any patches posted or committed to fix the issue; this
again allows the bot to show the current status of regressions and
automatically resolve the issue when the fix hits the right tree.

I'm sending this to everyone that got the initial report, to make them
aware of the tracking. I also hope that messages like this motivate
people to directly get at least the regression mailing list and ideally
even regzbot involved when dealing with regressions, as messages like
this wouldn't be needed then.

Don't worry, I'll send further messages wrt to this regression just to
the lists (with a tag in the subject so people can filter them away), if
they are relevant just for regzbot. With a bit of luck no such messages
will be needed anyway.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of
reports on my table. I can only look briefly into most of them and lack
knowledge about most of the areas they concern. I thus unfortunately
will sometimes get things wrong or miss something important. I hope
that's not the case here; if you think it is, don't hesitate to tell me
in a public reply, it's in everyone's interest to set the public record
straight.

-- 
Additional information about regzbot:

If you want to know more about regzbot, check out its web-interface, the
getting start guide, and the references documentation:

https://linux-regtracking.leemhuis.info/regzbot/
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md

The last two documents will explain how you can interact with regzbot
yourself if your want to.

Hint for reporters: when reporting a regression it's in your interest to
CC the regression list and tell regzbot about the issue, as that ensures
the regression makes it onto the radar of the Linux kernel's regression
tracker -- that's in your interest, as it ensures your report won't fall
through the cracks unnoticed.

Hint for developers: you normally don't need to care about regzbot once
it's involved. Fix the issue as you normally would, just remember to
include 'Link:' tag in the patch descriptions pointing to all reports
about the issue. This has been expected from developers even before
regzbot showed up for reasons explained in
'Documentation/process/submitting-patches.rst' and
'Documentation/process/5.Posting.rst'.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-21 22:37 Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system Maxim Levitsky
  2022-02-22  6:27 ` Thorsten Leemhuis
@ 2022-02-22 18:35 ` Luiz Augusto von Dentz
  2022-02-24 13:01   ` Maxim Levitsky
  1 sibling, 1 reply; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-22 18:35 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

Hi Maxim,

On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> Today I updated to a new kernel and I am bisecting few regressions:
>
> I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
> and then shows only the paired devices and no scan results.
>
> I bisected this to this commit.
>
> For reference I am running fairly old fedora 32 on this machine, and thus I have
> bluez 5.55 and stock GNOME from fedora 32.
>
> I can provide any more info on anything if required and/or test patches.
>
> I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
> which makes sense.
>
> I tried merging bluetooth-next master as of today,
> into my kernel but no noticeable improvement.

Is there any error being reported in bluetoothd, does bluetoothctl
have the same problem? It would be great if you could provide an HCI
trace of the problem.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-22 18:35 ` Luiz Augusto von Dentz
@ 2022-02-24 13:01   ` Maxim Levitsky
  2022-02-24 15:21     ` Luiz Augusto von Dentz
  2022-02-24 15:43     ` Paul Menzel
  0 siblings, 2 replies; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-24 13:01 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> Hi Maxim,
> 
> On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > Today I updated to a new kernel and I am bisecting few regressions:
> > 
> > I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
> > and then shows only the paired devices and no scan results.
> > 
> > I bisected this to this commit.
> > 
> > For reference I am running fairly old fedora 32 on this machine, and thus I have
> > bluez 5.55 and stock GNOME from fedora 32.
> > 
> > I can provide any more info on anything if required and/or test patches.
> > 
> > I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
> > which makes sense.
> > 
> > I tried merging bluetooth-next master as of today,
> > into my kernel but no noticeable improvement.
> 
> Is there any error being reported in bluetoothd, does bluetoothctl
> have the same problem? It would be great if you could provide an HCI
> trace of the problem.
> 
I haven't used bluetoothd much but that is what I see:

[mlevitsk@starship ~]$bluetoothctl 
Agent registered
[bluetooth]# scan on
[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.InProgress
[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.InProgress
[bluetooth]# 

No results show up, attempting to scan again shows the InProgres error.

On my AMD laptop on the other hand (also runs the same 5.17-rc5 kernel),
after 'scan on' I start seeing lots of scan results of various devices near me.


journalctl -u bluetooth -b0

-- Logs begin at Wed 2022-01-12 11:47:00 IST, end at Thu 2022-02-24 14:50:59 IST. --
Feb 23 22:16:45 starship systemd[1]: Starting Bluetooth service...
Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth daemon 5.60
Feb 23 22:16:45 starship systemd[1]: Started Bluetooth service.
Feb 23 22:16:45 starship bluetoothd[1825]: Starting SDP server
Feb 23 22:16:45 starship bluetoothd[1825]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
Feb 23 22:16:45 starship bluetoothd[1825]: src/plugin.c:plugin_init() System does not support network plugin
Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth management interface 1.21 initialized
Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/sbc
Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/sbc
Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset Voice gateway: socket(STREAM, RFCOMM): Protocol not supported (93)
Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset unit: socket(STREAM, RFCOMM): Protocol not supported (93)
Feb 23 23:11:21 starship bluetoothd[1825]: Controller resume with wake event 0x0
Feb 24 09:05:29 starship bluetoothd[1825]: Controller resume with wake event 0x0


I do notice that even on 5.16 kernel, I am not able to use the HSF or whatever low quality bi-directional bluetooh protocol is called for my headset. Used to work, I don't
know what broke it, likely not related to this.

I also updated bluez to 5.6 by installing fedora 33 package, and initiallly it seems to work, but after reboot, the issue shows up again.
Looks like sometimes the scan does work. So far I wasn't able to make it work even once since then.
Reloading btusb doesn't help.
Can't install newer package due to deps on glib sadly. I might be able to compile it from source, but that will take some time to figure
out how the components of the bluez stack are connected together.

For the reference I have 'Intel Corp. AX200 Bluetooth' and I have the same device on my AMD laptop and both have USB ID 8087:0029
My AMD laptop has Fedora 34 though.

Best regards,
	Maxim Levitsky




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-24 13:01   ` Maxim Levitsky
@ 2022-02-24 15:21     ` Luiz Augusto von Dentz
  2022-02-24 15:30       ` Maxim Levitsky
  2022-02-24 15:43     ` Paul Menzel
  1 sibling, 1 reply; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-24 15:21 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

Hi Maxim,

On Thu, Feb 24, 2022 at 5:01 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > Hi Maxim,
> >
> > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > > Today I updated to a new kernel and I am bisecting few regressions:
> > >
> > > I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
> > > and then shows only the paired devices and no scan results.
> > >
> > > I bisected this to this commit.
> > >
> > > For reference I am running fairly old fedora 32 on this machine, and thus I have
> > > bluez 5.55 and stock GNOME from fedora 32.
> > >
> > > I can provide any more info on anything if required and/or test patches.
> > >
> > > I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
> > > which makes sense.
> > >
> > > I tried merging bluetooth-next master as of today,
> > > into my kernel but no noticeable improvement.
> >
> > Is there any error being reported in bluetoothd, does bluetoothctl
> > have the same problem? It would be great if you could provide an HCI
> > trace of the problem.
> >
> I haven't used bluetoothd much but that is what I see:
>
> [mlevitsk@starship ~]$bluetoothctl
> Agent registered
> [bluetooth]# scan on
> [bluetooth]# scan on
> Failed to start discovery: org.bluez.Error.InProgress
> [bluetooth]# scan on
> Failed to start discovery: org.bluez.Error.InProgress
> [bluetooth]#
>
> No results show up, attempting to scan again shows the InProgres error.

Please collect the HCI with btmon.

> On my AMD laptop on the other hand (also runs the same 5.17-rc5 kernel),
> after 'scan on' I start seeing lots of scan results of various devices near me.
>
>
> journalctl -u bluetooth -b0
>
> -- Logs begin at Wed 2022-01-12 11:47:00 IST, end at Thu 2022-02-24 14:50:59 IST. --
> Feb 23 22:16:45 starship systemd[1]: Starting Bluetooth service...
> Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth daemon 5.60
> Feb 23 22:16:45 starship systemd[1]: Started Bluetooth service.
> Feb 23 22:16:45 starship bluetoothd[1825]: Starting SDP server
> Feb 23 22:16:45 starship bluetoothd[1825]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
> Feb 23 22:16:45 starship bluetoothd[1825]: src/plugin.c:plugin_init() System does not support network plugin
> Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth management interface 1.21 initialized
> Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/sbc
> Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/sbc
> Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset Voice gateway: socket(STREAM, RFCOMM): Protocol not supported (93)
> Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset unit: socket(STREAM, RFCOMM): Protocol not supported (93)
> Feb 23 23:11:21 starship bluetoothd[1825]: Controller resume with wake event 0x0
> Feb 24 09:05:29 starship bluetoothd[1825]: Controller resume with wake event 0x0
>
>
> I do notice that even on 5.16 kernel, I am not able to use the HSF or whatever low quality bi-directional bluetooh protocol is called for my headset. Used to work, I don't
> know what broke it, likely not related to this.

Weird, looks like RFCOMM is not available in your system.

> I also updated bluez to 5.6 by installing fedora 33 package, and initiallly it seems to work, but after reboot, the issue shows up again.
> Looks like sometimes the scan does work. So far I wasn't able to make it work even once since then.
> Reloading btusb doesn't help.
> Can't install newer package due to deps on glib sadly. I might be able to compile it from source, but that will take some time to figure
> out how the components of the bluez stack are connected together.
>
> For the reference I have 'Intel Corp. AX200 Bluetooth' and I have the same device on my AMD laptop and both have USB ID 8087:0029
> My AMD laptop has Fedora 34 though.
>
> Best regards,
>         Maxim Levitsky
>
>
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-24 15:21     ` Luiz Augusto von Dentz
@ 2022-02-24 15:30       ` Maxim Levitsky
  0 siblings, 0 replies; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-24 15:30 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 6128 bytes --]

On Thu, 2022-02-24 at 07:21 -0800, Luiz Augusto von Dentz wrote:
> Hi Maxim,
> 
> On Thu, Feb 24, 2022 at 5:01 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > Hi Maxim,
> > > 
> > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > > > Today I updated to a new kernel and I am bisecting few regressions:
> > > > 
> > > > I noticed that if I open GNOME's bluetooth setting, it hangs for like minute or so,
> > > > and then shows only the paired devices and no scan results.
> > > > 
> > > > I bisected this to this commit.
> > > > 
> > > > For reference I am running fairly old fedora 32 on this machine, and thus I have
> > > > bluez 5.55 and stock GNOME from fedora 32.
> > > > 
> > > > I can provide any more info on anything if required and/or test patches.
> > > > 
> > > > I wasn't able tor revert this commit as it is part of a bigger rewrite of scanning
> > > > which makes sense.
> > > > 
> > > > I tried merging bluetooth-next master as of today,
> > > > into my kernel but no noticeable improvement.
> > > 
> > > Is there any error being reported in bluetoothd, does bluetoothctl
> > > have the same problem? It would be great if you could provide an HCI
> > > trace of the problem.
> > > 
> > I haven't used bluetoothd much but that is what I see:
> > 
> > [mlevitsk@starship ~]$bluetoothctl
> > Agent registered
> > [bluetooth]# scan on
> > [bluetooth]# scan on
> > Failed to start discovery: org.bluez.Error.InProgress
> > [bluetooth]# scan on
> > Failed to start discovery: org.bluez.Error.InProgress
> > [bluetooth]#
> > 
> > No results show up, attempting to scan again shows the InProgres error.
> 
> Please collect the HCI with btmon.

Again nothing :-( (this while doing scan with bluetoothctl)

[mlevitsk@starship ~/Kernel/br-starship/src]$sudo btmon 
Bluetooth monitor ver 5.60
= Note: Linux version 5.17.0-rc5.unstable (x86_64)                                                                                                                                             0.800153
= Note: Bluetooth subsystem version 2.22                                                                                                                                                       0.800155
= New Index: 50:EB:71:0F:16:B1 (Primary,USB,hci0)                                                                                                                                       [hci0] 0.800156
= Open Index: 50:EB:71:0F:16:B1                                                                                                                                                         [hci0] 0.800156
= Index Info: 50:EB:71:0F:16:B1 (Intel Corp.)                                                                                                                                           [hci0] 0.800157
@ RAW Open: hcidump version 2.22                                                                                                                                               {0x0002} [hci0] 0.800157
@ MGMT Open: bluetoothd (privileged) version 1.21                                                                                                                                     {0x0001} 0.800158


> 
> > On my AMD laptop on the other hand (also runs the same 5.17-rc5 kernel),
> > after 'scan on' I start seeing lots of scan results of various devices near me.
> > 
> > 
> > journalctl -u bluetooth -b0
> > 
> > -- Logs begin at Wed 2022-01-12 11:47:00 IST, end at Thu 2022-02-24 14:50:59 IST. --
> > Feb 23 22:16:45 starship systemd[1]: Starting Bluetooth service...
> > Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth daemon 5.60
> > Feb 23 22:16:45 starship systemd[1]: Started Bluetooth service.
> > Feb 23 22:16:45 starship bluetoothd[1825]: Starting SDP server
> > Feb 23 22:16:45 starship bluetoothd[1825]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
> > Feb 23 22:16:45 starship bluetoothd[1825]: src/plugin.c:plugin_init() System does not support network plugin
> > Feb 23 22:16:45 starship bluetoothd[1825]: Bluetooth management interface 1.21 initialized
> > Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/sbc
> > Feb 23 22:16:56 starship bluetoothd[1825]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/sbc
> > Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset Voice gateway: socket(STREAM, RFCOMM): Protocol not supported (93)
> > Feb 23 22:16:56 starship bluetoothd[1825]: src/profile.c:ext_start_servers() RFCOMM server failed for Headset unit: socket(STREAM, RFCOMM): Protocol not supported (93)
> > Feb 23 23:11:21 starship bluetoothd[1825]: Controller resume with wake event 0x0
> > Feb 24 09:05:29 starship bluetoothd[1825]: Controller resume with wake event 0x0
> > 
> > 
> > I do notice that even on 5.16 kernel, I am not able to use the HSF or whatever low quality bi-directional bluetooh protocol is called for my headset. Used to work, I don't
> > know what broke it, likely not related to this.
> 
> Weird, looks like RFCOMM is not available in your system.

I attached my .config just in case

I do have

CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y

> 
> > I also updated bluez to 5.6 by installing fedora 33 package, and initiallly it seems to work, but after reboot, the issue shows up again.
> > Looks like sometimes the scan does work. So far I wasn't able to make it work even once since then.
> > Reloading btusb doesn't help.
> > Can't install newer package due to deps on glib sadly. I might be able to compile it from source, but that will take some time to figure
> > out how the components of the bluez stack are connected together.
> > 
> > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have the same device on my AMD laptop and both have USB ID 8087:0029
> > My AMD laptop has Fedora 34 though.
> > 
> > Best regards,
> >         Maxim Levitsky
> > 
> > 
> > 
> 
> 

Best regards,
	Maxim Levitsky

[-- Attachment #2: .config --]
[-- Type: application/x-config, Size: 146171 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-24 13:01   ` Maxim Levitsky
  2022-02-24 15:21     ` Luiz Augusto von Dentz
@ 2022-02-24 15:43     ` Paul Menzel
  2022-02-24 16:29       ` Maxim Levitsky
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Menzel @ 2022-02-24 15:43 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Luiz Augusto von Dentz, Luiz Augusto von Dentz, Marcel Holtmann,
	linux-bluetooth

Dear Maxim,


Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:

>> On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
>>> Today I updated to a new kernel and I am bisecting few 
>>> regressions:

[…]

> I do notice that even on 5.16 kernel, I am not able to use the HSF
> or whatever low quality bi-directional bluetooh protocol is called
> for my headset. Used to work, I don't know what broke it, likely not 
> related to this.
> 
> I also updated bluez to 5.6 by installing fedora 33 package, and 
> initially it seems to work, but after reboot, the issue shows up 
> again. Looks like sometimes the scan does work. So far I wasn't able 
> to make it work even once since then. Reloading btusb doesn't help. 
> Can't install newer package due to deps on glib sadly. I might be 
> able to compile it from source, but that will take some time to 
> figure out how the components of the bluez stack are connected 
> together.
> 
> For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> the same device on my AMD laptop and both have USB ID 8087:0029 My
> AMD laptop has Fedora 34 though.

Sorry, I lost track, if it’s still about one regression, you 
successfully bisected or not.

Anyway, passing through the USB Bluetooth device to QEMU helped me [1], 
and might help you to overcome the dependency problems. (My steps 
actually worked, but turned out the Linux kernel commit I tested with 
had another regression not making the Bluetooth controller initialize.)

Marcel also replied, he is using btproxy to debug issues, but I did not 
try it, as it wasn’t clear to me how to get it working easily, and he 
also wrote something about non-public patches.


Kind regards,

Paul


[1]: 
https://lore.kernel.org/linux-bluetooth/5891f0d5-8d51-9da5-7663-718f301490b1@molgen.mpg.de/T/#u

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-24 15:43     ` Paul Menzel
@ 2022-02-24 16:29       ` Maxim Levitsky
  2022-02-25 22:27         ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-24 16:29 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Luiz Augusto von Dentz, Luiz Augusto von Dentz, Marcel Holtmann,
	linux-bluetooth

On Thu, 2022-02-24 at 16:43 +0100, Paul Menzel wrote:
> Dear Maxim,
> 
> 
> Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
> > > > Today I updated to a new kernel and I am bisecting few 
> > > > regressions:
> 
> […]
> 
> > I do notice that even on 5.16 kernel, I am not able to use the HSF
> > or whatever low quality bi-directional bluetooh protocol is called
> > for my headset. Used to work, I don't know what broke it, likely not 
> > related to this.
> > 
> > I also updated bluez to 5.6 by installing fedora 33 package, and 
> > initially it seems to work, but after reboot, the issue shows up 
> > again. Looks like sometimes the scan does work. So far I wasn't able 
> > to make it work even once since then. Reloading btusb doesn't help. 
> > Can't install newer package due to deps on glib sadly. I might be 
> > able to compile it from source, but that will take some time to 
> > figure out how the components of the bluez stack are connected 
> > together.
> > 
> > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> > the same device on my AMD laptop and both have USB ID 8087:0029 My
> > AMD laptop has Fedora 34 though.
> 
> Sorry, I lost track, if it’s still about one regression, you 
> successfully bisected or not.
yes, I sucessfully bisected the regression. 1 commit before mentioned commit
the bluetooth works for me, and not after it, with same .config and everything else.


> 
> Anyway, passing through the USB Bluetooth device to QEMU helped me [1], 
> and might help you to overcome the dependency problems. (My steps 
> actually worked, but turned out the Linux kernel commit I tested with 
> had another regression not making the Bluetooth controller initialize.)
First thing I tried, but alas it worked for me in fedora 34 VM I tried to test with
(with the same 5.17-rc5 kernel, albeet with different .config, more tailored for a VM).

Best regards,
	Maxim Levitsky

> 
> Marcel also replied, he is using btproxy to debug issues, but I did not 
> try it, as it wasn’t clear to me how to get it working easily, and he 
> also wrote something about non-public patches.
> 
> 
> Kind regards,
> 
> Paul
> 
> 
> [1]: 
> https://lore.kernel.org/linux-bluetooth/5891f0d5-8d51-9da5-7663-718f301490b1@molgen.mpg.de/T/#u
> 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-24 16:29       ` Maxim Levitsky
@ 2022-02-25 22:27         ` Luiz Augusto von Dentz
  2022-02-28 12:08           ` Maxim Levitsky
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-25 22:27 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Paul Menzel, Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

Hi Maxim,

On Thu, Feb 24, 2022 at 8:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> On Thu, 2022-02-24 at 16:43 +0100, Paul Menzel wrote:
> > Dear Maxim,
> >
> >
> > Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> > > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
> > > > > Today I updated to a new kernel and I am bisecting few
> > > > > regressions:
> >
> > […]
> >
> > > I do notice that even on 5.16 kernel, I am not able to use the HSF
> > > or whatever low quality bi-directional bluetooh protocol is called
> > > for my headset. Used to work, I don't know what broke it, likely not
> > > related to this.
> > >
> > > I also updated bluez to 5.6 by installing fedora 33 package, and
> > > initially it seems to work, but after reboot, the issue shows up
> > > again. Looks like sometimes the scan does work. So far I wasn't able
> > > to make it work even once since then. Reloading btusb doesn't help.
> > > Can't install newer package due to deps on glib sadly. I might be
> > > able to compile it from source, but that will take some time to
> > > figure out how the components of the bluez stack are connected
> > > together.
> > >
> > > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> > > the same device on my AMD laptop and both have USB ID 8087:0029 My
> > > AMD laptop has Fedora 34 though.
> >
> > Sorry, I lost track, if it’s still about one regression, you
> > successfully bisected or not.
> yes, I sucessfully bisected the regression. 1 commit before mentioned commit
> the bluetooth works for me, and not after it, with same .config and everything else.
>
>
> >
> > Anyway, passing through the USB Bluetooth device to QEMU helped me [1],
> > and might help you to overcome the dependency problems. (My steps
> > actually worked, but turned out the Linux kernel commit I tested with
> > had another regression not making the Bluetooth controller initialize.)
> First thing I tried, but alas it worked for me in fedora 34 VM I tried to test with
> (with the same 5.17-rc5 kernel, albeet with different .config, more tailored for a VM).

Give it a try with:

https://patchwork.kernel.org/project/bluetooth/patch/20220224232950.56204-1-brian.gix@intel.com/

Btw, are there any other users of the MGMT socket? Or it is just bluetoothd?

> Best regards,
>         Maxim Levitsky
>
> >
> > Marcel also replied, he is using btproxy to debug issues, but I did not
> > try it, as it wasn’t clear to me how to get it working easily, and he
> > also wrote something about non-public patches.
> >
> >
> > Kind regards,
> >
> > Paul
> >
> >
> > [1]:
> > https://lore.kernel.org/linux-bluetooth/5891f0d5-8d51-9da5-7663-718f301490b1@molgen.mpg.de/T/#u
> >
>
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-25 22:27         ` Luiz Augusto von Dentz
@ 2022-02-28 12:08           ` Maxim Levitsky
  2022-02-28 18:53             ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-28 12:08 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Paul Menzel, Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

On Fri, 2022-02-25 at 14:27 -0800, Luiz Augusto von Dentz wrote:
> Hi Maxim,
> 
> On Thu, Feb 24, 2022 at 8:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > On Thu, 2022-02-24 at 16:43 +0100, Paul Menzel wrote:
> > > Dear Maxim,
> > > 
> > > 
> > > Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> > > > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
> > > > > > Today I updated to a new kernel and I am bisecting few
> > > > > > regressions:
> > > 
> > > […]
> > > 
> > > > I do notice that even on 5.16 kernel, I am not able to use the HSF
> > > > or whatever low quality bi-directional bluetooh protocol is called
> > > > for my headset. Used to work, I don't know what broke it, likely not
> > > > related to this.
> > > > 
> > > > I also updated bluez to 5.6 by installing fedora 33 package, and
> > > > initially it seems to work, but after reboot, the issue shows up
> > > > again. Looks like sometimes the scan does work. So far I wasn't able
> > > > to make it work even once since then. Reloading btusb doesn't help.
> > > > Can't install newer package due to deps on glib sadly. I might be
> > > > able to compile it from source, but that will take some time to
> > > > figure out how the components of the bluez stack are connected
> > > > together.
> > > > 
> > > > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> > > > the same device on my AMD laptop and both have USB ID 8087:0029 My
> > > > AMD laptop has Fedora 34 though.
> > > 
> > > Sorry, I lost track, if it’s still about one regression, you
> > > successfully bisected or not.
> > yes, I sucessfully bisected the regression. 1 commit before mentioned commit
> > the bluetooth works for me, and not after it, with same .config and everything else.
> > 
> > 
> > > Anyway, passing through the USB Bluetooth device to QEMU helped me [1],
> > > and might help you to overcome the dependency problems. (My steps
> > > actually worked, but turned out the Linux kernel commit I tested with
> > > had another regression not making the Bluetooth controller initialize.)
> > First thing I tried, but alas it worked for me in fedora 34 VM I tried to test with
> > (with the same 5.17-rc5 kernel, albeet with different .config, more tailored for a VM).
> 
> Give it a try with:
> 
> https://patchwork.kernel.org/project/bluetooth/patch/20220224232950.56204-1-brian.gix@intel.com/

It does fix the issue! I can now see scan results in the GNOME bluetooth window.

However I get oops on attempt to reboot my system:

[   82.337829] CPU: 3 PID: 1841 Comm: bluetoothd Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
[   82.338507] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
[   82.339052] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
[   82.339467] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
84 00 00 00 00
[   82.340466] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
[   82.340779] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
[   82.341162] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
[   82.341572] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
[   82.341996] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
[   82.342401] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
[   82.342827] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
[   82.343276] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   82.343636] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
[   82.344061] Call Trace:
[   82.344230]  <TASK>
[   82.344376]  ? mgmt_pending_find+0x33/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[   82.344887]  set_powered+0x5f/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[   82.345358]  hci_sock_sendmsg+0x8da/0xa00 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[   82.345853]  sock_sendmsg+0x3a/0x80
[   82.346089]  sock_write_iter+0x93/0x100
[   82.346314]  do_iter_readv_writev+0x14a/0x1c0
[   82.346573]  do_iter_write+0x88/0x1c0
[   82.346814]  vfs_writev+0xae/0x180
[   82.347017]  ? __seccomp_filter+0x2ec/0x3c0
[   82.347263]  ? wake_up_q+0xc0/0xc0
[   82.347499]  do_writev+0xe5/0x140
[   82.347699]  __x64_sys_writev+0x1c/0x40
[   82.347923]  do_syscall_64+0x35/0x80
[   82.348166]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[   82.348457] RIP: 0033:0x7f11d1ee1477
[   82.348685] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c
48 89 74 24 10
[   82.349682] RSP: 002b:00007ffe34263108 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
[   82.350111] RAX: ffffffffffffffda RBX: 00007ffe34263130 RCX: 00007f11d1ee1477
[   82.350499] RDX: 0000000000000001 RSI: 00007ffe34263130 RDI: 0000000000000008
[   82.350909] RBP: 0000000000000008 R08: 0000562c1d1f5610 R09: 0000000000000000
[   82.351313] R10: 0000000000000020 R11: 0000000000000246 R12: 0000562c1d1db7b0
[   82.351697] R13: 0000000000000000 R14: 0000562c1d1f5990 R15: 0000562c1d1f6ac0
[   82.352113]  </TASK>
[   82.352258] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof nvidia_uvm(PO) iwlmvm uvcvideo snd_hda_codec_hdmi mac80211 snd_hda_intel
kvm_amd videobuf2_vmalloc libarc4 nvidia(PO) videobuf2_memops snd_intel_dspcfg videobuf2_v4l2 kvm snd_usb_audio btusb videobuf2_common snd_hda_codec btrtl snd_usbmidi_lib iwlwifi btbcm snd_hwdep
snd_hda_core btintel irqbypass videodev snd_rawmidi xpad joydev input_leds mc ff_memless bluetooth pcspkr snd_pcm i2c_nvidia_gpu cfg80211 i2c_piix4 zenpower bfq rtc_cmos tpm_crb wmi tpm_tis
tpm_tis_core acpi_cpufreq sch_fq_codel binfmt_misc fuse ext4 mbcache jbd2 dm_crypt sd_mod uas usb_storage hid_generic usbhid amdgpu drm_ttm_helper ttm gpu_sched drm_kms_helper cfbfillrect syscopyarea
cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea cec rc_core ahci drm libahci drm_panel_orientation_quirks libata igb xhci_pci i2c_algo_bit ccp nvme xhci_hcd nvme_core t10_pi dm_mirror
dm_region_hash dm_log
[   82.352304]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
[   82.357257] ---[ end trace 0000000000000000 ]---
[   82.367400] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
[   82.367752] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
84 00 00 00 00
[   82.368753] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
[   82.369063] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
[   82.369451] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
[   82.369853] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
[   82.370236] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
[   82.370661] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
[   82.371064] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
[   82.371514] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   82.371849] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
[   82.377469] nfsd: last server has exited, flushing export cache
[   82.944148] traps: gsettings-helpe[6327] trap int3 ip:7ff04777e937 sp:7ffc87f7cd50 error:0 in libglib-2.0.so.0.6400.6[7ff047741000+86000]
 ...killed.
[   91.604592] Bluetooth: hci0: failed to disable LE scan: status 0x1f



That was when I was opening GNOME bluetooth window.
Later I rebooted without touching bluetooth and got this:


[ +10.357883] general protection fault, probably for non-canonical address 0xdead000000000108: 0000 [#1] SMP
[  +0.000622] CPU: 45 PID: 1543 Comm: kworker/u129:1 Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
[  +0.000784] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
[  +0.000754] Workqueue: hci0 hci_cmd_sync_work [bluetooth]
[  +0.000446] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
[  +0.000419] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
00 ad de 48 89
[  +0.001156] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
[  +0.000370] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
[  +0.000465] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
[  +0.000479] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
[  +0.000488] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
[  +0.000450] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
[  +0.000488] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
[  +0.000526] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000388] CR2: 00007ff88d530000 CR3: 00000001795b4000 CR4: 0000000000350ee0
[  +0.000461] Call Trace:
[  +0.000188]  <TASK>
[  +0.000160]  ? mgmt_set_powered_complete+0x85/0x180 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[  +0.000633]  ? set_discoverable_sync+0x80/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[  +0.000619]  hci_cmd_sync_work+0xae/0x100 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[  +0.000581]  ? set_powered+0x1c0/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
[  +0.000547]  process_one_work+0x1e4/0x380
[  +0.003080]  worker_thread+0x50/0x400
[  +0.006538]  ? rescuer_thread+0x380/0x380
[  +0.007163]  kthread+0xcd/0x100
[  +0.005639]  ? kthread_complete_and_exit+0x40/0x40
[  +0.008561]  ret_from_fork+0x1f/0x30
[  +0.006391]  </TASK>
[  +0.000001] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof snd_hda_codec_hdmi iwlmvm uvcvideo nvidia_uvm(PO) snd_hda_intel
videobuf2_vmalloc mac80211 snd_usb_audio videobuf2_memops kvm_amd snd_intel_dspcfg libarc4 videobuf2_v4l2 snd_hd>
[  +0.003984]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
[  +0.169523] ---[ end trace 0000000000000000 ]---
[  +0.018131] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
[  +0.010460] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
00 ad de 48 89
[  +0.033495] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
[  +0.000003] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
[  +0.000001] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
[  +0.000001] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
[  +0.000001] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
[  +0.000001] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
[  +0.073048] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
[  +0.000002] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000001] CR2: 00007ff88d530000 CR3: 0000000002a0b000 CR4: 0000000000350ee0


> 
> Btw, are there any other users of the MGMT socket? Or it is just bluetoothd?

If you mean /dev/rfkill then it has a few users

bluetooth 1839                            root   11u      CHR             10,242         0t0          4 /dev/rfkill
wpa_suppl 2012                            root   10r      CHR             10,242         0t0          4 /dev/rfkill
wpa_suppl 2012                            root   15r      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 3631                             gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 3631 3639 gmain                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 3631 3642 gdbus                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347                        mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347                        mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347 5351 gmain             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347 5351 gmain             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347 5354 gdbus             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
gsd-rfkil 5347 5354 gdbus             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill


Best regards,
        Maxim Levitsky
> 
> > Best regards,
> >         Maxim Levitsky
> > 
> > > Marcel also replied, he is using btproxy to debug issues, but I did not
> > > try it, as it wasn’t clear to me how to get it working easily, and he
> > > also wrote something about non-public patches.
> > > 
> > > 
> > > Kind regards,
> > > 
> > > Paul
> > > 
> > > 
> > > [1]:
> > > https://lore.kernel.org/linux-bluetooth/5891f0d5-8d51-9da5-7663-718f301490b1@molgen.mpg.de/T/#u
> > > 
> 
> 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-28 12:08           ` Maxim Levitsky
@ 2022-02-28 18:53             ` Luiz Augusto von Dentz
  2022-02-28 19:28               ` Maxim Levitsky
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-28 18:53 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Paul Menzel, Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

Hi Maxim,

On Mon, Feb 28, 2022 at 4:08 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> On Fri, 2022-02-25 at 14:27 -0800, Luiz Augusto von Dentz wrote:
> > Hi Maxim,
> >
> > On Thu, Feb 24, 2022 at 8:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > > On Thu, 2022-02-24 at 16:43 +0100, Paul Menzel wrote:
> > > > Dear Maxim,
> > > >
> > > >
> > > > Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> > > > > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > > > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
> > > > > > > Today I updated to a new kernel and I am bisecting few
> > > > > > > regressions:
> > > >
> > > > […]
> > > >
> > > > > I do notice that even on 5.16 kernel, I am not able to use the HSF
> > > > > or whatever low quality bi-directional bluetooh protocol is called
> > > > > for my headset. Used to work, I don't know what broke it, likely not
> > > > > related to this.
> > > > >
> > > > > I also updated bluez to 5.6 by installing fedora 33 package, and
> > > > > initially it seems to work, but after reboot, the issue shows up
> > > > > again. Looks like sometimes the scan does work. So far I wasn't able
> > > > > to make it work even once since then. Reloading btusb doesn't help.
> > > > > Can't install newer package due to deps on glib sadly. I might be
> > > > > able to compile it from source, but that will take some time to
> > > > > figure out how the components of the bluez stack are connected
> > > > > together.
> > > > >
> > > > > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> > > > > the same device on my AMD laptop and both have USB ID 8087:0029 My
> > > > > AMD laptop has Fedora 34 though.
> > > >
> > > > Sorry, I lost track, if it’s still about one regression, you
> > > > successfully bisected or not.
> > > yes, I sucessfully bisected the regression. 1 commit before mentioned commit
> > > the bluetooth works for me, and not after it, with same .config and everything else.
> > >
> > >
> > > > Anyway, passing through the USB Bluetooth device to QEMU helped me [1],
> > > > and might help you to overcome the dependency problems. (My steps
> > > > actually worked, but turned out the Linux kernel commit I tested with
> > > > had another regression not making the Bluetooth controller initialize.)
> > > First thing I tried, but alas it worked for me in fedora 34 VM I tried to test with
> > > (with the same 5.17-rc5 kernel, albeet with different .config, more tailored for a VM).
> >
> > Give it a try with:
> >
> > https://patchwork.kernel.org/project/bluetooth/patch/20220224232950.56204-1-brian.gix@intel.com/
>
> It does fix the issue! I can now see scan results in the GNOME bluetooth window.
>
> However I get oops on attempt to reboot my system:
>
> [   82.337829] CPU: 3 PID: 1841 Comm: bluetoothd Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
> [   82.338507] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
> [   82.339052] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
> [   82.339467] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
> 84 00 00 00 00
> [   82.340466] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
> [   82.340779] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
> [   82.341162] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
> [   82.341572] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
> [   82.341996] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
> [   82.342401] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
> [   82.342827] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
> [   82.343276] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [   82.343636] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
> [   82.344061] Call Trace:
> [   82.344230]  <TASK>
> [   82.344376]  ? mgmt_pending_find+0x33/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [   82.344887]  set_powered+0x5f/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [   82.345358]  hci_sock_sendmsg+0x8da/0xa00 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [   82.345853]  sock_sendmsg+0x3a/0x80
> [   82.346089]  sock_write_iter+0x93/0x100
> [   82.346314]  do_iter_readv_writev+0x14a/0x1c0
> [   82.346573]  do_iter_write+0x88/0x1c0
> [   82.346814]  vfs_writev+0xae/0x180
> [   82.347017]  ? __seccomp_filter+0x2ec/0x3c0
> [   82.347263]  ? wake_up_q+0xc0/0xc0
> [   82.347499]  do_writev+0xe5/0x140
> [   82.347699]  __x64_sys_writev+0x1c/0x40
> [   82.347923]  do_syscall_64+0x35/0x80
> [   82.348166]  entry_SYSCALL_64_after_hwframe+0x44/0xae
> [   82.348457] RIP: 0033:0x7f11d1ee1477
> [   82.348685] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c
> 48 89 74 24 10
> [   82.349682] RSP: 002b:00007ffe34263108 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
> [   82.350111] RAX: ffffffffffffffda RBX: 00007ffe34263130 RCX: 00007f11d1ee1477
> [   82.350499] RDX: 0000000000000001 RSI: 00007ffe34263130 RDI: 0000000000000008
> [   82.350909] RBP: 0000000000000008 R08: 0000562c1d1f5610 R09: 0000000000000000
> [   82.351313] R10: 0000000000000020 R11: 0000000000000246 R12: 0000562c1d1db7b0
> [   82.351697] R13: 0000000000000000 R14: 0000562c1d1f5990 R15: 0000562c1d1f6ac0
> [   82.352113]  </TASK>
> [   82.352258] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof nvidia_uvm(PO) iwlmvm uvcvideo snd_hda_codec_hdmi mac80211 snd_hda_intel
> kvm_amd videobuf2_vmalloc libarc4 nvidia(PO) videobuf2_memops snd_intel_dspcfg videobuf2_v4l2 kvm snd_usb_audio btusb videobuf2_common snd_hda_codec btrtl snd_usbmidi_lib iwlwifi btbcm snd_hwdep
> snd_hda_core btintel irqbypass videodev snd_rawmidi xpad joydev input_leds mc ff_memless bluetooth pcspkr snd_pcm i2c_nvidia_gpu cfg80211 i2c_piix4 zenpower bfq rtc_cmos tpm_crb wmi tpm_tis
> tpm_tis_core acpi_cpufreq sch_fq_codel binfmt_misc fuse ext4 mbcache jbd2 dm_crypt sd_mod uas usb_storage hid_generic usbhid amdgpu drm_ttm_helper ttm gpu_sched drm_kms_helper cfbfillrect syscopyarea
> cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea cec rc_core ahci drm libahci drm_panel_orientation_quirks libata igb xhci_pci i2c_algo_bit ccp nvme xhci_hcd nvme_core t10_pi dm_mirror
> dm_region_hash dm_log
> [   82.352304]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
> [   82.357257] ---[ end trace 0000000000000000 ]---
> [   82.367400] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
> [   82.367752] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
> 84 00 00 00 00
> [   82.368753] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
> [   82.369063] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
> [   82.369451] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
> [   82.369853] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
> [   82.370236] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
> [   82.370661] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
> [   82.371064] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
> [   82.371514] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [   82.371849] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
> [   82.377469] nfsd: last server has exited, flushing export cache
> [   82.944148] traps: gsettings-helpe[6327] trap int3 ip:7ff04777e937 sp:7ffc87f7cd50 error:0 in libglib-2.0.so.0.6400.6[7ff047741000+86000]
>  ...killed.
> [   91.604592] Bluetooth: hci0: failed to disable LE scan: status 0x1f
>
>
>
> That was when I was opening GNOME bluetooth window.
> Later I rebooted without touching bluetooth and got this:
>
>
> [ +10.357883] general protection fault, probably for non-canonical address 0xdead000000000108: 0000 [#1] SMP
> [  +0.000622] CPU: 45 PID: 1543 Comm: kworker/u129:1 Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
> [  +0.000784] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
> [  +0.000754] Workqueue: hci0 hci_cmd_sync_work [bluetooth]
> [  +0.000446] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
> [  +0.000419] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
> 00 ad de 48 89
> [  +0.001156] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
> [  +0.000370] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
> [  +0.000465] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
> [  +0.000479] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
> [  +0.000488] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
> [  +0.000450] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
> [  +0.000488] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
> [  +0.000526] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  +0.000388] CR2: 00007ff88d530000 CR3: 00000001795b4000 CR4: 0000000000350ee0
> [  +0.000461] Call Trace:
> [  +0.000188]  <TASK>
> [  +0.000160]  ? mgmt_set_powered_complete+0x85/0x180 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [  +0.000633]  ? set_discoverable_sync+0x80/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [  +0.000619]  hci_cmd_sync_work+0xae/0x100 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [  +0.000581]  ? set_powered+0x1c0/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> [  +0.000547]  process_one_work+0x1e4/0x380
> [  +0.003080]  worker_thread+0x50/0x400
> [  +0.006538]  ? rescuer_thread+0x380/0x380
> [  +0.007163]  kthread+0xcd/0x100
> [  +0.005639]  ? kthread_complete_and_exit+0x40/0x40
> [  +0.008561]  ret_from_fork+0x1f/0x30
> [  +0.006391]  </TASK>
> [  +0.000001] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof snd_hda_codec_hdmi iwlmvm uvcvideo nvidia_uvm(PO) snd_hda_intel
> videobuf2_vmalloc mac80211 snd_usb_audio videobuf2_memops kvm_amd snd_intel_dspcfg libarc4 videobuf2_v4l2 snd_hd>
> [  +0.003984]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
> [  +0.169523] ---[ end trace 0000000000000000 ]---
> [  +0.018131] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
> [  +0.010460] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
> 00 ad de 48 89
> [  +0.033495] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
> [  +0.000003] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
> [  +0.000001] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
> [  +0.000001] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
> [  +0.000001] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
> [  +0.000001] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
> [  +0.073048] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
> [  +0.000002] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  +0.000001] CR2: 00007ff88d530000 CR3: 0000000002a0b000 CR4: 0000000000350ee0

Try the v2:

https://patchwork.kernel.org/project/bluetooth/patch/20220228173918.524733-1-brian.gix@intel.com/

If that fixes it please respond with Tested-by (perhaps we also need
some tag for the regression tracking as well?)

>
> >
> > Btw, are there any other users of the MGMT socket? Or it is just bluetoothd?
>
> If you mean /dev/rfkill then it has a few users
>
> bluetooth 1839                            root   11u      CHR             10,242         0t0          4 /dev/rfkill
> wpa_suppl 2012                            root   10r      CHR             10,242         0t0          4 /dev/rfkill
> wpa_suppl 2012                            root   15r      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 3631                             gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 3631 3639 gmain                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 3631 3642 gdbus                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347                        mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347                        mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347 5351 gmain             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347 5351 gmain             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347 5354 gdbus             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> gsd-rfkil 5347 5354 gdbus             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system
  2022-02-28 18:53             ` Luiz Augusto von Dentz
@ 2022-02-28 19:28               ` Maxim Levitsky
  0 siblings, 0 replies; 12+ messages in thread
From: Maxim Levitsky @ 2022-02-28 19:28 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Paul Menzel, Luiz Augusto von Dentz, Marcel Holtmann, linux-bluetooth

On Mon, 2022-02-28 at 10:53 -0800, Luiz Augusto von Dentz wrote:
> Hi Maxim,
> 
> On Mon, Feb 28, 2022 at 4:08 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > On Fri, 2022-02-25 at 14:27 -0800, Luiz Augusto von Dentz wrote:
> > > Hi Maxim,
> > > 
> > > On Thu, Feb 24, 2022 at 8:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote:
> > > > On Thu, 2022-02-24 at 16:43 +0100, Paul Menzel wrote:
> > > > > Dear Maxim,
> > > > > 
> > > > > 
> > > > > Am 24.02.22 um 14:01 schrieb Maxim Levitsky:
> > > > > > On Tue, 2022-02-22 at 10:35 -0800, Luiz Augusto von Dentz wrote:
> > > > > > > On Mon, Feb 21, 2022 at 7:14 PM Maxim Levitsky wrote:
> > > > > > > > Today I updated to a new kernel and I am bisecting few
> > > > > > > > regressions:
> > > > > 
> > > > > […]
> > > > > 
> > > > > > I do notice that even on 5.16 kernel, I am not able to use the HSF
> > > > > > or whatever low quality bi-directional bluetooh protocol is called
> > > > > > for my headset. Used to work, I don't know what broke it, likely not
> > > > > > related to this.
> > > > > > 
> > > > > > I also updated bluez to 5.6 by installing fedora 33 package, and
> > > > > > initially it seems to work, but after reboot, the issue shows up
> > > > > > again. Looks like sometimes the scan does work. So far I wasn't able
> > > > > > to make it work even once since then. Reloading btusb doesn't help.
> > > > > > Can't install newer package due to deps on glib sadly. I might be
> > > > > > able to compile it from source, but that will take some time to
> > > > > > figure out how the components of the bluez stack are connected
> > > > > > together.
> > > > > > 
> > > > > > For the reference I have 'Intel Corp. AX200 Bluetooth' and I have
> > > > > > the same device on my AMD laptop and both have USB ID 8087:0029 My
> > > > > > AMD laptop has Fedora 34 though.
> > > > > 
> > > > > Sorry, I lost track, if it’s still about one regression, you
> > > > > successfully bisected or not.
> > > > yes, I sucessfully bisected the regression. 1 commit before mentioned commit
> > > > the bluetooth works for me, and not after it, with same .config and everything else.
> > > > 
> > > > 
> > > > > Anyway, passing through the USB Bluetooth device to QEMU helped me [1],
> > > > > and might help you to overcome the dependency problems. (My steps
> > > > > actually worked, but turned out the Linux kernel commit I tested with
> > > > > had another regression not making the Bluetooth controller initialize.)
> > > > First thing I tried, but alas it worked for me in fedora 34 VM I tried to test with
> > > > (with the same 5.17-rc5 kernel, albeet with different .config, more tailored for a VM).
> > > 
> > > Give it a try with:
> > > 
> > > https://patchwork.kernel.org/project/bluetooth/patch/20220224232950.56204-1-brian.gix@intel.com/
> > 
> > It does fix the issue! I can now see scan results in the GNOME bluetooth window.
> > 
> > However I get oops on attempt to reboot my system:
> > 
> > [   82.337829] CPU: 3 PID: 1841 Comm: bluetoothd Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
> > [   82.338507] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
> > [   82.339052] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
> > [   82.339467] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
> > 84 00 00 00 00
> > [   82.340466] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
> > [   82.340779] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
> > [   82.341162] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
> > [   82.341572] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
> > [   82.341996] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
> > [   82.342401] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
> > [   82.342827] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
> > [   82.343276] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [   82.343636] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
> > [   82.344061] Call Trace:
> > [   82.344230]  <TASK>
> > [   82.344376]  ? mgmt_pending_find+0x33/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [   82.344887]  set_powered+0x5f/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [   82.345358]  hci_sock_sendmsg+0x8da/0xa00 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [   82.345853]  sock_sendmsg+0x3a/0x80
> > [   82.346089]  sock_write_iter+0x93/0x100
> > [   82.346314]  do_iter_readv_writev+0x14a/0x1c0
> > [   82.346573]  do_iter_write+0x88/0x1c0
> > [   82.346814]  vfs_writev+0xae/0x180
> > [   82.347017]  ? __seccomp_filter+0x2ec/0x3c0
> > [   82.347263]  ? wake_up_q+0xc0/0xc0
> > [   82.347499]  do_writev+0xe5/0x140
> > [   82.347699]  __x64_sys_writev+0x1c/0x40
> > [   82.347923]  do_syscall_64+0x35/0x80
> > [   82.348166]  entry_SYSCALL_64_after_hwframe+0x44/0xae
> > [   82.348457] RIP: 0033:0x7f11d1ee1477
> > [   82.348685] Code: 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c
> > 48 89 74 24 10
> > [   82.349682] RSP: 002b:00007ffe34263108 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
> > [   82.350111] RAX: ffffffffffffffda RBX: 00007ffe34263130 RCX: 00007f11d1ee1477
> > [   82.350499] RDX: 0000000000000001 RSI: 00007ffe34263130 RDI: 0000000000000008
> > [   82.350909] RBP: 0000000000000008 R08: 0000562c1d1f5610 R09: 0000000000000000
> > [   82.351313] R10: 0000000000000020 R11: 0000000000000246 R12: 0000562c1d1db7b0
> > [   82.351697] R13: 0000000000000000 R14: 0000562c1d1f5990 R15: 0000562c1d1f6ac0
> > [   82.352113]  </TASK>
> > [   82.352258] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof nvidia_uvm(PO) iwlmvm uvcvideo snd_hda_codec_hdmi mac80211 snd_hda_intel
> > kvm_amd videobuf2_vmalloc libarc4 nvidia(PO) videobuf2_memops snd_intel_dspcfg videobuf2_v4l2 kvm snd_usb_audio btusb videobuf2_common snd_hda_codec btrtl snd_usbmidi_lib iwlwifi btbcm snd_hwdep
> > snd_hda_core btintel irqbypass videodev snd_rawmidi xpad joydev input_leds mc ff_memless bluetooth pcspkr snd_pcm i2c_nvidia_gpu cfg80211 i2c_piix4 zenpower bfq rtc_cmos tpm_crb wmi tpm_tis
> > tpm_tis_core acpi_cpufreq sch_fq_codel binfmt_misc fuse ext4 mbcache jbd2 dm_crypt sd_mod uas usb_storage hid_generic usbhid amdgpu drm_ttm_helper ttm gpu_sched drm_kms_helper cfbfillrect syscopyarea
> > cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea cec rc_core ahci drm libahci drm_panel_orientation_quirks libata igb xhci_pci i2c_algo_bit ccp nvme xhci_hcd nvme_core t10_pi dm_mirror
> > dm_region_hash dm_log
> > [   82.352304]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
> > [   82.357257] ---[ end trace 0000000000000000 ]---
> > [   82.367400] RIP: 0010:hci_sock_get_channel+0x6/0x40 [bluetooth]
> > [   82.367752] Code: 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 55 <0f> b7 87 52 03 00 00 48 89 e5 5d c3 66 66 2e 0f 1f
> > 84 00 00 00 00
> > [   82.368753] RSP: 0018:ffffc90003ef3bd8 EFLAGS: 00010212
> > [   82.369063] RAX: 0000000000000000 RBX: ffff8881021e8bf8 RCX: 0000000000000001
> > [   82.369451] RDX: ffff8881021e8000 RSI: 0000000000000005 RDI: 70740115000e0e7c
> > [   82.369853] RBP: ffffc90003ef3c08 R08: 0000000000000005 R09: 0000000000000001
> > [   82.370236] R10: ffffffffa0f1d598 R11: 0000000000000001 R12: ffff888112633c00
> > [   82.370661] R13: 0000000000000003 R14: 0000000000000005 R15: ffff8881021e8010
> > [   82.371064] FS:  00007f11d1aefc00(0000) GS:ffff8897ee0c0000(0000) knlGS:0000000000000000
> > [   82.371514] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [   82.371849] CR2: 0000559199c81430 CR3: 0000000135cf3000 CR4: 0000000000350ee0
> > [   82.377469] nfsd: last server has exited, flushing export cache
> > [   82.944148] traps: gsettings-helpe[6327] trap int3 ip:7ff04777e937 sp:7ffc87f7cd50 error:0 in libglib-2.0.so.0.6400.6[7ff047741000+86000]
> >  ...killed.
> > [   91.604592] Bluetooth: hci0: failed to disable LE scan: status 0x1f
> > 
> > 
> > 
> > That was when I was opening GNOME bluetooth window.
> > Later I rebooted without touching bluetooth and got this:
> > 
> > 
> > [ +10.357883] general protection fault, probably for non-canonical address 0xdead000000000108: 0000 [#1] SMP
> > [  +0.000622] CPU: 45 PID: 1543 Comm: kworker/u129:1 Tainted: P           O      5.17.0-rc5.unstable #4 206ccbbb843ff077f6623bff67370ced7692b32a
> > [  +0.000784] Hardware name: Gigabyte Technology Co., Ltd. TRX40 DESIGNARE/TRX40 DESIGNARE, BIOS F5a 10/20/2021
> > [  +0.000754] Workqueue: hci0 hci_cmd_sync_work [bluetooth]
> > [  +0.000446] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
> > [  +0.000419] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
> > 00 ad de 48 89
> > [  +0.001156] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
> > [  +0.000370] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
> > [  +0.000465] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
> > [  +0.000479] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
> > [  +0.000488] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
> > [  +0.000450] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
> > [  +0.000488] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
> > [  +0.000526] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [  +0.000388] CR2: 00007ff88d530000 CR3: 00000001795b4000 CR4: 0000000000350ee0
> > [  +0.000461] Call Trace:
> > [  +0.000188]  <TASK>
> > [  +0.000160]  ? mgmt_set_powered_complete+0x85/0x180 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [  +0.000633]  ? set_discoverable_sync+0x80/0x80 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [  +0.000619]  hci_cmd_sync_work+0xae/0x100 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [  +0.000581]  ? set_powered+0x1c0/0x1c0 [bluetooth 6d0716e174185388977fcac3dab934dbbf4db47d]
> > [  +0.000547]  process_one_work+0x1e4/0x380
> > [  +0.003080]  worker_thread+0x50/0x400
> > [  +0.006538]  ? rescuer_thread+0x380/0x380
> > [  +0.007163]  kthread+0xcd/0x100
> > [  +0.005639]  ? kthread_complete_and_exit+0x40/0x40
> > [  +0.008561]  ret_from_fork+0x1f/0x30
> > [  +0.006391]  </TASK>
> > [  +0.000001] Modules linked in: xt_state xt_conntrack ip6table_filter ip6_tables tun pmbus pmbus_core ee1004 jc42 wmi_bmof snd_hda_codec_hdmi iwlmvm uvcvideo nvidia_uvm(PO) snd_hda_intel
> > videobuf2_vmalloc mac80211 snd_usb_audio videobuf2_memops kvm_amd snd_intel_dspcfg libarc4 videobuf2_v4l2 snd_hd>
> > [  +0.003984]  thunderbolt vendor_reset(O) nbd usbmon it87 hwmon_vid i2c_dev i2c_core autofs4
> > [  +0.169523] ---[ end trace 0000000000000000 ]---
> > [  +0.018131] RIP: 0010:mgmt_pending_remove+0xd/0x40 [bluetooth]
> > [  +0.010460] Code: 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 <48> 89 42 08 48 89 10 48 89 e5 48 b8 00 01 00 00 00
> > 00 ad de 48 89
> > [  +0.033495] RSP: 0018:ffffc90003bb7df8 EFLAGS: 00010282
> > [  +0.000003] RAX: dead000000000122 RBX: ffff888106c51c00 RCX: 0000000000003e6a
> > [  +0.000001] RDX: dead000000000100 RSI: ffff888107107b00 RDI: ffff88813a9192a0
> > [  +0.000001] RBP: ffffc90003bb7e40 R08: 16d7f151a20cad7d R09: 0000000000000006
> > [  +0.000001] R10: 0000000000000300 R11: ffffffff82a06460 R12: ffff88813a9192a0
> > [  +0.000001] R13: ffff888106c51c00 R14: ffff88813e7a8000 R15: 0000000000000005
> > [  +0.073048] FS:  0000000000000000(0000) GS:ffff8897eeb40000(0000) knlGS:0000000000000000
> > [  +0.000002] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [  +0.000001] CR2: 00007ff88d530000 CR3: 0000000002a0b000 CR4: 0000000000350ee0
> 
> Try the v2:
> 
> https://patchwork.kernel.org/project/bluetooth/patch/20220228173918.524733-1-brian.gix@intel.com/
> 
> If that fixes it please respond with Tested-by (perhaps we also need
> some tag for the regression tracking as well?)

Yes! it does work and no more kernel oops.
Tested by few reboots, once after doing a scan,
once without doing a scan.

Tested-by: Maxim Levitsky <mlevitsk@redhat.com>

Thank you very much for fixing this regression!

Best regards,
	Maxim Levitsky

> 
> > > Btw, are there any other users of the MGMT socket? Or it is just bluetoothd?
> > 
> > If you mean /dev/rfkill then it has a few users
> > 
> > bluetooth 1839                            root   11u      CHR             10,242         0t0          4 /dev/rfkill
> > wpa_suppl 2012                            root   10r      CHR             10,242         0t0          4 /dev/rfkill
> > wpa_suppl 2012                            root   15r      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 3631                             gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 3631 3639 gmain                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 3631 3642 gdbus                  gdm    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347                        mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347                        mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347 5351 gmain             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347 5351 gmain             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347 5354 gdbus             mlevitsk    8u      CHR             10,242         0t0          4 /dev/rfkill
> > gsd-rfkil 5347 5354 gdbus             mlevitsk    9w      CHR             10,242         0t0          4 /dev/rfkill
> 
> 



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-28 19:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 22:37 Since commit e8907f76544ffe225ab95d70f7313267b1d0c76d bluetooth scanning stopped working on my system Maxim Levitsky
2022-02-22  6:27 ` Thorsten Leemhuis
2022-02-22 18:35 ` Luiz Augusto von Dentz
2022-02-24 13:01   ` Maxim Levitsky
2022-02-24 15:21     ` Luiz Augusto von Dentz
2022-02-24 15:30       ` Maxim Levitsky
2022-02-24 15:43     ` Paul Menzel
2022-02-24 16:29       ` Maxim Levitsky
2022-02-25 22:27         ` Luiz Augusto von Dentz
2022-02-28 12:08           ` Maxim Levitsky
2022-02-28 18:53             ` Luiz Augusto von Dentz
2022-02-28 19:28               ` Maxim Levitsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.