Device loses Wifi connection

I have an issue that sometimes my balena device, which is based on a generic intel image, looses the connection to the wifi. After a reboot the device automatically connects to the wifi again. The Wifi itself is always available and has an active internet connection. Is there some way to make the device automatically reconnect once it has lost the connection to the wifi?

even tho

nmcli -f name,autoconnect connection 

returns yes for the WIFI in question, the issue still seems to exist.

Hello @lukasknk could you please confirm your balenaOS and supervisor versions?

on the other hand, could you please confirm if the WiFi signal is reliable?

Hi, you are indeed correct that autoconnect=yes should retry the WiFi connection if a problem occurs. If that stops working, that would indicate a problem with the WiFi driver/firmware or a problem with the router.

Nowadays those kinds of issues are much less with Linux compared to some years ago, but I would imagine there are still stability problems with some chips. For example older Raspberry Pi devices had those types of issues from time to time, but later driver releases resolved them.

What is the WiFi model you are using with the Generic Intel image?

In the past I created an example application that may workaround those types of issues: GitHub - balena-io-experimental/keep-wifi-up: Workarounds issues that prevent NetworkManager from reconnecting to a WiFi network. It is for educational purposes mostly, but could be reused as well according to needs.

Thanks,
Zahari

1 Like

Hello @mpous. Thanks for responding!

The device in questions runs Supervisor version 14.10.1 and the Balena OS version 2.114.0.

The WIFI itself is stable, i had the problem on my home network as well as on a few other networks from our customers. I don’t think the WIFI itself is at fault.

Hey, thanks for your response!

I’m using the Internal WIFI Module of an HP Pro Mini 400 G9. I’m not sure how to get more information like what driver is used. If you need that i could search to find a command for that.

Thanks

Do you have an online device like that? If you provide support access to it I may find that information for you.
Thanks,
Zahari

Yes, i have enabled support access on the device 4722cf86470d61a57b986480a07c4e15. Let me know if you need more.

Hi, checking your device now.

Hi, this is a Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x354 card. I noticed relatively frequent disconnects from the WiFi network and also the following warning in the kernel logs that is dumped repeatedly by the driver: “iwlwifi 0000:00:14.3: Unhandled alg: 0x71b”

Googling that provides many search result and it looks like a common error with this WiFi card. I found a user that said the issue went away after he upgraded to kernel 6.1, but that is a too recent version compared to what we currently ship with: kernel 5.14.

I think

Sorry, I sent the message too early.

Most of the users in the search result did not found solution to those disconnect issues, and that leads me to think that this WiFi chip is too new and still requires driver/firmware fixes by Intel and possibly it is much better working on very recent kernels.

I personally had to replace a very similar Intel WiFi card on my laptop an year ago. Would it be an option for you to try a different one? I saw a user downgraded to AX200 and was not having re-connection issues anymore. I switched back then to one using an Atheros chipset and now I am using one with AX203 chipset.

1 Like

Hi, just to let you know that we now have a PR for upgrading the Linux kernel for the Generic x64 image to 6.1, which will possibly solve the issue for the AX201 chipset: Update kernel from 5.15 to 6.1 by acostach · Pull Request #244 · balena-os/balena-generic · GitHub

We will notify you once the PR is merged (and release will follow shortly after).

Thanks,
Zahari

Hi, the Generic x86_64 (GPT) v3.1.1+rev1 image is now available in balena-cloud and it includes kernel 6.1. Let us know if this solves the wifi problem for you.