Quectel EM06-E issue (memory leak?) on VIM3

Which Khadas SBC do you use?

VIM3 Basic with M2X WWAN Extension

Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.1.1-220725-emmc.img, and “apt full-upgrade” last week

Please describe your issue below:

I set up the 4G module according the documentation khadas. I have the network but I found the errors in the log dmesg, and after several hours the network will disconnect and reconnect. And the network speed will be slower. I tried one solution to add “vm.min_free_kbytes = 32768” in “/etc/sysctl.conf”, this delays the occurrence of the error but not permanently solve the problem.
This error occurs immediately when the memory is occupied. Looks a bit like a memory leak in the network.

I found some discussions on the similar issue on Raspberry Pi: "eth0: kevent 2 may have been dropped" is still here · Issue #309 · raspberrypi/linux · GitHub

Post a console log of your issue below:

Could you please help me to fix it? Thanks in advance.
@Frank @numbqq

Hello @JJ1997

@ivan.li will help you about this issue.

Thanks a lot! Looking forward to your reply @ivan.li


  • I haven’t had the problem you mentioned for the time being.
khadas@Khadas:~$ dmesg | grep cdc_mbim
[   12.586839] cdc_mbim 1-1.3:1.4: cdc-wdm0: USB WDM device
[   12.587189] cdc_mbim 1-1.3:1.4 wwan0: register 'cdc_mbim' at usb-xhci-hcd.0.auto-1.3, CDC MBIM, ea:5d:d0:4c:04:e7
[   12.587235] usbcore: registered new interface driver cdc_mbim

@ivan.li, I think that this error only occurs when the RAM memory is fully occupied. In the case of free memory, because the network module has a lot of memory available, although there is a “memory leak” problem, we cannot see the error. Did you test with the memory occupied? What is your current kernel version? I try to update to the same version. Thank you.

Hello @JJ1997

Please try to check with this version: https://dl.khadas.com/products/vim3/firmware/ubuntu/emmc/vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.4-221229-emmc.img.xz

Hello @numbqq and @ivan.li,

I tried the version you sent (with the kernel version 4.9.241 after updating), but the error still occurs when the RAM memory is occupied. You can use the command in a tmux session to occupy the memory:

stress --vm-bytes $(awk ‘/MemAvailable/{printf “%d\n”, $2 * 0.99;}’ < /proc/meminfo)k --vm-keep -m 1

If the memory is freed, the error will stop appearing, but 4G performance has degraded.

Hello @ivan.li, did you reproduce the error? Please let me know if I need to do other tests. Thanks a lot.


After I successfully connected, no error log appeared. But after the memory runs out, it appears.

I guess it was an app that caused the memory leak. Do you run any special apps?

Hello @ivan.li, I need to run an AI inference program which uses most of the memory. While the program is running, it has no effect on the use of other units or other network modules such as Wi-Fi, Ethernet or other 4G USB sticks.

I tried to set “vm.min_free_kbytes = 32768” in “/etc/sysctl.conf”, which forces the kernel’s memory manager to keep at least 32MB of free memory in order to ensure proper functioning of the system itself. The reserved memory will not be allocated to other programs.
In this case, the error with the Quectel 4G module did not appear immediately, but after about 2 days, the error appeared. That is to say, even if the memory does not run out, the memory will be slowly occupied by the 4G module over time.
Just like the previous stress test, we just occupied the memory, not a memory leak or a momory problem, but the 4G module had an error. This is not normal.

I think it’s the driver or kernel who has a memory problem with the 4G module, it gradually fills up the reserved memory. Currently I can only temporarily resolve this error by rebooting. I will do more tests to see where the memory leak is.

We are trying to reproduce the problem and it may take some time.

Hello @ivan.li, thanks a lot. I wait the test results on your side.

Is it possible to reboot/reset the 4G module without rebooting the vim3? For example by sending AT commands or restart driver or network unit etc. Because we can only temporarily fix this problem by rebooting vim3 each day. It’s inconvenient.