RPI4 wifi unreliable when usb3 storage is attached

Bug #1861338 reported by Paul Larson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
Invalid
High
Hui Wang
Eoan
Expired
Undecided
Unassigned

Bug Description

On RPI4, if you set up netplan to use wifi, and plug in a usb3 storage device to one of the 2x usb3 ports (the ones closest to the ethernet port), wifi will sudden stop working. If you unplug the usb stick while running a ping, it will usually start working again almost instantaneously.

Kernel version I have is: 5.3.0-1017-raspi2
and I've confirmed this happens on both armhf and arm64

The only thing I found in journalctl that looks suspicious is this, but it seems to have happened before plugging in the usb stick:
Jan 29 20:54:59 ubuntu wpa_supplicant[1129]: random: Cannot read from /dev/random: Resource temporarily unavailable

Paul Larson (pwlars)
description: updated
Revision history for this message
Hui Wang (hui.wang) wrote :
Download full text (5.1 KiB)

I just did a test, could not reproduce this issue. Maybe your usb storage consumes too much power, could you please change other usb sticks to redo the test?

on the usb-serial console, my Wifi is enabled and ping a website:
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.3.0-1017-raspi2 #19+otg SMP Wed Jan 29 12:45:11 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 1000 (Local Loopback)
        RX packets 10 bytes 842 (842.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 10 bytes 842 (842.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.2.104 netmask 255.255.255.0 broadcast 192.168.2.255
        inet6 fe80::dea6:32ff:fe0e:9bc5 prefixlen 64 scopeid 0x20<link>
        ether dc:a6:32:0e:9b:c5 txqueuelen 1000 (Ethernet)
        RX packets 58 bytes 7614 (7.6 KB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 69 bytes 7950 (7.9 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ubuntu@ubuntu:~$ ping www.sohu.com
PING fbx.a.sohu.com (123.126.104.68) 56(84) bytes of data.
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=1 ttl=57 time=10.4 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=2 ttl=57 time=6.75 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=3 ttl=57 time=4.80 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=4 ttl=57 time=17.3 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=5 ttl=57 time=5.55 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=6 ttl=57 time=5.24 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=7 ttl=57 time=5.08 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=8 ttl=57 time=6.37 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=9 ttl=57 time=6.56 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=10 ttl=57 time=4.25 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=11 ttl=57 time=7.62 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=12 ttl=57 time=4.09 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=13 ttl=57 time=7.59 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=14 ttl=57 time=7.78 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=15 ttl=57 time=6.42 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=16 ttl=57 time=4.29 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=17 ttl=57 time=4.03 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=18 ttl=57 time=4.06 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=19 ttl=57 time=13.3 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=20 ttl=57 time=4.16 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=21 ttl=57 time=11.1 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=22 ttl=57 time=6.45 ms
64 bytes from 123.126.104.68 (123.126.104.68): icmp_seq=23 ttl=57 time=5.60 ms
64 bytes from 123.126.104.68 (123.126.104.68...

Read more...

Changed in linux-raspi2 (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Hui Wang (hui.wang)
Revision history for this message
Paul Larson (pwlars) wrote :

I don't have another usb3 one at the moment, I'll see what I can find. However, I'm also starting to think it may be RF interference from the usb3 port and or stick. If I grab the rpi4 near the usb/ethernet block in the right place, the problem seems to go away a bit. possibly something similar to the known issues with hdmi at certain resolutions jamming wifi?

I've tried with two different access points, both in the same room so I'm plenty close to have a strong signal, and I see this happen on 3 different rpi4 devices (1,2,4GB).

Revision history for this message
Hui Wang (hui.wang) wrote :

We had a similar bug before, it said the issue could be reproduced with specific ssd and usb->ssd case.

https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1857760

Revision history for this message
Hui Wang (hui.wang) wrote :

Since could not reproduce this bug so far, set it to incomplete.

Changed in linux-raspi2 (Ubuntu Eoan):
status: New → Incomplete
Changed in linux-raspi2 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

Sorry to reply to an inactive thread, but I've experienced the same issue

I really want to solve this issue, so any idea how I can help?

Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

I found this on the internet: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/usb3-frequency-interference-paper.pdf

When I pinged my router, I've seen some packets had a greater latency then others, so that could have been an interference.

I couldn't test 5GHz as I don't have 5GHz with my router.

I can't mesure voltage as I can't find vcgencmd for ubuntu. But I don't think I've heard any changes from my fan.

Revision history for this message
Hui Wang (hui.wang) wrote :

Could you please upgrade the linux-firmware, then redo the test, I remember there is a update on the wifi firmware.

thx.

Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

I'm using Ubuntu 18.04.2 LTS and it seems there's no upgrade I can fetch.

I'm at 1.173.16 for linux-firmware, 1.20190819-0ubuntu0.18.04.1 for linux-firmware-raspi2, 5.3.0-1018-raspi2 for kernel.

Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

By the way, when I plugged in the usb, the iwconfig commmand suggests that the signal quality dropped from -30dBm to -40dBm, before I lost the connection (my raspberry pi is headless)

Revision history for this message
Hui Wang (hui.wang) wrote :

So sounds this is a hw desgin issue? Or do you know if there is a software fix for it, then we could integrate this fix to the ubuntu raspi2.

Thx.

Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

I strongly suspect if there's any.As far as I've seen, all suggestions are physical solutions. I would suggest to put it in the known issue somewhere so that people may be aware of this fact.

Revision history for this message
Zihang Ye (jerry-yezihang) wrote :

I tried with my external drive, which has a long usb cable, and it worked well. For the other link you've mentioned, I think you could suggest him to put it away from raspberry pi.

Revision history for this message
Hui Wang (hui.wang) wrote :

OK, thx for your investigation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux-raspi2 (Ubuntu Eoan) because there has been no activity for 60 days.]

Changed in linux-raspi2 (Ubuntu Eoan):
status: Incomplete → Expired
Revision history for this message
Dave Jones (waveform) wrote :

I've been unable to replicate this so far; tried with four different USB-SATA cables attaching boot storage to USB3 on a Pi 4B and a Pi 400; wifi worked happily in each case. Given this was expired for Eoan (a couple of years ago) I'll close this as invalid for now; please re-open if this is still an issue.

Changed in linux-raspi2 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.