WiFi Interface Not Appearing on Verdin iMX8M Mini After Resuming from Suspension

Sometimes, the WiFi adapter/interface of the SoM doesn’t appear after resuming from suspension. This doesn’t happen every time. The only way to get the WiFi working again is to power off or restart.

Here’s the sequence of actions I’ve taken to address this issue:

At system startup, I execute the following command to bring down the eth0 interface:

ip link set dev eth0 down

Before entering suspension, I remove the WiFi driver using the command:

 modprobe -r mwifiex_sdio
 echo deep > /sys/power/mem_sleep; echo mem > /sys/power/state

Upon resuming from suspension, I reload the WiFi driver with the command:

modprobe mwifiex_sdio

Despite these steps, the issue persists.

When the WiFi interface (mlan0) disappears, I’ve tried removing the driver and reloading it using the following commands:

 modprobe -r mwifiex_sdio
 modprobe mwifiex_sdio

However, even with this step, the issue persists.

I have a Dahlia v1.1B board with the Verdin iMX8M Mini Quad 2GB WB IT V1.1B based. The image used is your Linux Multimedia Reference 6.3.0+build.7.

I hope someone can help me.
Best regards,
Ferran

Did you check

we only had the problem that :
nmcli device wifi list is not working, but
nmcli -a device wifi connect <WIFI_NAME> worked

Hello @ferranmc,
could you indicate how frequently the issue presents itself?
How often do you execute a suspend resume cycle on your setup?

Hi Dan,

Thank you for your response and the provided information. However, I wanted to point out that the “Linux Multimedia Reference 6.3.0+build.7” image we are using doesn’t seem to have these commands available.

Best regards,
Ferran

Hi Rafael,

The issue with the WiFi adapter/interface not appearing after resuming from suspension occurs intermittently. It doesn’t happen every time, but it occurs frequently enough to be noticeable. For example, sometimes I put the system into suspension and after 30 minutes, when I resume it, the WiFi fails to work. As for the frequency of the suspend-resume cycle, it varies depending on the usage scenario, but I estimate it to be several times a day.

Let me know if you need any further information.

Best regards,
Ferran

Hello @ferranmc,
Does dmesg after the resume report any error related to the wifi driver / interface?

It could be that the firmware is freezing sometimes, and that would probably be reported by the driver as timeout errors after some commands were sent.

Hi Rafael,

This is what I get when the WiFi driver fails:

Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id = 0xa9, act = 0x0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: num_data_h2c_failure = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: num_cmd_h2c_failure = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.060372] mwifiex_sdio mmc2:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id = 0xa9, act = 0x0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.069227] mwifiex_sdio mmc2:0001:1: num_data_h2c_failure = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.075106] mwifiex_sdio mmc2:0001:1: num_cmd_h2c_failure = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: is_cmd_timedout = 1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: num_tx_timeout = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.080897] mwifiex_sdio mmc2:0001:1: is_cmd_timedout = 1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.086329] mwifiex_sdio mmc2:0001:1: num_tx_timeout = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_cmd_index = 1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_cmd_id: 00 00 a9 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.091665] mwifiex_sdio mmc2:0001:1: last_cmd_index = 1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.096994] mwifiex_sdio mmc2:0001:1: last_cmd_id: 00 00 a9 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.104413] mwifiex_sdio mmc2:0001:1: last_cmd_act: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_cmd_act: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_cmd_resp_index = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_cmd_resp_id: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.111944] mwifiex_sdio mmc2:0001:1: last_cmd_resp_index = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.117732] mwifiex_sdio mmc2:0001:1: last_cmd_resp_id: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_event_index = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: last_event: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.125595] mwifiex_sdio mmc2:0001:1: last_event_index = 0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.131100] mwifiex_sdio mmc2:0001:1: last_event: 00 00 00 00 00 00 00 00 00 00
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: data_sent=1 cmd_sent=1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.138433] mwifiex_sdio mmc2:0001:1: data_sent=1 cmd_sent=1
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.144116] mwifiex_sdio mmc2:0001:1: ps_mode=0 ps_state=0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: ps_mode=0 ps_state=0
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel: mwifiex_sdio mmc2:0001:1: info: _mwifiex_fw_dpc: unregister device
Mar 22 18:10:07 root-verdin-imx8mm-06902259 kernel[692]: [ 7811.149945] mwifiex_sdio mmc2:0001:1: info: _mwifiex_fw_dpc: unregister device

Let me know if you have any other questions or suggestions.

Best regards,
Ferran