History of this message: https://bugzilla.kernel.org/show_bug.cgi?id=216936
I'm guessing what's happening to ppl is, like me, it worked after one
test and they were just happy for it to be over.  So I'm writing this
email to document my journey, give tips and next steps.
Last test:
I added `blacklist thinkpad_acpi` to `/etc/modprobe.d/wifi.conf`.  Let
me be clear AFAICT this is random so there is a 50/50 chance that
thinkpad_acpi is fine/bad.

What to do if you get the `Failed to send firmware data (-19)` error.
Make several changes, for debugging purposes, and then reboot.  For me
the ritual of watching the power button go out and back on after 5
seconds being off, then hitting power, waiting 2 seconds and turning
it back on...  Seems ohh so much to help.  However the *fix* for me
happened from just running `$ sudo reboot` from xterm and waiting,
watching the "shortened" grub timeout, watching the autologin,
watching the xmessage autostart and being surprised that it was
working.  If you have this issue setup all of those.

For testing add NOPASSWD to sudoers.
```text
==> /home/cheako/.config/autostart/xmessage.desktop <==
[Desktop Entry]
Type=Application
Exec=sh -c 'sudo dmesg|grep -e hci0 -e iwl -e "usb 3-1: " |xmessage -file -'
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=xmessage
Name=xmessage
Comment[en_US]=xmessage bt report
Comment=xmessage bt report
```

I'm convinced the random nature of this issue makes you think rituals
help, but they logically cannot.  Make sure to do a lot of testing if
you think you've found something that helps.

This is what was failing the download for me every time, I guess.
`kernel: usb 3-2: USB disconnect, device number 3`  If this happened
b4 `btusb` was loaded I'd get *nothing*, but sometimes it would happen
during the firmware xfer...  leading me to think ohh man cold boots
really do help.

Let's turn up the logging, there are a few of these, do them all then
reboot!! If you do get it working run `echo 'module btusb =_; module
usbcore =_; module xhci_hcd =_;' | sudo tee
/sys/kernel/debug/dynamic_debug/control` to turn off the dynbdg
logging, without having to reboot.

```text
==> /etc/modprobe.d/wifi.conf <==
# Some of these settings were suggested, I say don't bother.  YMMV
# options iwlwifi bt_coex_active=1 11n_disable=0 power_save=0 uapsd_disable=1
# options iwlmvm power_scheme=1
# This one is great for ruling it out as the cause of the
disconnection!  and it does, the device disconnects with and without
btusb.
# blacklist btusb

# This is the big one, it logs the xfer so you can watch the whole thing.
options btusb dyndbg=" func btusb_tx_complete +pmfl; func
btusb_send_frame_intel +pmfl; func btusb_bulk_complete +pmfl;"

# This was the fix for me, YMMV.
blacklist thinkpad_acpi
```

To make this active on reboot, rebuild/update your initramfs.  On
Debian that's `update-initramfs -k all -u`.

Add this to debug USB, a kernel cmdline.  Debian: `/etc/default/grub`
then `update-grub`

P.S. To read the slow ftrace, quickly run `sudo cat
/sys/kernel/tracing/trace >trace &`.  To stop ftrace run `echo
nop|sudo tee /sys/kernel/tracing/current_tracer`, replaces `function`.
```
# Essential
usbcore.dyndbg="+pmfl"
xhci_hcd.dyndbg="+pmfl"
trace_event=":mod:btusb,:mod:iwlwifi,:mod:iwlmvm"
tp_printk
log_buf_len=4M

# This may help, did nothing for me
usbcore.autosuspend=-1

# These kill performance, adding a minute to get to the desktop.
 ftrace=function ftrace_filter=":mod:btusb,:mod:iwlwifi" trace_buf_size=256M

# There is no point in removing these as the bug triggers while the
desktop is hogging the display.
quiet splash
```

The only other thing I can suggest is to tweak the `dmesg|grep`, the
dyndbg(some modules are built-in and some are loaded by modprobe), and
the trace_event(`:mod:` is designed to work for modules that have yet
to be loaded as well as loaded).

The 2 technologies used:
Dynamic Debug
https://docs.kernel.org/trace/index.html

I'd be curious to see your logs and good luck!


_______________________________________________
ibm-acpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Reply via email to