Kernel 6.1.0 breaks WiFi

VIM4 is an Amlogic A311D2, so my educated guess would be yes?! Or are you saying VIM4 doesn’t have mainline Kernel, so it’s not affected?

Yes, since those devices are not on the mainline kernel, they won’t be affected by the issue.

1 Like

How about configure to out-of-band interrupt for wifi ?

I see the amlogic vendor kernel 4.9 use it
and interrupt GPIO is GPIOX_7 defined in dts file

The mainline kernel use “MMC_CAP_SDIO_IRQ”
that’s in-band interrupt for wifi by sdio_data[1] pin

I think the two way interrupt cause wifi performance , I guess …

1 Like

Has anything been planned for this issue?
@spikerguy mentioned this patch

But there seems to be a fix for it:
https://lore.kernel.org/linux-amlogic/e635fee3-f5c4-2819-d6f3-a50dac55e979@gmail.com/T/#u

It is in linux-next

1 Like

I applied the patch, it appears to be very stable (when working), but there is a brcmfmac startup issue with it.
It will not always start the brcmfmac module. I have worked around it by trying to (re-)load the brcmfmac module in rc.local but that is just a hack.

@numbqq Could Khadas have a look at the WiFi issue please?
With the current kernel, WiFi fails after a few minutes and causes a hanging kernel as the opening poster reported.

1 Like

Hello @gkkpch

Yes, @Frank will check and update here.

The following patches are required for 6.1.x kernels:

https://patchwork.kernel.org/project/linux-amlogic/patch/27d89baa-b8fa-baca-541b-ef17a97cde3c@gmail.com/

https://patchwork.kernel.org/project/linux-amlogic/patch/76e042e0-a610-5ed5-209f-c4d7f879df44@gmail.com/

https://patchwork.kernel.org/project/linux-amlogic/patch/9e296859-0363-ecc4-2d99-fd0239efceff@gmail.com/

^ the last patch will work but compile warnings were flagged so I would expect Heiner to post a v2 of the patch with some changes shortly.

2 Likes

Can someone enlighten me on how to apply a patch? Do I have to use Fenix and build a new OS image from scratch or I can just live patch the OS?

I tried to install the official ubuntu image with kernel 6.0.0 but as soon as I do apt upgrade it bumps to 6.1.0 and network started to fail.

–EDIT–
Ah I see fenix already have the kernel with patches applied, maybe Khadas can update their official images provided for oowow?

Please follow the steps below to upgrade the kernel with the patches applied.

cd /tmp
wget https://dl.khadas.com/.test/vim3/linux-dtb-amlogic-mainline_1.4.2_arm64.deb
wget https://dl.khadas.com/.test/vim3/linux-image-amlogic-mainline_1.4.2_arm64.deb
sudo dpkg -i  linux-dtb-amlogic-mainline_1.4.2_arm64.deb linux-image-amlogic-mainline_1.4.2_arm64.deb
sync
sudo reboot

Please check and tell us the results.

I tried on a fresh OS, it works great!

Noob question, what happens if there is a new update on these files? Will the new change automatically be applied?

We will apply these patches to next update, so if you don’t upgrade the kerenl manually, it should be fine.

Yes but I mean if I do keep these patches that I just applied manually, would there be conflict when the next update is released?

No, there will be no confilict.

Yes, please create a new topic for your build issue.

Unfortunately, this didn’t happen yet and I have to upgrade a fleet of devices. When can we expect an update, please?

Is the VIM3 EOL? It’s been months since the issue has been patched but there is still no updated image available for flashing with OOWOW.

@christian5271 usually the fenix update bundles multiple patch fixes and might take time.
you could consider building an up to date image or just the kernel update package using fenix.

provided if the rest your provided system is already working, and you only need a kernel update, just do make kernel-deb and install the packages generated onto your devices.

should fix the issue and save your time by unnecessarily needing to update all the devices with new images and doing post install setup afterwards.

Thank you very much for spending the effort to reply to me - it’s very much appreciated.

I know I could build the kernel myself. But the problem is the deployment: I have a fleet of devices to upgrade and we do this in an automated fashion using Ansible. Ansible basically runs a apt update && apt dist-upgrade. I would have to change the whole deployment logic in our Ansible playbook just for a one-time hotfix.

I’m only referring to the complete image because anybody who currently buys a VIM3 and uses OOWOW to flash an image will try the latest, broken Fenix 1.4 / Linux 6.1.0 image. From my point of view, this alone should justify a hotfix.

2 Likes

I agree with this, hopefully the buggy image can be pulled down and a updated image can be pushed for public download as soon as possible.

1 Like

I just got this problem after installing Ubuntu 22.04 on vim3 using OOWOW. My internet connection would die shortly after login and then I had to use the steps back in this thread to resolve. Unexpected to say the least