This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:users:drivers:iwlwifi:debugging [2019/02/06 12:38] Emmanuel Grumbach |
en:users:drivers:iwlwifi:debugging [2022/05/29 14:27] Johannes Berg |
||
---|---|---|---|
Line 15: | Line 15: | ||
===== How to report? ===== | ===== How to report? ===== | ||
- | Issues can be filed in [[http://bugzilla.kernel.org|kernel's bugzilla]]. Make sure to add [[mailto:linuxwifi@intel.com|linuxwifi@intel.com]] to the bug. | + | Issues can be filed in [[http://bugzilla.kernel.org|kernel's bugzilla]]. |
+ | |||
+ | Make sure to set | ||
+ | |||
+ | * Product: Drivers | ||
+ | * Component: network-wireless-intel | ||
Always attach the kernel log to your reports: | Always attach the kernel log to your reports: | ||
<code>dmesg > dmesg.log</code> and attach dmesg.log to the bug. | <code>dmesg > dmesg.log</code> and attach dmesg.log to the bug. | ||
Line 25: | Line 31: | ||
==== Prints ==== | ==== Prints ==== | ||
- | The simplest way to provide minimal output is to dump your kernel log: dmesg. Sometimes we will ask for logs from the supplicant too - they typically land in syslog. iwlwifi can print more data to the kernel log if asked to: this is controlled by the debug module parameter. This is a [[https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/wireless/intel/iwlwifi/iwl-debug.h#n143|bitmap]]. To see more debug prints, [[https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/wireless/intel/iwlwifi/Kconfig#n105|CONFIG_IWLWIFI_DEBUG]] must be enabled. | + | The simplest way to provide minimal output is to dump your kernel log: dmesg. Sometimes we will ask for logs from the supplicant too - they typically land in syslog. iwlwifi can print more data to the kernel log if asked to: this is controlled by the debug module parameter. This is a [[https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/wireless/intel/iwlwifi/iwl-debug.h#n129|bitmap]]. To see more debug prints, [[https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/net/wireless/intel/iwlwifi/Kconfig#n105|CONFIG_IWLWIFI_DEBUG]] must be enabled. |
Please don't add debug level unless instructed to do so. Adding more prints typically adds useless information. | Please don't add debug level unless instructed to do so. Adding more prints typically adds useless information. | ||
Line 36: | Line 42: | ||
<code>sudo trace-cmd record -e iwlwifi -e mac80211 -e cfg80211 -e iwlwifi_msg</code> | <code>sudo trace-cmd record -e iwlwifi -e mac80211 -e cfg80211 -e iwlwifi_msg</code> | ||
- | This records all the data that goes from and to the firmware. The output is a file: trace.dat which you can compress prior to sending. To enable tracing, [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/intel/iwlwifi/Kconfig#n139|CONFIG_IWLWIFI_TRACING]] must be set. | + | This records all the data that goes from and to the firmware. The output is a file: trace.dat which you can compress prior to sending. To enable tracing, [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/intel/iwlwifi/Kconfig#n139|CONFIG_IWLWIFI_DEVICE_TRACING]] must be set. |
**//Note: you must not remove the iwlwifi kernel module while tracing is running. You need to stop the tracing first!//** | **//Note: you must not remove the iwlwifi kernel module while tracing is running. You need to stop the tracing first!//** | ||
Line 44: | Line 50: | ||
The output of the air sniffing operation is a file with a pcap extension that can be parsed by the [[https://www.wireshark.org|Wireshark]] program. | The output of the air sniffing operation is a file with a pcap extension that can be parsed by the [[https://www.wireshark.org|Wireshark]] program. | ||
=== How to get a sniffer capture with your Intel device === | === How to get a sniffer capture with your Intel device === | ||
+ | To capture all A-MSDUs, you need to reload the iwlwifi driver with the ''amsdu_size=3'' module parameter. | ||
+ | |||
In order to put your device in monitor mode and get a sniffer capture, you first need to stop using it as a Wi-Fi client. To do so there are several options: | In order to put your device in monitor mode and get a sniffer capture, you first need to stop using it as a Wi-Fi client. To do so there are several options: | ||
* Disable Wi-Fi from the Network Manager GUI and re-enable manually with <code>rfkill unblock wifi </code> This may not work on all the distributions. | * Disable Wi-Fi from the Network Manager GUI and re-enable manually with <code>rfkill unblock wifi </code> This may not work on all the distributions. | ||
Line 70: | Line 78: | ||
Getting data from the firmware can often provide a lot of information, especially when the traffic is being stalled, latency is high, queues are stuck etc.. Here is how to do so. This is working starting kernel 3.19. | Getting data from the firmware can often provide a lot of information, especially when the traffic is being stalled, latency is high, queues are stuck etc.. Here is how to do so. This is working starting kernel 3.19. | ||
- | First you'll need to allow DEV_COREDUMP by setting CONFIG_ALLOW_DEV_COREDUMP to Y. | + | You'll need to allow DEV_COREDUMP by setting CONFIG_ALLOW_DEV_COREDUMP to Y. |
Then, you'll need to create a core dump. This can be done by: | Then, you'll need to create a core dump. This can be done by: | ||
Line 101: | Line 109: | ||
This way, each time a dump is created it will automatically land on your file system. Remember to make the /sbin/iwlfwdump.sh file executable (i.e. ''chmod a+x /sbin/iwlfwdump.sh''), so that the udev rule can execute it, otherwise it won't work. | This way, each time a dump is created it will automatically land on your file system. Remember to make the /sbin/iwlfwdump.sh file executable (i.e. ''chmod a+x /sbin/iwlfwdump.sh''), so that the udev rule can execute it, otherwise it won't work. | ||
- | To debug the firmware you'll typically need a customized version of it. This customization depends on the bug you are facing. | ||
Starting from 4.1, we can trigger firmware dumps when issues occur (e.g. when the association fails) this again requires a customized firmware. In that case, the developer working with you will let you know and you won't have to trigger the dump yourself using fw_dbg_collect debugfs hook. | Starting from 4.1, we can trigger firmware dumps when issues occur (e.g. when the association fails) this again requires a customized firmware. In that case, the developer working with you will let you know and you won't have to trigger the dump yourself using fw_dbg_collect debugfs hook. | ||
Line 114: | Line 121: | ||
In this case, please copy the full dmesg output since there may be data before and after this message that can be helpful. | In this case, please copy the full dmesg output since there may be data before and after this message that can be helpful. | ||
- | In case of a firmware crash or queues being stuck, a dump will be automatically created. If you have the udev rule in place, you'll see the dump on your file system. No customization needed in that case, the dump from a regular firmware will already include valuable data, but the firmware team is likely to ask reproduction with a customized version. | + | In case of a firmware crash or queues being stuck, a dump will be automatically created. If you have the udev rule in place, you'll see the dump on your file system. No customization needed in that case, the dump from a regular firmware will already include valuable data, but we usually need more information than the data provided by a release version of the firmware. When you report a bug, please use a debug firmware |
+ | from the list below. This will allow to include more data in the dump at the cost of extra PCI transactions: | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-3160-17.ucode.gz|debug firmware version for 3160}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-7260-17.ucode.gz|debug firmware version for 7260}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-7265-17.ucode.gz|debug firmware version for 7265}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-7265d-29.ucode.gz|debug firmware version for 7265D}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-3168-29.ucode.gz|debug firmware version for 3168}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-8000C-36.ucode.gz|debug firmware version for 8260}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-8265-36.ucode.gz|debug firmware version for 8265}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-9000-pu-b0-jf-b0-43.ucode.gz|debug firmware version for 9000}} | ||
+ | |||
+ | {{en:users:drivers:iwlwifi:iwlwifi-9260-th-b0-jf-b0-43.ucode.gz|debug firmware version for 9260}} | ||
==== Privacy aspects ==== | ==== Privacy aspects ==== | ||