Making an SSH connection over wifi to a RPi3 running (as of right now the latest commit) postmarketOS is unbelievably slow. I'm not sure what we can do about this and if I'm the only one or not, but right now it's unbearable. Response to typing in a character can be either instant or take a second or two.
â–¶ ping 192.168.1.180
PING 192.168.1.180 (192.168.1.180) 56(84) bytes of data.
64 bytes from 192.168.1.180: icmp_seq=1 ttl=64 time=5.49 ms
64 bytes from 192.168.1.180: icmp_seq=2 ttl=64 time=2.75 ms
64 bytes from 192.168.1.180: icmp_seq=6 ttl=64 time=5.86 ms
64 bytes from 192.168.1.180: icmp_seq=7 ttl=64 time=4.19 ms
64 bytes from 192.168.1.180: icmp_seq=11 ttl=64 time=8.67 ms
64 bytes from 192.168.1.180: icmp_seq=12 ttl=64 time=4.18 ms
^C
--- 192.168.1.180 ping statistics ---
12 packets transmitted, 6 received, 50% packet loss, time 11164ms
rtt min/avg/max/mdev = 2.755/5.195/8.676/1.854 ms
As you can see there is quite a bit of packet loss as well.
@drebrez you have made the original raspberry-pi package, and @yangxuan8282 you have added wifi and Bluetooth functionality. Can any of you reproduce this issue?
@PureTryOut
the PR I created was related to RPi 3B+ wifi, have nothing to do with RPi 3B wifi
I remember used to got same issues on 3B, many packet loss when use wifi connection.
But my current pmos installation not have this issues, the kernel is from this PR https://github.com/postmarketOS/pmbootstrap/pull/1543
ping 192.168.2.106
PING 192.168.2.106 (192.168.2.106) 56(84) bytes of data.
64 bytes from 192.168.2.106: icmp_seq=1 ttl=64 time=7.40 ms
64 bytes from 192.168.2.106: icmp_seq=2 ttl=64 time=6.00 ms
64 bytes from 192.168.2.106: icmp_seq=3 ttl=64 time=5.69 ms
64 bytes from 192.168.2.106: icmp_seq=4 ttl=64 time=6.47 ms
64 bytes from 192.168.2.106: icmp_seq=5 ttl=64 time=7.44 ms
64 bytes from 192.168.2.106: icmp_seq=6 ttl=64 time=8.45 ms
64 bytes from 192.168.2.106: icmp_seq=7 ttl=64 time=7.49 ms
64 bytes from 192.168.2.106: icmp_seq=8 ttl=64 time=5.95 ms
64 bytes from 192.168.2.106: icmp_seq=9 ttl=64 time=6.18 ms
64 bytes from 192.168.2.106: icmp_seq=10 ttl=64 time=21.6 ms
^C
--- 192.168.2.106 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9007ms
rtt min/avg/max/mdev = 5.696/8.274/21.631/4.531 ms
the last one take 21.6ms, and I did more test, sometimes it take long time, but at least no packet loss
the info about RPi 3b wifi as far as I know is:
the firmware we need:
https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm/brcmfmac43430-sdio.bin
https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm/brcmfmac43430-sdio.txt
you can find related info from dmesg with:
dmesg | grep brcmfmac
on kernel side (this is for downstream 4.14.y, because I only know this one), after read some issues ( https://github.com/raspberrypi/linux/issues/2124 ), quote from this issues:
The WiFi interface is connected via SDIO on mmc1 using GPIOs 34-39
to make mmc1 appears (so that wifi will works) need to enable mmc drivers
and also from that issues, there are three mmc drivers for RPi exist in downstream kernel:
CONFIG_MMC_BCM2835 (upstream)
CONFIG_MMC_SDHCI_IPROC (upstream)
CONFIG_MMC_BCM2835_MMC (downstream)
we should use the downstream one, and disable the upstream one ( the CONFIG_MMC_BCM2835_MMC I guess was renamed from 4.9.y CONFIG_MMC_BCM2835 )
and we also need enable brcmfmac related options in kernel config:
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_PROTO_BCDC=y
CONFIG_BRCMFMAC_SDIO=y
CONFIG_BRCMFMAC_USB=y
maybe you can re-download the latest firmware ( should put them in /lib/firmware/brcm/ ), and check the dmesg output, if that not work, maybe you can try the latest 4.14 kernel from https://github.com/postmarketOS/pmbootstrap/pull/1543
Well, re-downloading the latest firmware from the links you posted and putting them in the proper directory seems to have caused the RPi to not boot any more. Either that, or wlan was down entirely. I've also tried the kernel from your PR, but that didn't resolve anything either.
@PureTryOut
well, I want know if you download the link above or raw file?
we should use raw one, because that is real file instead of html
would you mind check the md5sum of the firmware, here is my output:
md5sum /lib/firmware/brcm/brcmfmac43430*
ba679a85c1dc76e9775603af45440bc0 /lib/firmware/brcm/brcmfmac43430-sdio.bin
9a88b55134d9f8f3ad2331b93f4b7b79 /lib/firmware/brcm/brcmfmac43430-sdio.txt
8c97a1fb04a8c2c0ca0a8ed0814f38ae /lib/firmware/brcm/brcmfmac43430a0-sdio.bin
you should have first two file with same md5sum, because those file latest update was 3 month ago
here is the raw links:
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43430-sdio.bin
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43430-sdio.txt
@PureTryOut sry but I don't own a RPI3 so I cannot test the wifi. I only have a RPI2
@PureTryOut
hi, I don't know if you have solve the wifi problems, but I'm pretty sure the firmware is the correct one, it's from raspberry pi official, and most distros use it, like raspbian and archlinux arm, the upstream linux-firmware-brcm( the subpackage of linux-firmware, which is also the dependency of linux-rpi ) also use it as sources
but in case you still got issues, here is my local rpi2 pmos image build by pmbootstrap, the kernel is 4.14.44
https://send.firefox.com/download/5ab7466713/#exFi26Ex2Zsa0QlccrQk3g
you can flash it to sdcard with dd or Etcher
It seems my downloaded firmware was corrupt. Connected it via ethernet, placed the firmware in correct place, and it connected again. However, still insane packet loss. It already runs a kernel compiled from your PR, so that didn't really help either...
I must say, ethernet isn't the greatest connection either, although the delays are way less. Maybe it's a general networking issue? I'd really like someone else with a RPi3 to confirm this issue.
@PureTryOut : maybe your pi has some electronic troubles.. signal noise or so for whatever reason?
Well it doesn't happen on Raspbian, so it seems postmarketOS specific.
@PureTryOut
maybe worth to try the latest upstream linux-rpi 4.14.49, it basically use raspbian kernel config file
Didn't resolve anything sadly, it's still insanely slow. I can now confirm it's also really bad on ethernet, just a little bit less. So I guess it has something to do with the entire network stack rather than the specific interfaces.
@PureTryOut: maybe someone on #alpine-devel has an idea, they were discussing the raspberry pi today.
@yangxuan8282: consider joining there as well for better raspberry pi related coordination with Alpine.
I have a badly working wifi in asus flo too. Either it is the drivers fault or it is a bad wpa supplicant config. udhcpd does not get an ip as dhcpcd starts with networkmanager....
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=2 ttl=42 time=1021.732 ms
64 bytes from 8.8.8.8: seq=3 ttl=42 time=635.403 ms
64 bytes from 8.8.8.8: seq=4 ttl=42 time=249.332 ms
64 bytes from 8.8.8.8: seq=5 ttl=42 time=1092.097 ms
64 bytes from 8.8.8.8: seq=6 ttl=42 time=704.731 ms
64 bytes from 8.8.8.8: seq=7 ttl=42 time=318.946 ms
64 bytes from 8.8.8.8: seq=8 ttl=42 time=751.767 ms
64 bytes from 8.8.8.8: seq=9 ttl=42 time=365.776 ms
64 bytes from 8.8.8.8: seq=10 ttl=42 time=1208.758 ms
64 bytes from 8.8.8.8: seq=11 ttl=42 time=208.455 ms
^C
--- 8.8.8.8 ping statistics ---
12 packets transmitted, 10 packets received, 16% packet loss
round-trip min/avg/max = 208.455/655.699/1208.758 ms
Cmon' guys are still fixing a wcn36xx driver bug for 2 years 2016-2018 :) Oh I will wait :)
i see this a lot https://bugs.96boards.org/show_bug.cgi?id=319
https://patchwork.kernel.org/patch/10338447/
Most helpful comment
@PureTryOut
the PR I created was related to RPi 3B+ wifi, have nothing to do with RPi 3B wifi
I remember used to got same issues on 3B, many packet loss when use wifi connection.
But my current pmos installation not have this issues, the kernel is from this PR https://github.com/postmarketOS/pmbootstrap/pull/1543
the last one take 21.6ms, and I did more test, sometimes it take long time, but at least no packet loss
the info about RPi 3b wifi as far as I know is:
the firmware we need:
https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm/brcmfmac43430-sdio.bin
https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm/brcmfmac43430-sdio.txt
you can find related info from dmesg with:
on kernel side (this is for downstream 4.14.y, because I only know this one), after read some issues ( https://github.com/raspberrypi/linux/issues/2124 ), quote from this issues:
to make mmc1 appears (so that wifi will works) need to enable mmc drivers
and also from that issues, there are three mmc drivers for RPi exist in downstream kernel:
CONFIG_MMC_BCM2835(upstream)CONFIG_MMC_SDHCI_IPROC(upstream)CONFIG_MMC_BCM2835_MMC(downstream)we should use the downstream one, and disable the upstream one ( the
CONFIG_MMC_BCM2835_MMCI guess was renamed from 4.9.yCONFIG_MMC_BCM2835)and we also need enable brcmfmac related options in kernel config:
maybe you can re-download the latest firmware ( should put them in
/lib/firmware/brcm/), and check the dmesg output, if that not work, maybe you can try the latest 4.14 kernel from https://github.com/postmarketOS/pmbootstrap/pull/1543