Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1280970lqp; Mon, 15 Apr 2024 01:07:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjzcJwe8JW1Cujja4Rl4vWI1SIxD0njtJ5zCnu0OjhazWWkLoFC8346tOIFuM+Il56mBB8VzORyNkg/hMGkuIIfG97vFTVT8Sf0QYekQ== X-Google-Smtp-Source: AGHT+IE4EqT+cwdtK14mDfZqECYoFXIPthsNiQAZB6LEH92tU1IRAfhUsDQuD3kWIKtWWa6u96ZM X-Received: by 2002:a05:6a20:1a90:b0:1a7:51f6:87e6 with SMTP id ci16-20020a056a201a9000b001a751f687e6mr6953921pzb.54.1713168470460; Mon, 15 Apr 2024 01:07:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713168470; cv=pass; d=google.com; s=arc-20160816; b=syCU57NlGK7nEjLeKXheH+jgsT6Qzgnk2SzF6fEkPQQ0VP2Fkg+RvsTAe5LvgY+ZyC 8qtpHmnOx93kzepZVdrUPT00acJx6OCbXrZ3CeVnTZgmScdzoU5WeeBHeAO3CIsdqhyQ rC7vk2ST7Geh1HS3k+zFYjoGcgBmvOkqhCQjEdmJ+stsi8a0JH1sYuj3yJv4HZrxP5jW eteW/80Pn3lW0VGmgq4aHHuu1X6RQTd6u35U5v3zfqT4xyJxpJTLaI7EN4t+lkj7pWKq mSn518KMTGIRRVALKvOIq6rQ4bNamp2+3EgVUx73xE1hPYdwNEmn4zFy0kMJ+SF/X11a vs2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=W6kMtUZvz8lV7/mIoYOo4XM0ttBIMVL1hXH0cQjnTd0=; fh=gcnSwr+QIHWKF230L+EmyT3yxn0MpARHQEV3nM5Uiyo=; b=TmNTM0m0eAPR9eelFgn8HYc00aonFXWNSoCyyTVp2+00spQ2RGQ0Mae6Wd4iehwbr4 LRza9VjhyrBG4Fc2vGjOgh8dByAd99MhwRNw1Z/k/lx55sKv2c8fk+R3+G4ji3ko14el 8XhZjNEyl0e4QCO6bBY4SnotqggOzaYJOLrOM8GVdgKDMXmVLLUg28L3IflJV80LjyxT X18prd27u9nHYlXGPkDkJj3lFpqMdshtjMk7o/RCn4ea+tLEe9FOThFNaGVyZTaKxY0G NAJF3bkz/cJhHb74gqQoQtAnVbWaLF3K7aSH4wS+z5WhK3vN3DV8iWSyZtSD+HV6gdkR DHUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SBYiK75u; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b1-20020a170902d50100b001e2c1740267si7748366plg.456.2024.04.15.01.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 01:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SBYiK75u; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 092CA282EDA for ; Mon, 15 Apr 2024 08:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 116DD2D044; Mon, 15 Apr 2024 08:07:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SBYiK75u" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A216E374C4 for ; Mon, 15 Apr 2024 08:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713168464; cv=none; b=PRmP+geS8OX8RvY0e/vRS1baVurqgymS80PIvtc4lGHinN1Zk1DZzH5I2RlQTZBvd4lrrVvR3wOBcyi8wPqJM09R+kMv2BjHmhNtfyIYRDRo7VIScMiYkJEKtdnzzg/D0Rmtm4kcji+4048uF1lU2USSahOlu5NSB9Y64B95gmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713168464; c=relaxed/simple; bh=HPELzqyZEb6+AC0+ZZLgg0FrqknwSRG/bhrzRGXLfyY=; h=Message-ID:Date:MIME-Version:From:Subject:To:CC:References: In-Reply-To:Content-Type; b=n/hT1f226htXAqSrHyRygmbZsd/ySj9crQXRxiP+OGbkYOj9C1f5it1BS9pPVSjN1FXXbQd3sDZvxmCUGLDRAnBK+0fIUc55FscOjXWKIR0JmWdkiT0z45zCczmLFoMp/ibLZOdlcEOMBqVRXiQ0GexhiJVH8Sn68l8RDmraIdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SBYiK75u; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43F7Fh8D019824; Mon, 15 Apr 2024 08:07:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:from:subject:to:cc:references :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=W6kMtUZvz8lV7/mIoYOo4XM0ttBIMVL1hXH0cQjnTd0=; b=SB YiK75uPWtDTeTQYDuG0tWCFowHCIbV5ePNqoN8mlfp+TfFNI0huwmappwezk3W4C uFTN6ozE8jZgasinLw8HdCPrhjUylbhOKhThmBSpfKzXpNvpk80iLfzC/A7ur2Rc eTHThhh2wqj9vqdkQco7Feva+RXBeYOenhzzTYowxoN0KBu6mrLRiLD0GpA2Btdj bV0dgOvrFJeiGCGzDUByvMwiYg0MYJoYIoZX5QmNAjU7zPSrDLkJZ32XpveqKUUR XkBdtbbENKm+coH1NnH+S8FYGRMqFMwiFVuUoXooZym6R3HoOqu6zCtstZhWwH3I LdA0fQMuuNhgCX7ZPvJg== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xgtjq8nf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Apr 2024 08:07:29 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43F87Swk013988 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Apr 2024 08:07:28 GMT Received: from [10.231.194.100] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 15 Apr 2024 01:07:26 -0700 Message-ID: <1de0e9b2-fd12-4483-ab3f-41b338a8e622@quicinc.com> Date: Mon, 15 Apr 2024 16:07:24 +0800 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: quic_zijuhu Subject: Re: QCA6390 bluetooth doesn't work after warm boot or disable/reenable To: Wren Turkal , Luiz Augusto von Dentz , Marcel Holtmann , Johan Hedberg CC: , , Kalle Valo References: <31bb6e18-ecee-49b3-87d7-50ab53e07447@penguintechs.org> <1b3d3937-6679-491e-a5c6-818ae8ac639a@penguintechs.org> <68a31d6a-8eb8-4d78-819b-fb67367cc41d@penguintechs.org> <02400664-2d23-42d3-b49b-0c59f606d298@penguintechs.org> <8162d6c7-d968-465e-bb8f-3c939eb8d783@penguintechs.org> <391980b0-8f44-4b87-83cd-66e46f041c8e@quicinc.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hMJwEslr7LK5zBMDYc2PI1L_qWjaplEg X-Proofpoint-ORIG-GUID: hMJwEslr7LK5zBMDYc2PI1L_qWjaplEg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-15_07,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404150052 On 4/15/2024 3:52 PM, Wren Turkal wrote: > On 4/14/24 5:04 AM, quic_zijuhu wrote: >> On 4/13/2024 3:46 AM, Wren Turkal wrote: >>> On 4/11/24 1:30 PM, Wren Turkal wrote: >>>> On 4/10/24 3:40 PM, Wren Turkal wrote: >>>>> On 4/10/24 3:00 PM, Wren Turkal wrote: >>>>>> +Johan since he's a former BT drivers maintainer. >>>>>> >>>>>> On 4/9/24 1:11 PM, Wren Turkal wrote: >>>>>>> On 4/9/24 1:03 PM, Luiz Augusto von Dentz wrote: >>>>>>>> 5.19 seems a little too old, imo, or has it been broken for that long, >>>>>>>> did you at least tried with bluetooth-next? Try contacting the people >>>>>>>> who actually wrote the driver. >>>>>>> >>>>>>> Sorry, I didn't answer your question. Yes, I do think it's been broken for longer than that, but I wanted to confirm. >>>>>> >>>>>> Okay, so I tried 6.9-rc3 and every main release 5.19-6.8. >>>>>> >>>>>> I have found the following: >>>>>> >>>>>> * older kernels (6.3 and before) seem to be far less likely to kill on a cycling the bluetooth service. >>>>>> * 6.8/6.9-rcs consistently destroy bluetooth when stopping and restarting the service >>>>>> * If I destroy the bluetooth service with a BT service restart in 6.9-rc3 and warm reboot into any release back to 5.19, bluetooth does not work >>>>>> * cold boot works in all cases assuming I give the laptop about 5s between power off/on >>>>> >>>>> I just did another experiment on 6.9-rc3. I blacklisted relevant bluetooth modules and then warm booted without the blacklist. I did this for both the "bluetooth" and "btqca" modules. In both cases, I cold booted with and appropriate "module_blacklist" kernel arg. After the boot, I verified the module was not loaded. I then warm booted without the blacklist, and the bluetooth works, so bluetooth only seems to fail when the linux module code for closing the device is run before a warm boot. >>>> >>>> And another experiment. I disabled the bluetooth.service and bluetooth.target with systemctl. I then shutdown and cold booted. After logging into GNOME, starting the service. Similar failures show up in the kernel logs as after the failure during a warm boot: >>>> >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Bluetooth management interface 1.22 initialized >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv Monitors: Failed (0x03) >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Battery Provider Manager created >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: MGMT ver 1.22 >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: src/device.c:device_set_wake_support() Unable to set wake_support without RPA resolution >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Failed to clear UUIDs: Failed (0x03) >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:17:54 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:17:54 braindead.localdomain wireplumber[2139]: org.bluez.GattManager1.RegisterApplication() failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Invalid method call >>>> Apr 11 13:17:54 braindead.localdomain wireplumber[2139]: org.bluez.GattManager1.RegisterApplication() failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Invalid method call >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: setting up ROME/QCA6390 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: RFCOMM TTY layer initialized >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: RFCOMM socket layer initialized >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: RFCOMM ver 1.11 >>>> >>>> ... skip some logs about registering modules in the bluetoothd ... >>>> >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA Product ID   :0x00000010 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA SOC Version  :0x400a0200 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA ROM Version  :0x00000200 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA Patch Version:0x00003ac0 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA controller version 0x02000200 >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA Failed to send TLV segment (-110) >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: QCA Failed to download patch (-110) >>>> Apr 11 13:17:54 braindead.localdomain kernel: Bluetooth: hci0: Retry BT power ON:0 >>>> Apr 11 13:17:57 braindead.localdomain kernel: Bluetooth: hci0: command 0xfc00 tx timeout >>>> Apr 11 13:17:57 braindead.localdomain kernel: Bluetooth: hci0: Reading QCA version information failed (-110) >>>> Apr 11 13:17:57 braindead.localdomain kernel: Bluetooth: hci0: Retry BT power ON:1 >>>> Apr 11 13:17:59 braindead.localdomain kernel: Bluetooth: hci0: command 0xfc00 tx timeout >>>> Apr 11 13:17:59 braindead.localdomain kernel: Bluetooth: hci0: Reading QCA version information failed (-110) >>>> Apr 11 13:17:59 braindead.localdomain kernel: Bluetooth: hci0: Retry BT power ON:2 >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to set mode: Authentication Failed (0x05) >>>> Apr 11 13:18:01 braindead.localdomain kernel: Bluetooth: hci0: command 0xfc00 tx timeout >>>> Apr 11 13:18:01 braindead.localdomain kernel: Bluetooth: hci0: Reading QCA version information failed (-110) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Too small Add Device complete event >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>>> Apr 11 13:18:01 braindead.localdomain bluetoothd[4408]: Failed to add UUID: Failed (0x03) >>> >>> I have captured a full log of my system since boot including debug messages for the hci_hca.c file. Should I attach that log to a message here? In general, I am not totally certain of how I should track the troubleshooting for this problem. Do y'all want it on the mailing list? >>> >>>> >>>> It looks like the firmware is failing to load. Is there some kind of time limit on loading the firmware after the module is loaded? >>>> >>>> Why would this work if I allow the service to be started on boot, but not if I wait until after logging into GNOME? >>>> >>>>>> So, I suspsect that the process of closing out the hardware may be leaving it in a state that the reset cannot handle (and probably never could handle). >>>>>> >>>>>> I also found that qualcomm has docs here: https://www.qualcomm.com/products/technology/wi-fi/fastconnect/fastconnect-6800#Documentation >>>>>> >>>>>> However, I am not a member of a Qualcomm verified company (mentioned in the doc links). Luiz, Marcel, or Johan, do you have any contacts that might be able to help me in getting info about the technical docs for this hardware? I would love to see if I can find any issues in how the hardware is being reset. >>>>>> >>>>>> As an independent dev, I don't even know what it takes to get that kind of access. I would welcome any help here. Hey Qualcomm, are you hiring? :P >>>>>> >>>>>> wt >>>>> >>>> >>> >> Hi Wren, >> >> 1) Apply below patch series >> https://patchwork.kernel.org/project/bluetooth/list/?series=844357 >> >> 2) Disable BT >> >> 3) Power off >> >> 4) Power on >> >> 5) enable more logs >> echo "module hci_uart  +pft" > /sys/kernel/debug/dynamic_debug/control >> echo "module btqca  +pft" > /sys/kernel/debug/dynamic_debug/control >> >> 6) enable BT >> >> 7) then check this issue again. several disable/enable or reboot cycles. > > Working on it. > > What would you like me to capture from the logs, only kernel log or kernel+bluetooth service or something else? > only kernel log. > Also, how would you like me to share the logs? Do you want me to attach them to a reply mail or paste them into the body of a reply email or something else? > you maybe report this issue to bugzilla and track with bugzilla if you is easy for you. otherwise, paste them into the body of a reply email.