Vim4 Wifi fault

Hi @numbqq Thank you for the follow up!

  1. I installed another test mesh wifi network, this one a Google AC-1304 one with two access points that I had. Happy to say, so far the VIM4 is working on this WiFi with none of the issues I saw on the Mikrotik WDS Wifi. I reinstalled the Ubuntu 22.04 21-Jul-2022 image. I will continue to experiment with the Mikrotik, I do think there is an issue there with VIM4, not sure if it is a general Mikrotik issue or with WDS on Mikrotik. I am not receiving the ‘disconnect’ messages on the VIM4 nor am I seeing the latency issues with the Google mesh WiFi. The ping round trip time is on the order of 10 ms, much more reasonable.

  2. Yes, thanks to the instructions by @technodevotee I am able to connect to the CIFS NAS device from the VIM4. Is there some reason why you do not have those modules installed in your image? Seems pretty standard in the Linux images I have used.

  3. Thanks for info/update on the nvme issue. Hope you get it resolved quickly, having NVMe support is another differentiator that makes the Khadas VIM4 stand above.

– Dave

As we don’t Mikrotik WDS Wi-Fi so we can’t reproduce this issue. You sure don’t have issues with oowow? If so we will try to check what’s the difference.

We wil consider to add such modules by default.

Yes, we are working on it and will update when we have some improgress.

Hello @deepvim

I have built a new kernel to try to fix this issue, could help me to check with your Mikrotik WDS Wi-Fi?

Follow the steps to upgrade the kernel.

$ wagt https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
$ sudo dpkg -i linux-image-amlogic-5.4_1.1.1_arm64.deb
$ sync
$ sudo reboot

After reboot, check with the Mikrotik WDS Wi-Fi.

Hi @numbqq Testing now, I am still seeing the message of ‘disconnect’ in dmesg log, shown below and full log attached (scratch that, your web site will allow attachments of text files, happy to send it to you via another route). Pinging times are maybe a bit better, sorry I dont have data to quantify that, still much longer ping times to/from another machine on network (either a machine on ethernet or machine also on same WiFi). Numbers below. Including to/from ping numbers for a Raspberry Pi 3B on same WiFi, the Pi has ping number almost 10 times better to/from a ethernet machine as compared to the VIM4.

I still have experience the complete ‘freeze’ for 10 or so seconds once so far of a ssh session on the VIM4 with your patch, but again maybe a bit better, aka less of these.

And the ‘sluggness’ of the ssh session seems improved. I sitting here watching a very long ls -latR output listing from a ssh session on the VIM4 (the files are coming from a CIFS NAS device with millions of files) and I do not see any freezing of the screen output.

I will continue to test and report.

Perhaps @ps23Rick and @w407022008 can test your patch as well and report from their configurations (perhaps there is some useful data to see what hardware their WiFi’s are using).

Thanks for your work!

Do note this error during the 'sudo do-fenix-full-upgrade', not sure if it is significant to installing your patch:
E: Unable to locate package fenix-updater-package-jammy-vim4-mainline


machine state prior to the steps you requested:

installed vim4-ubuntu-22.04-gnome-linux-5.4-fenix-1.1-220721.img.xz via oowow

sudo apt update
sudo apt full-upgrade
sudo do-fenix-full-upgrade
this last command showed:
E: Unable to locate package fenix-updater-package-jammy-vim4-mainline

sync
sudo reboot

wget https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
sudo dpkg -i linux-image-amlogic-5.4_1.1.1_arm64.deb
sync
sudo reboot


user@Khadas:~/Desktop$ wget https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
--2022-09-19 09:45:29--  https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
Resolving dl.khadas.com (dl.khadas.com)... 135.181.182.36
Connecting to dl.khadas.com (dl.khadas.com)|135.181.182.36|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15413160 (15M) [application/octet-stream]
Saving to: ‘linux-image-amlogic-5.4_1.1.1_arm64.deb’

linux-image-amlogic-5.4_1.1.1_arm64.deb  100%[=================================================================================>]  14.70M  1.31MB/s    in 17s

2022-09-19 09:45:48 (867 KB/s) - ‘linux-image-amlogic-5.4_1.1.1_arm64.deb’ saved [15413160/15413160]

user@Khadas:~/Desktop$ sudo dpkg -i linux-image-amlogic-5.4_1.1.1_arm64.deb
[sudo] password for user:
(Reading database ... 145105 files and directories currently installed.)
Preparing to unpack linux-image-amlogic-5.4_1.1.1_arm64.deb ...
Unpacking linux-image-amlogic-5.4 (1.1.1) over (1.1) ...
Setting up linux-image-amlogic-5.4 (1.1.1) ...
update-initramfs: Generating /boot/initrd.img-5.4.125
user@Khadas:~/Desktop$

after reboot:

Welcome to Fenix 1.1 Ubuntu 22.04.1 LTS Linux 5.4.125
 _  ___               _            __     _____ __  __ _  _
| |/ / |__   __ _  __| | __ _ ___  \ \   / /_ _|  \/  | || |
| ' /| '_ \ / _` |/ _` |/ _` / __|  \ \ / / | || |\/| | || |_
| . \| | | | (_| | (_| | (_| \__ \   \ V /  | || |  | |__   _|
|_|\_\_| |_|\__,_|\__,_|\__,_|___/    \_/  |___|_|  |_|  |_|


 * Website:        https://www.khadas.com
 * Documentation:  https://docs.khadas.com
 * Forum:          https://forum.khadas.com

Last login: Mon Sep 19 09:04:24 2022 from 192.168.2.240
user@Khadas:~$ uname -a
Linux Khadas 5.4.125 #1.1.1 SMP PREEMPT Mon Sep 19 11:07:40 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
user@Khadas:~$ cat /etc/fenix-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM4
VENDOR=Amlogic
VERSION=1.1
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.1-220721
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2019.01-v1.1-release
LINUX_GIT_VERSION=khadas-vims-linux-5.4-v1.1-release
FENIX_GIT_VERSION=v1.1
#############################################
user@Khadas:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
user@Khadas:~$

on Google WiFi access point:

user@Khadas:~$ ping 192.168.86.1
PING 192.168.86.1 (192.168.86.1) 56(84) bytes of data.
64 bytes from 192.168.86.1: icmp_seq=1 ttl=64 time=1.88 ms
64 bytes from 192.168.86.1: icmp_seq=2 ttl=64 time=12.6 ms
64 bytes from 192.168.86.1: icmp_seq=3 ttl=64 time=10.5 ms
64 bytes from 192.168.86.1: icmp_seq=4 ttl=64 time=9.53 ms
64 bytes from 192.168.86.1: icmp_seq=5 ttl=64 time=10.1 ms
64 bytes from 192.168.86.1: icmp_seq=6 ttl=64 time=10.8 ms
64 bytes from 192.168.86.1: icmp_seq=7 ttl=64 time=8.73 ms
64 bytes from 192.168.86.1: icmp_seq=8 ttl=64 time=10.8 ms
64 bytes from 192.168.86.1: icmp_seq=9 ttl=64 time=9.60 ms
64 bytes from 192.168.86.1: icmp_seq=10 ttl=64 time=9.85 ms
64 bytes from 192.168.86.1: icmp_seq=11 ttl=64 time=9.53 ms
^C
--- 192.168.86.1 ping statistics ---
12 packets transmitted, 11 received, 8.33333% packet loss, time 11019ms
rtt min/avg/max/mdev = 1.876/9.448/12.633/2.581 ms
user@Khadas:~$

moved to Mikrotik WiFi ssid
rebooted

user@Khadas:~$ ping 192.168.2.22
PING 192.168.2.22 (192.168.2.22) 56(84) bytes of data.
64 bytes from 192.168.2.22: icmp_seq=1 ttl=64 time=1.39 ms
64 bytes from 192.168.2.22: icmp_seq=2 ttl=64 time=10.2 ms
64 bytes from 192.168.2.22: icmp_seq=3 ttl=64 time=8.50 ms
64 bytes from 192.168.2.22: icmp_seq=4 ttl=64 time=9.96 ms
64 bytes from 192.168.2.22: icmp_seq=5 ttl=64 time=10.8 ms
64 bytes from 192.168.2.22: icmp_seq=6 ttl=64 time=9.19 ms
64 bytes from 192.168.2.22: icmp_seq=7 ttl=64 time=9.94 ms
64 bytes from 192.168.2.22: icmp_seq=8 ttl=64 time=19.0 ms
64 bytes from 192.168.2.22: icmp_seq=9 ttl=64 time=9.41 ms
64 bytes from 192.168.2.22: icmp_seq=10 ttl=64 time=8.98 ms
64 bytes from 192.168.2.22: icmp_seq=11 ttl=64 time=10.2 ms
64 bytes from 192.168.2.22: icmp_seq=12 ttl=64 time=8.58 ms
64 bytes from 192.168.2.22: icmp_seq=13 ttl=64 time=9.66 ms
64 bytes from 192.168.2.22: icmp_seq=14 ttl=64 time=9.61 ms
64 bytes from 192.168.2.22: icmp_seq=15 ttl=64 time=9.97 ms
^C
--- 192.168.2.22 ping statistics ---
15 packets transmitted, 15 received, 0% packet loss, time 14020ms
rtt min/avg/max/mdev = 1.387/9.694/19.047/3.285 ms


user@hp-600-g1-dm-01:~/scripts$ ping 192.168.2.214
PING 192.168.2.214 (192.168.2.214) 56(84) bytes of data.
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=1040 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=9.46 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=28.6 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=51.5 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=73.2 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=98.6 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=18.5 ms
64 bytes from 192.168.2.214: icmp_seq=8 ttl=64 time=146 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=170 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=190 ms
64 bytes from 192.168.2.214: icmp_seq=11 ttl=64 time=226 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=1.66 ms
64 bytes from 192.168.2.214: icmp_seq=13 ttl=64 time=101 ms
64 bytes from 192.168.2.214: icmp_seq=14 ttl=64 time=79.7 ms
64 bytes from 192.168.2.214: icmp_seq=15 ttl=64 time=3.15 ms
64 bytes from 192.168.2.214: icmp_seq=16 ttl=64 time=2.40 ms
64 bytes from 192.168.2.214: icmp_seq=17 ttl=64 time=126 ms
64 bytes from 192.168.2.214: icmp_seq=18 ttl=64 time=71.2 ms
64 bytes from 192.168.2.214: icmp_seq=19 ttl=64 time=107 ms
64 bytes from 192.168.2.214: icmp_seq=20 ttl=64 time=5.24 ms
64 bytes from 192.168.2.214: icmp_seq=21 ttl=64 time=42.4 ms
64 bytes from 192.168.2.214: icmp_seq=22 ttl=64 time=60.6 ms
64 bytes from 192.168.2.214: icmp_seq=23 ttl=64 time=86.2 ms
64 bytes from 192.168.2.214: icmp_seq=24 ttl=64 time=108 ms
64 bytes from 192.168.2.214: icmp_seq=25 ttl=64 time=30.0 ms
64 bytes from 192.168.2.214: icmp_seq=26 ttl=64 time=51.2 ms
64 bytes from 192.168.2.214: icmp_seq=27 ttl=64 time=75.3 ms
64 bytes from 192.168.2.214: icmp_seq=28 ttl=64 time=98.7 ms
64 bytes from 192.168.2.214: icmp_seq=29 ttl=64 time=128 ms
64 bytes from 192.168.2.214: icmp_seq=30 ttl=64 time=147 ms
64 bytes from 192.168.2.214: icmp_seq=31 ttl=64 time=169 ms
64 bytes from 192.168.2.214: icmp_seq=32 ttl=64 time=193 ms



pinging a raspberry pi 3b on same Mikrotik WiFi 

user@hp-600-g1-dm-01:~/scripts$ ping 192.168.2.212
PING 192.168.2.212 (192.168.2.212) 56(84) bytes of data.
64 bytes from 192.168.2.212: icmp_seq=1 ttl=64 time=4.72 ms
64 bytes from 192.168.2.212: icmp_seq=2 ttl=64 time=5.15 ms
64 bytes from 192.168.2.212: icmp_seq=3 ttl=64 time=1.31 ms
64 bytes from 192.168.2.212: icmp_seq=4 ttl=64 time=3.18 ms
64 bytes from 192.168.2.212: icmp_seq=5 ttl=64 time=1.32 ms
64 bytes from 192.168.2.212: icmp_seq=6 ttl=64 time=2.11 ms
64 bytes from 192.168.2.212: icmp_seq=7 ttl=64 time=1.40 ms
64 bytes from 192.168.2.212: icmp_seq=8 ttl=64 time=1.61 ms
64 bytes from 192.168.2.212: icmp_seq=9 ttl=64 time=12.0 ms
64 bytes from 192.168.2.212: icmp_seq=10 ttl=64 time=1.34 ms
64 bytes from 192.168.2.212: icmp_seq=11 ttl=64 time=2.50 ms
64 bytes from 192.168.2.212: icmp_seq=12 ttl=64 time=39.9 ms
^C
--- 192.168.2.212 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11016ms
rtt min/avg/max/mdev = 1.311/6.378/39.918/10.521 ms


pi@octipi-01:~ $ ping 192.168.2.22
PING 192.168.2.22 (192.168.2.22) 56(84) bytes of data.
64 bytes from 192.168.2.22: icmp_seq=1 ttl=64 time=27.0 ms
64 bytes from 192.168.2.22: icmp_seq=2 ttl=64 time=21.1 ms
64 bytes from 192.168.2.22: icmp_seq=3 ttl=64 time=1.32 ms
64 bytes from 192.168.2.22: icmp_seq=4 ttl=64 time=24.9 ms
64 bytes from 192.168.2.22: icmp_seq=5 ttl=64 time=1.49 ms
64 bytes from 192.168.2.22: icmp_seq=6 ttl=64 time=1.91 ms
64 bytes from 192.168.2.22: icmp_seq=7 ttl=64 time=7.18 ms
64 bytes from 192.168.2.22: icmp_seq=8 ttl=64 time=30.4 ms
64 bytes from 192.168.2.22: icmp_seq=9 ttl=64 time=1.39 ms
64 bytes from 192.168.2.22: icmp_seq=10 ttl=64 time=4.71 ms
64 bytes from 192.168.2.22: icmp_seq=11 ttl=64 time=1.06 ms
^C
--- 192.168.2.22 ping statistics ---
11 packets transmitted, 11 received, 0% packet loss, time 26ms
rtt min/avg/max/mdev = 1.057/11.140/30.420/11.450 ms
pi@octipi-01:~ $

pi@octipi-01:~ $ ping 192.168.2.214
PING 192.168.2.214 (192.168.2.214) 56(84) bytes of data.
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=8.20 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=2.04 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=44.4 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=64.1 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=83.4 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=55.5 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=26.1 ms
64 bytes from 192.168.2.214: icmp_seq=8 ttl=64 time=48.3 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=71.7 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=93.2 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=123 ms
64 bytes from 192.168.2.214: icmp_seq=13 ttl=64 time=58.3 ms
64 bytes from 192.168.2.214: icmp_seq=14 ttl=64 time=62.0 ms
64 bytes from 192.168.2.214: icmp_seq=15 ttl=64 time=94.1 ms
64 bytes from 192.168.2.214: icmp_seq=16 ttl=64 time=112 ms
^C
--- 192.168.2.214 ping statistics ---
16 packets transmitted, 15 received, 6.25% packet loss, time 53ms
rtt min/avg/max/mdev = 2.042/63.117/122.982/33.782 ms
pi@octipi-01:~ $



dmesg -T -w

[Mon Sep 19 09:52:03 2022] setting hdmi mode 1080p60hz 444,10bit
[Mon Sep 19 09:52:03 2022] cd/cs/cr: 5/2/1
[Mon Sep 19 09:52:03 2022] update rx hdr info 5
[Mon Sep 19 09:52:03 2022] hdmitx: video: already init VIC = 0  Now VIC = 16
[Mon Sep 19 09:52:03 2022] hdmitx: configure venc
[Mon Sep 19 09:52:03 2022] hdmitx: config_tv_enc_calc[57] vic = 16
[Mon Sep 19 09:52:03 2022] hdmitx: configure hdmitx video format timing
[Mon Sep 19 09:52:03 2022] hdmitx: hdmitx_set_dispmode[817]
[Mon Sep 19 09:52:03 2022] hdmitx: frac_rate = 1
[Mon Sep 19 09:52:03 2022] hdmitx: hdmitx21_set_clk[765]
[Mon Sep 19 09:52:03 2022] hdmitx: hdmitx sub-clock: 3712500 2 1 2 8 1 1 1 1 1
[Mon Sep 19 09:52:03 2022] hdmitx: config HPLL = 3712500 frac_rate = 1
[Mon Sep 19 09:52:03 2022] hdmitx: HPLL: 0xdb00049a
[Mon Sep 19 09:52:03 2022] hdmitx: config HPLL done
[Mon Sep 19 09:52:03 2022] hdmitx: clocks_set_vid_clk_div_for_hdmi[237] div = 8
[Mon Sep 19 09:52:03 2022] hdmitx: j = 2  vid_clk_div = 1
[Mon Sep 19 09:52:03 2022] hdmitx: hw:  config hdmitx IP vic = 16 cd:5 cs: 2
[Mon Sep 19 09:52:03 2022] hdmitx: configure hdmitx21
[Mon Sep 19 09:52:03 2022] hdmitx: hw: set audio
[Mon Sep 19 09:52:03 2022] hdmitx: clk_div = 19
[Mon Sep 19 09:52:03 2022] hdmitx: audio_param->channel_num = 1
[Mon Sep 19 09:52:03 2022] hdmitx: hw: hdmitx tx_aud_src = 0
[Mon Sep 19 09:52:03 2022] hdmitx: fs = 2, cd = 5, tmds_clk = 148500
[Mon Sep 19 09:52:03 2022] hdmitx: hw: aud_n_para = 6272
[Mon Sep 19 09:52:03 2022] hdmitx_set_drm_pkt: HDR->SDR, drm_db[0]=2
[Mon Sep 19 09:52:03 2022] hdr_work_func: send zero DRM
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:03 2022] hdmitx: video: Sink is HDMI device
[Mon Sep 19 09:52:03 2022] hdmitx: hw: set audio
[Mon Sep 19 09:52:03 2022] hdmitx: clk_div = 19
[Mon Sep 19 09:52:03 2022] hdmitx: audio_param->channel_num = 1
[Mon Sep 19 09:52:03 2022] hdmitx: hw: hdmitx tx_aud_src = 0
[Mon Sep 19 09:52:03 2022] hdmitx: fs = 2, cd = 5, tmds_clk = 148500
[Mon Sep 19 09:52:03 2022] hdmitx: hw: aud_n_para = 6272
[Mon Sep 19 09:52:03 2022] update rx hdr info 5
[Mon Sep 19 09:52:03 2022] DOLBY: vout_notify_callback: VOUT_EVENT_MODE_CHANGE
[Mon Sep 19 09:52:03 2022] vlock: event MODE_CHANGE
[Mon Sep 19 09:52:03 2022] vdin0,std_dur:59
[Mon Sep 19 09:52:03 2022] vsync_pts_inc 1501 1001/60000
[Mon Sep 19 09:52:03 2022] [drm] meson_vout_update_mode_name: update vout 1 name 1080p60hz.
[Mon Sep 19 09:52:03 2022] drm_hdmitx_get_tx_hdcp_cap tx hdcp [0]
[Mon Sep 19 09:52:03 2022] drm_hdmitx_get_rx_hdcp_cap rx hdcp [1]
[Mon Sep 19 09:52:03 2022] [drm] meson_hdmitx_get_hdcp_request usr_type: 3, hdcp cap: 0,0
[Mon Sep 19 09:52:03 2022] [drm] [meson_hdmitx_get_hdcp_request]: TX no hdcp key
[Mon Sep 19 09:52:03 2022] [drm:meson_hdmitx_update_hdcp [aml_drm]] *ERROR* meet stopped hdcp stat
[Mon Sep 19 09:52:03 2022] [drm:meson_hdmitx_update_hdcp [aml_drm]] *ERROR* No valid hdcp mode exit, maybe hdcp havenot init.
[Mon Sep 19 09:52:03 2022] proc: Bad value for 'hidepid'
[Mon Sep 19 09:52:03 2022] [drm] am_meson_crtc_atomic_flush color_mgmt_changed!
[Mon Sep 19 09:52:03 2022] CPU: 1 PID: 648 Comm: crtc_commit Tainted: G        W         5.4.125 #1.1.1
[Mon Sep 19 09:52:03 2022] Hardware name: Khadas VIM4 (DT)
[Mon Sep 19 09:52:03 2022] Call trace:
[Mon Sep 19 09:52:03 2022] [ffffffc02036bae0+  96][<ffffffd410095978>] dump_backtrace+0x0/0x128
[Mon Sep 19 09:52:03 2022] [ffffffc02036bb40+  32][<ffffffd410095ac4>] show_stack+0x24/0x30
[Mon Sep 19 09:52:03 2022] [ffffffc02036bb60+  64][<ffffffd410e427b8>] dump_stack+0xc0/0xe8
[Mon Sep 19 09:52:03 2022] [ffffffc02036bba0+  80][<ffffffd391f3ec64>] rdma_write_reg+0x19c/0x2e0 [aml_media]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bbf0+ 128][<ffffffd391f3ef20>] rdma_write_reg_bits+0x178/0x3c8 [aml_media]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bc70+  64][<ffffffd391f3fcc8>] VSYNC_WR_MPEG_REG_BITS+0xc8/0xf8 [aml_media]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bcb0+  16][<ffffffd392195048>] am_meson_ctm_disable+0x28/0x38 [aml_media]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bcc0+  80][<ffffffd392d6cad8>] am_meson_crtc_atomic_flush+0x200/0x208 [aml_drm]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bd10+  96][<ffffffd4106f0900>] drm_atomic_helper_commit_planes+0x170/0x240
[Mon Sep 19 09:52:03 2022] [ffffffc02036bd70+  32][<ffffffd4106f0a94>] drm_atomic_helper_commit_tail_rpm+0x44/0x80
[Mon Sep 19 09:52:03 2022] [ffffffc02036bd90+  48][<ffffffd392d6a3b0>] meson_atomic_helper_commit_tail+0x80/0x90 [aml_drm]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bdc0+  48][<ffffffd392d69b94>] commit_tail+0xa4/0x140 [aml_drm]
[Mon Sep 19 09:52:03 2022] [ffffffc02036bdf0+  32][<ffffffd392d69c60>] meson_commit_work+0x30/0x40 [aml_drm]
[Mon Sep 19 09:52:03 2022] [ffffffc02036be10+  80][<ffffffd4100ee424>] kthread_worker_fn+0xdc/0x1f0
[Mon Sep 19 09:52:03 2022] [ffffffc02036be60+   0][<ffffffd4100ee2e0>] kthread+0x158/0x178
[Mon Sep 19 09:52:03 2022] [0000000000000000+   0][<ffffffd410088344>] ret_from_fork+0x10/0x18
[Mon Sep 19 09:52:03 2022] rdma: rdma_write(1) 0(32bd)<=0
[Mon Sep 19 09:52:03 2022] [drm] am_meson_crtc_atomic_flush Set GAMMA
[Mon Sep 19 09:52:04 2022] BT_RADIO going: on
[Mon Sep 19 09:52:04 2022] AML_BT: going ON,btpower_evt=0
[Mon Sep 19 09:52:06 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 2, bssidx: 1
[Mon Sep 19 09:52:13 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 3, bssidx: 1
[Mon Sep 19 09:52:18 2022] VDDIO_CARD: disabling
[Mon Sep 19 09:52:23 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 4, bssidx: 1
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:33 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Mon Sep 19 09:52:37 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 5, bssidx: 1
[Mon Sep 19 09:52:57 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 6, bssidx: 1
[Mon Sep 19 09:53:26 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 7, bssidx: 1
[Mon Sep 19 09:54:09 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 8, bssidx: 1
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_handle_link_down : Link down Reason: WLC_E_DEAUTH_IND
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_iw_event : disconnected with 48:8f:5a:aa:e8:93, event 6, reason 6
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 48:8f:5a:aa:e8:93, WLC_E_DEAUTH_IND(6), reason 6
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_iw_event : [0 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=100663296 reason=6 ie_len=0 from 48:8f:5a:aa:e8:93
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[Mon Sep 19 09:54:10 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[Mon Sep 19 09:54:10 2022] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_conn_debug_info : Connecting with 48:8f:5a:aa:e8:93 ssid "gfi", len (3), channel=48, sec=wpa2psk/mfpn/aes, rssi=-41
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_iw_event : Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_add_keyext : key index (0)
[Mon Sep 19 09:54:11 2022] [dhd] kck:
[Mon Sep 19 09:54:11 2022] [dhd]   0000: be 02 e5 9a 6c 5a 9a fe 7c f0 b7 8e 34 d1 62 81
[Mon Sep 19 09:54:11 2022] [dhd] kek:
[Mon Sep 19 09:54:11 2022] [dhd]   0000: e2 bb 4e ee ce 6e d1 b3 2f e1 d6 6c ed 07 2b 92
[Mon Sep 19 09:54:11 2022] [dhd] replay_ctr:
[Mon Sep 19 09:54:11 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Mon Sep 19 09:54:11 2022] [dhd][wlan0] wl_run_escan : LEGACY_SCAN sync ID: 9, bssidx: 0
[Mon Sep 19 09:54:11 2022] [dhd] CFG80211-ERROR) wl_run_escan :  Escan set error (-16)
[Mon Sep 19 09:54:11 2022] [dhd] CFG80211-ERROR) wl_run_escan : scan error (-16)
[Mon Sep 19 09:54:11 2022] [dhd] CFG80211-ERROR) wl_cfgscan_handle_scanbusy : Scan err = (-16), busy?-16
[Mon Sep 19 09:54:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_scan : scan error (-16)
[Mon Sep 19 09:54:12 2022] [dhd][wlan0] wl_run_escan : LEGACY_SCAN sync ID: 10, bssidx: 0
[Mon Sep 19 09:55:13 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 11, bssidx: 1
[Mon Sep 19 09:56:48 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 12, bssidx: 1
[Mon Sep 19 09:58:49 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 13, bssidx: 1
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_iw_event : disconnected with 48:8f:5a:aa:e8:93, event 6, reason 6
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_handle_link_down : Link down Reason: WLC_E_DEAUTH_IND
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 48:8f:5a:aa:e8:93, WLC_E_DEAUTH_IND(6), reason 6
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_iw_event : [0 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=100663296 reason=6 ie_len=0 from 48:8f:5a:aa:e8:93
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[Mon Sep 19 09:59:11 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[Mon Sep 19 09:59:11 2022] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[Mon Sep 19 09:59:12 2022] [dhd][wlan0] wl_conn_debug_info : Connecting with 48:8f:5a:aa:e8:93 ssid "gfi", len (3), channel=48, sec=wpa2psk/mfpn/aes, rssi=-41
[Mon Sep 19 09:59:12 2022] [dhd][wlan0] wl_iw_event : Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 09:59:12 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 09:59:12 2022] [dhd][wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[Mon Sep 19 09:59:12 2022] [dhd][wlan0] wl_add_keyext : key index (0)
[Mon Sep 19 09:59:12 2022] [dhd] kck:
[Mon Sep 19 09:59:12 2022] [dhd]   0000: 27 8b b8 20 35 fa ef e5 b2 7d 85 2d b5 4f 23 cd
[Mon Sep 19 09:59:12 2022] [dhd] kek:
[Mon Sep 19 09:59:12 2022] [dhd]   0000: d4 65 83 2f 2a 66 ff 63 c8 09 12 94 ad 0c ed eb
[Mon Sep 19 09:59:12 2022] [dhd] replay_ctr:
[Mon Sep 19 09:59:12 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Mon Sep 19 10:00:50 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 14, bssidx: 1
[Mon Sep 19 10:02:51 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 15, bssidx: 1
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_handle_link_down : Link down Reason: WLC_E_DEAUTH_IND
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_iw_event : disconnected with 48:8f:5a:aa:e8:93, event 6, reason 6
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 48:8f:5a:aa:e8:93, WLC_E_DEAUTH_IND(6), reason 6
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_iw_event : [0 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=100663296 reason=6 ie_len=0 from 48:8f:5a:aa:e8:93
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[Mon Sep 19 10:04:05 2022] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_conn_debug_info : Connecting with 48:8f:5a:aa:e8:93 ssid "gfi", len (3), channel=48, sec=wpa2psk/mfpn/aes, rssi=-40
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_iw_event : Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link UP with 48:8f:5a:aa:e8:93
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[Mon Sep 19 10:04:05 2022] [dhd][wlan0] wl_add_keyext : key index (0)
[Mon Sep 19 10:04:05 2022] [dhd] kck:
[Mon Sep 19 10:04:05 2022] [dhd]   0000: 0d 3a b4 c3 5d ac a7 5b 8b 60 9d f5 c1 51 85 b6
[Mon Sep 19 10:04:05 2022] [dhd] kek:
[Mon Sep 19 10:04:05 2022] [dhd]   0000: 76 97 ad 89 e6 df 34 32 5c bf ce 0d b7 ad cb 92
[Mon Sep 19 10:04:05 2022] [dhd] replay_ctr:
[Mon Sep 19 10:04:05 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Mon Sep 19 10:04:52 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 16, bssidx: 1
[Mon Sep 19 10:06:53 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 17, bssidx: 1

Ok… thought i’d chime in here… I tried following the steps above for the patch but got something a little different on mine … not sure why…


root@Khadas:~# wget https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
--2022-09-19 14:15:01--  https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.1.1_arm64.deb
Resolving dl.khadas.com (dl.khadas.com)... 135.181.182.36
Connecting to dl.khadas.com (dl.khadas.com)|135.181.182.36|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15413160 (15M) [application/octet-stream]
Saving to: ‘linux-image-amlogic-5.4_1.1.1_arm64.deb’

linux-image-amlogic-5.4_1.1.1_arm6 100%[=============================================================>]  14.70M  5.62MB/s    in 2.6s    

2022-09-19 14:15:05 (5.62 MB/s) - ‘linux-image-amlogic-5.4_1.1.1_arm64.deb’ saved [15413160/15413160]

root@Khadas:~# dpkg -i linux-image-amlogic-5.4_1.1.1_arm64.deb
(Reading database ... 74511 files and directories currently installed.)
Preparing to unpack linux-image-amlogic-5.4_1.1.1_arm64.deb ...
Unpacking linux-image-amlogic-5.4 (1.1.1) over (1.1) ...
Setting up linux-image-amlogic-5.4 (1.1.1) ...
update-initramfs: Generating /boot/initrd.img-5.4.125
/etc/initramfs-tools/scripts/local-top/khadas_init.sh: 41: cannot create /sys/class/graphics/fb0/blank: Directory nonexistent
/etc/initramfs-tools/scripts/local-top/khadas_init.sh: 44: cannot create /sys/class/graphics/fb1/blank: Directory nonexistent


rickf@Khadas:~$ ls -la /sys/class/graphics/
total 0
drwxr-xr-x   2 root root 0 Sep 18 21:46 .
drwxr-xr-x 152 root root 0 Sep 18 21:46 ..
lrwxrwxrwx   1 root root 0 Sep 18 21:46 fbcon -> ../../devices/virtual/graphics/fbcon

rickf@Khadas:~$ uname -a
Linux Khadas 5.4.125 #1.1 SMP PREEMPT Thu Jul 21 17:05:37 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
rickf@Khadas:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
rickf@Khadas:~$  

I’m not going to proceed as I’m not sure why I got the errors… My system was installed the other day using oowow…

I should note that I’m using the server version of ubuntu… not the full Gnome version. Maybe that’s an issue…?

Hello @numbqq Report on your patch for WiFi latency and freeze issues.

I have been running the system with your patch for about 24 hours now and your work seems to reduced the problem considerably. I have only experienced one ‘freeze’ of a ssh session since applying your code, this where the session stopped accepting keyboard input and stops terminal output for on the order of 5 to 10 seconds. That said, I continue to see the dmesg sequence of messages that seem to indicated that the VIM4 drops it WiFi connection to the access point and then immediately reestablishes it. This continues to occur on a very regular basis, I would guess once every 5 minutes. It almost seems like there is something timing out at 5 minute interval.

In watching pings of VIM4 from another machine on the same WiFi network, I note something interesting. With no network activity on the VIM4, the the ping times to the VIM4 are on to order of 100 ms plus. However, as soon as I start ssh session to the VIM4 that is just does a listing of a network volume ‘ls -Rlat /media/nas00-v00 > /dev/null’, the ping times drop to well under 10 ms. Not sure why this would make a difference.

I also do not perceive the ‘laggy’ response that was very noticeable prior to applying your patch.

No network activity on VIM4

pi@rhasspy:~ $ ping 192.168.2.214
PING 192.168.2.214 (192.168.2.214) 56(84) bytes of data.
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=215 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=151 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=262 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=350 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=212 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=231 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=45.5 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=64.9 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=209 ms
64 bytes from 192.168.2.214: icmp_seq=11 ttl=64 time=211 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=132 ms

With VIM4 doing a long continuous scroll of a ls -R of a network volume

pi@rhasspy:~ $ ping 192.168.2.214
PING 192.168.2.214 (192.168.2.214) 56(84) bytes of data.
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=2.89 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=2.36 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=26.4 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=9.51 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=17.6 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=7.33 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=5.40 ms
64 bytes from 192.168.2.214: icmp_seq=8 ttl=64 time=208 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=2.71 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=124 ms
64 bytes from 192.168.2.214: icmp_seq=11 ttl=64 time=6.58 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=6.59 ms
64 bytes from 192.168.2.214: icmp_seq=13 ttl=64 time=2.37 ms
64 bytes from 192.168.2.214: icmp_seq=14 ttl=64 time=454 ms
64 bytes from 192.168.2.214: icmp_seq=15 ttl=64 time=132 ms
64 bytes from 192.168.2.214: icmp_seq=16 ttl=64 time=7.70 ms
64 bytes from 192.168.2.214: icmp_seq=17 ttl=64 time=6.18 ms
64 bytes from 192.168.2.214: icmp_seq=18 ttl=64 time=3.39 ms
64 bytes from 192.168.2.214: icmp_seq=19 ttl=64 time=2.84 ms
64 bytes from 192.168.2.214: icmp_seq=20 ttl=64 time=3.62 ms
64 bytes from 192.168.2.214: icmp_seq=21 ttl=64 time=3.70 ms
64 bytes from 192.168.2.214: icmp_seq=22 ttl=64 time=4.86 ms
64 bytes from 192.168.2.214: icmp_seq=23 ttl=64 time=4.04 ms
64 bytes from 192.168.2.214: icmp_seq=24 ttl=64 time=4.98 ms
64 bytes from 192.168.2.214: icmp_seq=25 ttl=64 time=2.55 ms
64 bytes from 192.168.2.214: icmp_seq=27 ttl=64 time=41.9 ms

dmesg -T -w output that seems to show the rather regular repeating of the ‘Link down Reason: WLC_E_DEAUTH_IND’ sequence

[Tue Sep 20 12:35:13 2022] [dhd] kck:
[Tue Sep 20 12:35:13 2022] [dhd]   0000: 02 71 19 37 9e 82 b4 a3 e2 fb 48 3d 0f 51 2b 7e
[Tue Sep 20 12:35:13 2022] [dhd] kek:
[Tue Sep 20 12:35:13 2022] [dhd]   0000: 42 f0 7a cc 2d aa a3 16 e3 72 bd c9 6c 65 f8 c0
[Tue Sep 20 12:35:13 2022] [dhd] replay_ctr:
[Tue Sep 20 12:35:13 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Tue Sep 20 12:35:26 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 20, bssidx: 1
[Tue Sep 20 12:37:27 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 21, bssidx: 1
[Tue Sep 20 12:39:28 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 22, bssidx: 1
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_iw_event : disconnected with 48:8f:5a:c0:c6:25, event 6, reason 6
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_handle_link_down : Link down Reason: WLC_E_DEAUTH_IND
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 48:8f:5a:c0:c6:25, WLC_E_DEAUTH_IND(6), reason 6
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_iw_event : [0 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=100663296 reason=6 ie_len=0 from 48:8f:5a:c0:c6:25
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[Tue Sep 20 12:40:13 2022] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_conn_debug_info : Connecting with 48:8f:5a:c0:c6:25 ssid "gfi", len (3), channel=48, sec=wpa2psk/mfpn/aes, rssi=-68
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_iw_event : Link UP with 48:8f:5a:c0:c6:25
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link UP with 48:8f:5a:c0:c6:25
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[Tue Sep 20 12:40:13 2022] [dhd][wlan0] wl_add_keyext : key index (0)
[Tue Sep 20 12:40:13 2022] [dhd] CFG80211-ERROR) wl_add_keyext : WLC_SET_KEY error (-8)
[Tue Sep 20 12:40:13 2022] [dhd] kck:
[Tue Sep 20 12:40:13 2022] [dhd]   0000: 37 50 5d 8c 57 c7 70 5c 1d 51 fd b5 60 d2 ad 74
[Tue Sep 20 12:40:13 2022] [dhd] kek:
[Tue Sep 20 12:40:13 2022] [dhd]   0000: 60 59 78 27 59 69 f2 85 66 f8 bd dc 76 24 04 bd
[Tue Sep 20 12:40:13 2022] [dhd] replay_ctr:
[Tue Sep 20 12:40:13 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Tue Sep 20 12:41:19 2022] CIFS VFS: Autodisabling the use of server inode numbers on \\192.168.2.5\nas00-v00.
[Tue Sep 20 12:41:19 2022] CIFS VFS: The server doesn't seem to support them properly or the files might be on different servers (DFS).
[Tue Sep 20 12:41:19 2022] CIFS VFS: Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.
[Tue Sep 20 12:41:29 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 23, bssidx: 1
[Tue Sep 20 12:43:30 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 24, bssidx: 1
[Tue Sep 20 12:43:35 2022] CIFS VFS: Close unmatched open
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_handle_link_down : Link down Reason: WLC_E_DEAUTH_IND
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_iw_event : disconnected with 48:8f:5a:c0:c6:25, event 6, reason 6
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 48:8f:5a:c0:c6:25, WLC_E_DEAUTH_IND(6), reason 6
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_iw_event : [0 times] disconnected with 00:00:00:00:00:00, event 11, reason 8
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_DISASSOC(11), reason 8
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_handle_link_down : Disconnect event sent to upper layerevent:6 e->reason=100663296 reason=6 ie_len=0 from 48:8f:5a:c0:c6:25
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_iw_event : Link Down with 00:00:00:00:00:00, reason=2
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link down with 00:00:00:00:00:00, WLC_E_LINK(16), reason 2
[Tue Sep 20 12:45:12 2022] [dhd] CFG80211-ERROR) wl_notify_connect_status_sta : Unexpected event:16 in assoc idle state
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_conn_debug_info : Connecting with 48:8f:5a:c0:c6:25 ssid "gfi", len (3), channel=48, sec=wpa2psk/mfpn/aes, rssi=-67
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_iw_event : Link UP with 48:8f:5a:c0:c6:25
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_ext_iapsta_event : [S] Link UP with 48:8f:5a:c0:c6:25
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_bss_connect_done : Report connect result - connection succeeded
[Tue Sep 20 12:45:12 2022] [dhd][wlan0] wl_add_keyext : key index (0)
[Tue Sep 20 12:45:12 2022] [dhd] kck:
[Tue Sep 20 12:45:12 2022] [dhd]   0000: 11 a2 2d 7d ed 9a 26 72 37 8f c7 89 43 45 b4 73
[Tue Sep 20 12:45:12 2022] [dhd] kek:
[Tue Sep 20 12:45:12 2022] [dhd]   0000: 53 16 d9 b3 15 9f 7c b9 dc 35 f9 94 ee 75 79 ff
[Tue Sep 20 12:45:12 2022] [dhd] replay_ctr:
[Tue Sep 20 12:45:12 2022] [dhd]   0000: 00 00 00 00 00 00 00 02
[Tue Sep 20 12:45:31 2022] [dhd][wlan1] wl_run_escan : LEGACY_SCAN sync ID: 25, bssidx: 1

Hello @numbqq Some further info. I let the VIM4 sit over night with the monitor attached to HDMI turned off. When I tried to ssh into the VIM4 this morning, it would not accept a connection, no response at all. You could still ping the VIM4 from another machine. However until I turned on the monitor and did something on the GUI, in this case I played an .MP3 file. Until I did this it would allow the SSH to connect. I have Ubuntu set to NOT to automatic suspend and it was not sleeping.

The HDMI monitor and USB devices are connected via a KVM switch, so these all were ‘disconnected’ during the night.

Hello @deepvim

What’s the result of you PC with Wi-Fi to test with the same router?

Hello @numbqq I left the VIM4 running over night with the KVM set to the the VIM4, so the monitor and all USB devices where connected to the VIM4 over night. The VIM4 is connected to the Mikrotik WiFi WDS. I left a ssh session from another machine connected to the VIM4 over night as well.

As I looked at the VIM4 this morning, the ssh session was alive. But as I typed on the session, it froze and dropped off completely from the VIM4. After a couple tries, the ssh session reconnected. However, this terminal session is showing the freezing problem again as I sit here. dmesg is still showing the wifi disconnect / reconnect messages on the regular basis, about every 5 minutes. Pinging the VIM4 continues to show a ping turn around time averaging well over 100 ms :

--- 192.168.2.214 ping statistics ---
43 packets transmitted, 43 received, 0% packet loss, time 42062ms
rtt min/avg/max/mdev = 4.704/148.124/700.485/112.995 ms

So my report back to you is much less positive than yesterday. Today, I do not think your patch made any significant improvement to the WiFi problem.

Also note on the use of the KVM with the VIM4, I do not think it is a factor, I had the same poor WiFi results when the VIM4 was connected directly to a HDMI monitor and USB keyboard and mouse directly connected to the VIM4’s USB.

Hi there,
I have configured my vim4 to be hotspot in the following way:
$ sudo nmcli con add type wifi ifname wlan1 con-name Hostspot autoconnect yes ssid khadas_ap
$ sudo nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
$ sudo nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
$ sudo nmcli con modify Hostspot wifi-sec.psk “12345678”
$ sudo nmcli con modify Hostspot ipv4.addresses 192.168.2.20/24
$ sudo nmcli con modify Hostspot ipv4.gateway 192.168.2.1
$ sudo nmcli con up Hostspot

So, how to know if it’s wifi6 standard?
How to configure it to be wifi6(802.11ax) or others(802.11b/g/n/ac)?

Thank you

Hello @numbqq

I have continued exploring the WiFi issue I am having with the VIM4. After doing some more research on the Mikrotik side of the equation, it does appear that the generation of Mikrotik wifi adapters are a considerable contributor to the disconnect and latency exhibited in ssh. I have replaced the Mikrotik wifi access points with NetGear Nighthawk WiFi 6 mesh access point setup and the experience on the VIM4 is dramatically better. This is the current Ubuntu 22.04 image (July) and WITHOUT your patch.

The Mikrotik pre wifi 6 hardware does seems to have some significant issues with clients with WiFi 6 adapters. I think the VIM4 suffered the most of the two WiFi 6 connected machine I am testing, but in general I think even with the latest Mikrotik RouterOS version 7.5 both WiFi 6 machines had issues. I was not able to upgrade my Mikrotik access points to their latest WiFiWave2 drivers as my Mikrotik devices where too old to support these new drivers (2 years old). When I upgraded from version 6.49 to 7.5 of RouterOS, the problems reduced a small amount, but not enough to be acceptable.

So, I ripped and replaced the Mikrotik WiFi access points with the NetGear NightHawk wifi 6 based units.

After testing the VIM4 against these Netgear WiFi 6 access points the majority of the noticeable problems are gone. I am still seeing the following two issues, even of they at this time are not causing and issues for me:

  1. The ‘wl_conf80211’ error message pops up in dmesg in spurts of 10 or so messages in a row several times a day. I have yet to find a pattern I can call a cause or relation.

  2. The ping turn around times on the VIM4 continue to be on the order of at least 10 times slower that pinging to a MeLE WiFi 6 device right next to the VIM4 or a Raspberry Pi 4 again right next to the VIM4

[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:11 2022] proc: Bad value for 'hidepid'
[Sat Oct  1 15:55:41 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:42 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:42 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:42 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:42 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[Sat Oct  1 15:55:42 2022] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing

Ping round trip times from a ethernet connected linux machine to three devices on a NetGear WiFi 6 Mesh access point


# VIM4 Wifi 6
user@macmini2012:~$ ping -c 20 192.168.2.214
PING 192.168.2.214 (192.168.2.214) 56(84) bytes of data.
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=37.1 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=74.1 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=4.68 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=3.14 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=20.9 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=42.6 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=65.0 ms
64 bytes from 192.168.2.214: icmp_seq=8 ttl=64 time=84.9 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=5.77 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=36.1 ms
64 bytes from 192.168.2.214: icmp_seq=11 ttl=64 time=155 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=175 ms
64 bytes from 192.168.2.214: icmp_seq=13 ttl=64 time=199 ms
64 bytes from 192.168.2.214: icmp_seq=14 ttl=64 time=223 ms
64 bytes from 192.168.2.214: icmp_seq=15 ttl=64 time=142 ms
64 bytes from 192.168.2.214: icmp_seq=16 ttl=64 time=218 ms
64 bytes from 192.168.2.214: icmp_seq=17 ttl=64 time=189 ms
64 bytes from 192.168.2.214: icmp_seq=18 ttl=64 time=112 ms
64 bytes from 192.168.2.214: icmp_seq=19 ttl=64 time=31.0 ms
64 bytes from 192.168.2.214: icmp_seq=20 ttl=64 time=54.4 ms

--- 192.168.2.214 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19025ms
rtt min/avg/max/mdev = 3.140/93.666/223.306/74.353 ms

# MeLE Quieter 3 Wifi 6
user@macmini2012:~$ ping -c 20 192.168.2.132
PING 192.168.2.132 (192.168.2.132) 56(84) bytes of data.
64 bytes from 192.168.2.132: icmp_seq=1 ttl=64 time=1.95 ms
64 bytes from 192.168.2.132: icmp_seq=2 ttl=64 time=3.17 ms
64 bytes from 192.168.2.132: icmp_seq=3 ttl=64 time=6.07 ms
64 bytes from 192.168.2.132: icmp_seq=4 ttl=64 time=2.27 ms
64 bytes from 192.168.2.132: icmp_seq=5 ttl=64 time=2.46 ms
64 bytes from 192.168.2.132: icmp_seq=6 ttl=64 time=2.21 ms
64 bytes from 192.168.2.132: icmp_seq=7 ttl=64 time=1.97 ms
64 bytes from 192.168.2.132: icmp_seq=8 ttl=64 time=2.18 ms
64 bytes from 192.168.2.132: icmp_seq=9 ttl=64 time=1.96 ms
64 bytes from 192.168.2.132: icmp_seq=10 ttl=64 time=2.69 ms
64 bytes from 192.168.2.132: icmp_seq=11 ttl=64 time=3.08 ms
64 bytes from 192.168.2.132: icmp_seq=12 ttl=64 time=3.56 ms
64 bytes from 192.168.2.132: icmp_seq=13 ttl=64 time=2.92 ms
64 bytes from 192.168.2.132: icmp_seq=14 ttl=64 time=25.5 ms
64 bytes from 192.168.2.132: icmp_seq=15 ttl=64 time=2.96 ms
64 bytes from 192.168.2.132: icmp_seq=16 ttl=64 time=2.79 ms
64 bytes from 192.168.2.132: icmp_seq=17 ttl=64 time=3.59 ms
64 bytes from 192.168.2.132: icmp_seq=18 ttl=64 time=2.76 ms
64 bytes from 192.168.2.132: icmp_seq=19 ttl=64 time=3.42 ms
64 bytes from 192.168.2.132: icmp_seq=20 ttl=64 time=3.80 ms

--- 192.168.2.132 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19025ms
rtt min/avg/max/mdev = 1.954/4.067/25.544/5.009 ms

# Raspberry Pi 4
user@macmini2012:~$ ping -c 20 192.168.2.30
PING 192.168.2.30 (192.168.2.30) 56(84) bytes of data.
64 bytes from 192.168.2.30: icmp_seq=1 ttl=64 time=12.9 ms
64 bytes from 192.168.2.30: icmp_seq=2 ttl=64 time=3.15 ms
64 bytes from 192.168.2.30: icmp_seq=3 ttl=64 time=2.53 ms
64 bytes from 192.168.2.30: icmp_seq=4 ttl=64 time=2.39 ms
64 bytes from 192.168.2.30: icmp_seq=5 ttl=64 time=4.19 ms
64 bytes from 192.168.2.30: icmp_seq=6 ttl=64 time=2.36 ms
64 bytes from 192.168.2.30: icmp_seq=7 ttl=64 time=2.04 ms
64 bytes from 192.168.2.30: icmp_seq=8 ttl=64 time=1.90 ms
64 bytes from 192.168.2.30: icmp_seq=9 ttl=64 time=5.04 ms
64 bytes from 192.168.2.30: icmp_seq=10 ttl=64 time=2.14 ms
64 bytes from 192.168.2.30: icmp_seq=11 ttl=64 time=3.20 ms
64 bytes from 192.168.2.30: icmp_seq=12 ttl=64 time=2.43 ms
64 bytes from 192.168.2.30: icmp_seq=13 ttl=64 time=2.35 ms
64 bytes from 192.168.2.30: icmp_seq=14 ttl=64 time=1.92 ms
64 bytes from 192.168.2.30: icmp_seq=15 ttl=64 time=2.35 ms
64 bytes from 192.168.2.30: icmp_seq=16 ttl=64 time=2.37 ms
64 bytes from 192.168.2.30: icmp_seq=17 ttl=64 time=2.51 ms
64 bytes from 192.168.2.30: icmp_seq=18 ttl=64 time=3.30 ms
64 bytes from 192.168.2.30: icmp_seq=19 ttl=64 time=2.41 ms
64 bytes from 192.168.2.30: icmp_seq=20 ttl=64 time=2.34 ms

--- 192.168.2.30 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19027ms
rtt min/avg/max/mdev = 1.904/3.190/12.904/2.353 ms

These messages are not harmful, we will disable it in next release.

Have you attache the antennas?

Hi @numbqq,

Yes, antennas have been on since I first set up the device.

Below is a less than scientific comparison just this moment pinging the VIM4 and a Quieter 3 that are sitting side by side and attached to same access point at 5 GHz on same NetGear WiFi 6 system. Average ping round trip time of VIM4 appears to be 40 times longer.

As I said in an earlier post, after I replaced the Mikrotik wifi access points with the Netgear access points, I do NOT perceive the ‘keyboard to eye’ delays I saw before and the VIM4 stays connected via SSH with no issues. Just seeing the two issues that you are responding to. And neither is a ‘show stopper’ that I saw before.

Again, I do not want to put all the blame on the Mikrotik access points, as the Quieter 3 with Wifi 6 adapter did did not show the problem that the VIM4 showed. So, there is a shared problem it appears between VIM4 and some WiFi 5 access points.

Thanks for your work, still looking forward to seeing the VIM4 show all it’s best.



user@Khadas:~$ iwconfig
ip_vti0   no wireless extensions.

dummy0    no wireless extensions.

lo        no wireless extensions.

ip6_vti0  no wireless extensions.

wlan1     IEEE 802.11  ESSID:""
          Mode:Master  Frequency:5.22 GHz  Access Point: Not-Associated
          Bit Rate:1.2005 Gb/s   Tx-Power:32 dBm
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=5/5  Signal level=-2 dBm  Noise level=-87 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlan0     IEEE 802.11  ESSID:"gfi"
          Mode:Master  Frequency:5.22 GHz  Access Point: 10:0C:6B:F6:30:E6
          Bit Rate=864.5 Mb/s   Tx-Power:32 dBm
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Power Managementmode:All packets received
          Link Quality=5/5  Signal level=-38 dBm  Noise level=-87 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ip6tnl0   no wireless extensions.

eth0      no wireless extensions.

----- 

user@quieter3-01:~$ iwconfig
lo        no wireless extensions.

enp1s0    no wireless extensions.

wlp0s20f3  IEEE 802.11  ESSID:"gfi"
          Mode:Managed  Frequency:5.22 GHz  Access Point: 10:0C:6B:F6:30:E6
          Bit Rate=626.9 Mb/s   Tx-Power=22 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=52/70  Signal level=-58 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:1232589   Missed beacon:0
----- ping to khadas vim4 
dproffer@graymini ~ % ping 192.168.2.214
PING 192.168.2.214 (192.168.2.214): 56 data bytes
64 bytes from 192.168.2.214: icmp_seq=0 ttl=64 time=59.222 ms
64 bytes from 192.168.2.214: icmp_seq=1 ttl=64 time=88.678 ms
64 bytes from 192.168.2.214: icmp_seq=2 ttl=64 time=108.624 ms
64 bytes from 192.168.2.214: icmp_seq=3 ttl=64 time=29.504 ms
64 bytes from 192.168.2.214: icmp_seq=4 ttl=64 time=48.812 ms
64 bytes from 192.168.2.214: icmp_seq=5 ttl=64 time=59.711 ms
64 bytes from 192.168.2.214: icmp_seq=6 ttl=64 time=91.370 ms
64 bytes from 192.168.2.214: icmp_seq=7 ttl=64 time=215.597 ms
64 bytes from 192.168.2.214: icmp_seq=8 ttl=64 time=33.784 ms
64 bytes from 192.168.2.214: icmp_seq=9 ttl=64 time=52.953 ms
64 bytes from 192.168.2.214: icmp_seq=10 ttl=64 time=76.566 ms
64 bytes from 192.168.2.214: icmp_seq=11 ttl=64 time=102.648 ms
64 bytes from 192.168.2.214: icmp_seq=12 ttl=64 time=112.588 ms
^C
--- 192.168.2.214 ping statistics ---
13 packets transmitted, 13 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 29.504/83.081/215.597/46.498 ms

----- ping to quieter 3
dproffer@graymini ~ % ping 192.168.2.132
PING 192.168.2.132 (192.168.2.132): 56 data bytes
64 bytes from 192.168.2.132: icmp_seq=0 ttl=64 time=1.908 ms
64 bytes from 192.168.2.132: icmp_seq=1 ttl=64 time=1.538 ms
64 bytes from 192.168.2.132: icmp_seq=2 ttl=64 time=2.665 ms
64 bytes from 192.168.2.132: icmp_seq=3 ttl=64 time=2.666 ms
64 bytes from 192.168.2.132: icmp_seq=4 ttl=64 time=2.445 ms
64 bytes from 192.168.2.132: icmp_seq=5 ttl=64 time=1.641 ms
64 bytes from 192.168.2.132: icmp_seq=6 ttl=64 time=1.541 ms
64 bytes from 192.168.2.132: icmp_seq=7 ttl=64 time=2.097 ms
64 bytes from 192.168.2.132: icmp_seq=8 ttl=64 time=1.860 ms
64 bytes from 192.168.2.132: icmp_seq=9 ttl=64 time=1.990 ms
64 bytes from 192.168.2.132: icmp_seq=10 ttl=64 time=2.469 ms
64 bytes from 192.168.2.132: icmp_seq=11 ttl=64 time=1.986 ms
^C
--- 192.168.2.132 ping statistics ---
12 packets transmitted, 12 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.538/2.067/2.666/0.392 ms
dproffer@graymini ~ %

Hello @deepvim

I have some positive improgress on my side about the Wi-Fi latency issue, I need your help to check on your side.

Execute the command below:

$ echo wl_preinit=pm2_sleep_ret=2000 | sudo tee /lib/firmware/brcm/config_bcm43752a2_ag.txt
$ sync
$ sudo reboot

After reboot, please check the Wi-Fi latency again.

Here is the test results from my side.

Before:

nick@Nick:/tmp$ ping 192.168.30.66 -c 20
PING 192.168.30.66 (192.168.30.66) 56(84) bytes of data.
64 bytes from 192.168.30.66: icmp_seq=1 ttl=64 time=71.3 ms
64 bytes from 192.168.30.66: icmp_seq=2 ttl=64 time=198 ms
64 bytes from 192.168.30.66: icmp_seq=3 ttl=64 time=13.6 ms
64 bytes from 192.168.30.66: icmp_seq=4 ttl=64 time=137 ms
64 bytes from 192.168.30.66: icmp_seq=5 ttl=64 time=164 ms
64 bytes from 192.168.30.66: icmp_seq=6 ttl=64 time=83.4 ms
64 bytes from 192.168.30.66: icmp_seq=7 ttl=64 time=209 ms
64 bytes from 192.168.30.66: icmp_seq=8 ttl=64 time=126 ms
64 bytes from 192.168.30.66: icmp_seq=9 ttl=64 time=152 ms
64 bytes from 192.168.30.66: icmp_seq=10 ttl=64 time=172 ms
64 bytes from 192.168.30.66: icmp_seq=11 ttl=64 time=2.13 ms
64 bytes from 192.168.30.66: icmp_seq=12 ttl=64 time=221 ms
64 bytes from 192.168.30.66: icmp_seq=13 ttl=64 time=35.8 ms
64 bytes from 192.168.30.66: icmp_seq=14 ttl=64 time=57.3 ms
64 bytes from 192.168.30.66: icmp_seq=15 ttl=64 time=182 ms
64 bytes from 192.168.30.66: icmp_seq=16 ttl=64 time=109 ms
64 bytes from 192.168.30.66: icmp_seq=17 ttl=64 time=128 ms
64 bytes from 192.168.30.66: icmp_seq=18 ttl=64 time=147 ms
64 bytes from 192.168.30.66: icmp_seq=19 ttl=64 time=171 ms
64 bytes from 192.168.30.66: icmp_seq=20 ttl=64 time=88.8 ms

--- 192.168.30.66 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19027ms
rtt min/avg/max/mdev = 2.128/123.424/220.909/62.555 ms

After:

nick@Nick:/tmp$ ping 192.168.30.66 -c 20
PING 192.168.30.66 (192.168.30.66) 56(84) bytes of data.
64 bytes from 192.168.30.66: icmp_seq=1 ttl=64 time=7.29 ms
64 bytes from 192.168.30.66: icmp_seq=2 ttl=64 time=12.3 ms
64 bytes from 192.168.30.66: icmp_seq=3 ttl=64 time=39.9 ms
64 bytes from 192.168.30.66: icmp_seq=4 ttl=64 time=4.30 ms
64 bytes from 192.168.30.66: icmp_seq=5 ttl=64 time=5.00 ms
64 bytes from 192.168.30.66: icmp_seq=6 ttl=64 time=3.20 ms
64 bytes from 192.168.30.66: icmp_seq=7 ttl=64 time=3.44 ms
64 bytes from 192.168.30.66: icmp_seq=8 ttl=64 time=4.93 ms
64 bytes from 192.168.30.66: icmp_seq=9 ttl=64 time=5.62 ms
64 bytes from 192.168.30.66: icmp_seq=10 ttl=64 time=10.4 ms
64 bytes from 192.168.30.66: icmp_seq=11 ttl=64 time=11.7 ms
64 bytes from 192.168.30.66: icmp_seq=12 ttl=64 time=11.0 ms
64 bytes from 192.168.30.66: icmp_seq=13 ttl=64 time=8.26 ms
64 bytes from 192.168.30.66: icmp_seq=14 ttl=64 time=6.82 ms
64 bytes from 192.168.30.66: icmp_seq=15 ttl=64 time=9.32 ms
64 bytes from 192.168.30.66: icmp_seq=16 ttl=64 time=8.83 ms
64 bytes from 192.168.30.66: icmp_seq=17 ttl=64 time=9.81 ms
64 bytes from 192.168.30.66: icmp_seq=18 ttl=64 time=9.54 ms
64 bytes from 192.168.30.66: icmp_seq=19 ttl=64 time=8.13 ms
64 bytes from 192.168.30.66: icmp_seq=20 ttl=64 time=24.1 ms

--- 192.168.30.66 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19030ms
rtt min/avg/max/mdev = 3.203/10.192/39.899/8.120 ms

2 Likes

I don’t have the same Wi-Fi issues as @deepvim, but I’ve always had the laggy problem… many many times when I just go to hit the backspace or recall the last shell command it’s like I wasn’t even hitting a key on the keyboard. Very frustrating!

But this seems, at first glance anyway, to have fixed it … I’ll need more time to verify but it looks promising indeed!! Thank you for the efforts!! Hopefully this will fix things for @deepvim and others!

I’ve had a little time to play with it some more and this is definitely a HUGE improvement to me! The laggy shell sessions are gone and now it feels the same as my RPI4b… snappy & responsive… Thank you!!!

Hello @deepvim

Any update here? If no update, we will close this topic.

Hello,
I’ve been working on other recently, so I haven’t kept track of all that you discussed. Please let me know if this is the final solution to the WiFi latency issue? If so, I will highlight the "Solution " tag and close it.

Yes, it should be, does it works for you?

Okay, so I’ll light up the “Solutions” tag. I’m not sure yet, because I’ve been working on vim3 recently. If there are any questions after that, we’ll reopen this issue.