ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Wren Turkal <wt@penguintechs.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Cc: ath11k@lists.infradead.org, linux-bluetooth@vger.kernel.org,
	Kalle Valo <kvalo@kernel.org>, Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: QCA6390 bluetooth doesn't work after warm boot or disable/reenable
Date: Fri, 12 Apr 2024 12:46:36 -0700	[thread overview]
Message-ID: <b999d783-4912-471e-a978-6c7f0cbcd1e6@penguintechs.org> (raw)
In-Reply-To: <f7a24b54-9a1f-41f4-8706-d7199a4a84e8@penguintechs.org>

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
>>
> 

-- 
You're more amazing than you think!


  reply	other threads:[~2024-04-12 19:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 19:14 QCA6390 bluetooth doesn't work after warm boot or disable/reenable Wren Turkal
2024-04-06 20:16 ` Wren Turkal
2024-04-06 20:27   ` Wren Turkal
2024-04-06 20:29     ` Wren Turkal
2024-04-06 20:50       ` Wren Turkal
2024-04-08  5:22     ` Kalle Valo
2024-04-08 18:35       ` Wren Turkal
2024-04-10  7:21         ` Kalle Valo
2024-04-08 19:49     ` Wren Turkal
2024-04-09 19:53       ` Wren Turkal
2024-04-09 20:02         ` Wren Turkal
2024-04-09 20:03         ` Luiz Augusto von Dentz
2024-04-09 20:09           ` Wren Turkal
2024-04-09 20:11           ` Wren Turkal
2024-04-10 22:00             ` Wren Turkal
2024-04-10 22:40               ` Wren Turkal
2024-04-11 20:30                 ` Wren Turkal
2024-04-12 19:46                   ` Wren Turkal [this message]
2024-04-14 12:04                     ` quic_zijuhu
2024-04-15  7:52                       ` Wren Turkal
2024-04-15  8:07                         ` quic_zijuhu
2024-04-15  8:51                           ` Wren Turkal
2024-04-15  9:29                             ` quic_zijuhu
2024-04-15 11:34                             ` quic_zijuhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b999d783-4912-471e-a978-6c7f0cbcd1e6@penguintechs.org \
    --to=wt@penguintechs.org \
    --cc=ath11k@lists.infradead.org \
    --cc=johan.hedberg@gmail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=quic_zijuhu@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).