Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1336761pxm; Thu, 24 Feb 2022 00:47:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO9VHzTaKSUFFyQtJSAtpz/wW0XJ/sQDKisRYx8cxvYIrAfAb+N2xUONL9jnZke4bPiul4 X-Received: by 2002:a05:6a00:244b:b0:4c9:319e:ecb7 with SMTP id d11-20020a056a00244b00b004c9319eecb7mr1902003pfj.58.1645692439251; Thu, 24 Feb 2022 00:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645692439; cv=none; d=google.com; s=arc-20160816; b=RUbsIkAi3lLEJ+piZvBmpRYoUG7io7GBDQ8bqCCRZYTwatXmw04DVUTharBfaXulVT 84SjakYQsWrWst2C8SazlFJB2hw4xFVsrLN3rikfJ35yzt9c76rtJovXJ+EIQqpGmTHC JunXfeen9EN2WicamoeCYXm5kMzW/JMTt4eLtvS/3vC14ihpvwp3scyd33KKG7XXvXnK MntSTw3SWzX3h2F4DZ1tK2nkYL119+7B4/fNG0hH1u+Ymb3lLk/uKuFLNwuTosMjdUlV bop79Fa0eGPARD7n9yL+oZ+3er7YhPuYF+XeyAe5yIjhMCKcwmopl2GC1HhIAYCfEMgU fCIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=r7lNbImV3Z10ZjXcudhZazLv+AgZ55szaYV4Qs5t+7U=; b=t2OUjMfUMLgu8Tbg17JKwOzglfarf2nSceHxAngurwvdbsR9jUl4G6sU9hC768iapO iBIX40GYBgi7xBDcaVOni1y7vLdqUfRpo9n9DP9+vOWwlpcNBaOrAopV7+C5dejx9RLj To0rkUpE6Q5FTLB33ueE9cwjCEzgOF7n4vlNwaOLletSzsZjF2qrZhqHMtCU6gedhUMt wwLz0vCsQP9g/DTI384Dwq/01/egU/ycvi1XOah5bhSlhPn7Kuhb27zdseNYdCQVcpeN iT3I8HSEr9EV8oCxgNFCdnpVV8QePKzM9dmlBgRbEddtopR1+L3dqxXVauQGRCcN2s42 q1PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="GEEs/CQk"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11si1774466pls.252.2022.02.24.00.46.48; Thu, 24 Feb 2022 00:47:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="GEEs/CQk"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbiBXIRf (ORCPT + 99 others); Thu, 24 Feb 2022 03:17:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbiBXIRe (ORCPT ); Thu, 24 Feb 2022 03:17:34 -0500 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E78F427F1 for ; Thu, 24 Feb 2022 00:17:04 -0800 (PST) Received: by mail-yb1-xb33.google.com with SMTP id e140so2274512ybh.9 for ; Thu, 24 Feb 2022 00:17:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r7lNbImV3Z10ZjXcudhZazLv+AgZ55szaYV4Qs5t+7U=; b=GEEs/CQk895WuURbHz2ywOidmKSr0Ijokt//oWrBv2E62vDbTQhRYLZe5jsDx355I9 gcehldSJnuIx5Ajn2yXrUewxC+ZYc8O5z5Tl0mL8YPIO8kxF/DuWY3/0weSsCMAMeE8B slCH+2XRYfqX22P7ljs+pqHxJv4afi04YESe7uhCpQRXIpA+lQy5OF0/DLfg/lAP93O9 tNqxu6aZ3NcTbPVSv/6qs3lleh0z2o1fyVk0WDCNVGCF4AqKYJ2V9YgxA7p3RK9mbloT /qpZqnRRO2QO/Hmod6yrfavt3rreyBm1/qkmB05sMbnhwRjERoNoXs00HlKt72OVlh+f xP6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r7lNbImV3Z10ZjXcudhZazLv+AgZ55szaYV4Qs5t+7U=; b=184UzMNdwiwO2pEWHCYUuw4uGMC7nt+jsphFeJ0CU6pQkl3UvUMdtKZUl3ijGLuhQh gN7so4yfQf0vn4dyJH7q9Oc5qigJ9WP27jw6cP9KZADRfGT8A2OPSoFzoKSRD51Eb4Gx mFfED41sWMKYimdwQAjGXpAmJnfhQI9k8CM9VY/TVSa9Ij7kpAvSLt+83YvXhv+7xCg6 ICeOL2G+rNIAqmDCggxyhYoqCoGauW4qe4EtwmCGLqcrwu2SW8EyfvAXvzX/ET58+tg0 yX54qm2KBVhqOU+zNOIolJXJ28t+HhcLnXrQWSQ1zHBpes2aJgiSSKD/ntiQUF81It+D BxJA== X-Gm-Message-State: AOAM5336uQn+ZwHCRt04SbJLBko3KHj/LJEfuuSIFX82bvjpHE0uWKHd VC2q3on7C/oVtnfCfT5dESJT2fy9nmduXpcTJzciKFNot90= X-Received: by 2002:a25:9742:0:b0:61d:9526:ebc3 with SMTP id h2-20020a259742000000b0061d9526ebc3mr1425929ybo.578.1645690623295; Thu, 24 Feb 2022 00:17:03 -0800 (PST) MIME-Version: 1.0 References: <9ad505e1-7b59-7ebf-378b-23a6c0e25802@googlemail.com> <82216882-463a-8976-e6bc-4a8919107a31@googlemail.com> <2ce6175c-74ec-8469-80a5-374bd1429542@googlemail.com> In-Reply-To: <2ce6175c-74ec-8469-80a5-374bd1429542@googlemail.com> From: Luiz Augusto von Dentz Date: Thu, 24 Feb 2022 00:16:52 -0800 Message-ID: Subject: Re: bug kernel 5.17, qualcom and intel adapters, unable to reliably connect to bluetooth devices To: Chris Clayton Cc: Chris Murphy , Bluetooth Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Chris, On Wed, Feb 23, 2022 at 9:59 PM Chris Clayton wrote: > > > > On 23/02/2022 22:42, Chris Clayton wrote: > > Hi. > > > > > > > >> > >> We are starting to suspect this is not a new issue, it just become > >> easier to reproduce with newer kernels since the mgmt commands are now > >> handled by a different work/thread which probably takes longer to > >> respond hitting problems such as: > >> > >> https://github.com/bluez/bluez/issues/275#issuecomment-1020608282 > >> > >> This has been fixed by: > >> > >> https://github.com/bluez/bluez/commit/faad125c5505b941f06c54525616e192a6369208 > >> https://github.com/bluez/bluez/commit/5f378404bff6bbfea3f20e36535c494efa5066a5 > >> > > > > I cloned bluez, but that FTBFS, so I applied the two patches by hand. > > > > After the first boot, my bluetooth devices connected fine. But after a poweroff and boot, they didn't. Nor did they on > > the third and fourth boots, so the patches don't seem to be the answer. (They couldn't really be anyway because changes > > to the kernel have broken user-space which I understand is a big no no unless there is a really compelling reason.) > > > > I've gathered some diagnostics today and they are attached. They consist of 6 files containing the output from btmon and > > dmesg and the log file for the system daemons, which, of course, includes bluetoothd. There are 2 sets of these files - > > one from a boot that resulted in a system where my devices would not connect and another from a boot where they could > > s/would not connect and another/would connect and another/ > > > not connect. You'll note that the btmon log is empty for a failed connection. > > > > I also tried a bisection with v5.16 as good and v5.17-rc1 as bad. Unfortunately, I found several steps resulted in a > > kernel where bluetooth seemed to be substantially borked - to the extent that blueman was non-functional and clicking on > > the tray icon did not start up the blueman-manager application. Running with 5.17.0-0.rc5.102.fc37.x86_64 there doesn't seem to be any problems, well apart from LE device with Privacy/RPA: https://gist.github.com/Vudentz/5792f4989198c7f2994af2e31eb973af Ive tried suspend/resume a couple of times just to see if there is something odd going own, anyway I'm running with the latest userspace so perhaps I really need some old userspace to reproduce this. There might be something with name resolving though, it appears gnome don't show devices if they don't have a proper name (that is not their address) so perhaps that gives the impression there is nothing going on when in fact that all normal, well apart from the fact that names takes way too long to be resolved. > > I also booted into a 5.16.10 kernel and connecting bluetooth devices worked flawlessly. (This was with the unpatched > > bluez daemon) > > > > Chris > >> So the timer doesn't start until the request is sent. but obvoiusly > >> older versions of userspace don't have that fix so they end up > >> cancelling the loading of LTKs, this would explain why reloading the > >> daemon would make it work again. -- Luiz Augusto von Dentz