Tonkatron
Posts: 3
Joined: Thu May 28, 2020 11:53 pm

2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 12:06 am

I'm having kind of a similar problem.
USB3.0 works if it is the only USB port that is being used. As soon as I connect another device to any other port things start to go wrong such as my mouse and keyboard become unresponsive and then work for a second before becoming unresponsive again, USB stick are just unusable.

If I connect using only the USB2.0 ports everything is fine. I'm having the same problem on 2 Pi 4's and I ahev tried different 3 keyboards, 5 different USB sticks, Intel S3500 SSD's with USB3 adaptors (UASP supported). No matter the combination or order I plug devices in, USB3.0 can't be used and it is DRIVING ME MENTAL!

I have run all the firmware updates and still the same problem.

Anyone have any ideas?

svenger
Posts: 4
Joined: Mon Jan 13, 2020 6:25 am

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 1:27 pm

Same here. I boot Raspberry Pi OS from USB with latest firmware.
As soon as I plug my Storage HDD to the second USB port the raspberry locks up.

SSH session only answers with I/o error.

LTolledo
Posts: 3816
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 1:39 pm

my NAS uses 2 x 8TB HDDs connected to each USB3.0 ports.... not locking up...

I've also connected 12 HDDs in one USB3.0 port (via single USB3.0) and another 2.5" HDD on the other USB3.0 port....
it ran for 4 days straight...... synching the 6 pairs of HDD....

and its not cold here... the ambient is 23C so it wont freeze the system.... :mrgreen:
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Tonkatron
Posts: 3
Joined: Thu May 28, 2020 11:53 pm

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 2:34 pm

I cant even plug a keyboard and a mouse both USB3 ports. It's not limited to usb storage devices.

User avatar
PeterO
Posts: 5958
Joined: Sun Jul 22, 2012 4:14 pm

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 2:38 pm

svenger wrote:
Fri May 29, 2020 1:27 pm
Same here. I boot Raspberry Pi OS from USB with latest firmware.
As soon as I plug my Storage HDD to the second USB port the raspberry locks up.

SSH session only answers with I/o error.
Are you "hot plugging" the HDD ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

svenger
Posts: 4
Joined: Mon Jan 13, 2020 6:25 am

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 2:46 pm

PeterO wrote:
Fri May 29, 2020 2:38 pm
svenger wrote:
Fri May 29, 2020 1:27 pm
Same here. I boot Raspberry Pi OS from USB with latest firmware.
As soon as I plug my Storage HDD to the second USB port the raspberry locks up.

SSH session only answers with I/o error.
Are you "hot plugging" the HDD ?

PeterO
Yes. With both attached I can't even get the Pi to boot up. Will give it some tries later today.

But something is really weird. Maybe I need to switch to boot from SD card again and change the bootdevice in cmdline.txt.

This way it works without any problems.

bls
Posts: 729
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA
Contact: Twitter

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 2:50 pm

Seems like it's probably USB device-dependent. I have a Pi4 with a StarTech USB 3.0 to 2.5" SATA cable with an SSD on one USB 3.0 port, and a StarTech SD Card reader on a short USB 3.0 cable on the other USB 3.0 port. When I'm using the SD Card reader, it's also hitting the SSD, and this works well. I can unplug/replug the SSD with no ill effects.

I have had a couple of instances of the SSD going offline, but I haven't yet determined if it's an actual USB problem or if I'm perturbing the SSD inadvertantly when I drop an SD Card into the reader (VERY messy workspace :lol: ). I'm going with the latter unless it becomes a more regular problem.

But no Pi4 lockups.
Pi tools:
Free your network from your router's DHCP/DNS and run it on a Pi:https://github.com/gitbls/ndm
Quickly and easily build customized-just-for-you SD Cards: https://github.com/gitbls/sdm
Easy strongSwan VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

svenger
Posts: 4
Joined: Mon Jan 13, 2020 6:25 am

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 2:58 pm

Well my USB to SATA adapter needs USB quirks.
That's where the OS SSD is connected to.

The storage HDD adapter doesn't need any quirks.

No idea why it freezes when I connect the HDD. Pretty strange.

Basically this setup runs like half a year already. With Rasbian, Ubuntu, Gentoo.

With the new bootloader and Raspbian OS 64 bit there seems to be a problem. Sadly I can't grab any logs or so.

User avatar
PeterO
Posts: 5958
Joined: Sun Jul 22, 2012 4:14 pm

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 3:58 pm

svenger wrote:
Fri May 29, 2020 2:46 pm
PeterO wrote:
Fri May 29, 2020 2:38 pm
svenger wrote:
Fri May 29, 2020 1:27 pm
Same here. I boot Raspberry Pi OS from USB with latest firmware.
As soon as I plug my Storage HDD to the second USB port the raspberry locks up.

SSH session only answers with I/o error.
Are you "hot plugging" the HDD ?

PeterO
Yes. With both attached I can't even get the Pi to boot up. Will give it some tries later today.

But something is really weird. Maybe I need to switch to boot from SD card again and change the bootdevice in cmdline.txt.

This way it works without any problems.
So if your PSU can't spin them both up together it's not that surprising that it can't spin the second one up when the first one is running and the CPU is running. Spinning up a HDD takes much more current than keeping it spinning. I don't think the PI's USB has ever been claimed to support hot plugging of anything more than USB sticks.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2425
Joined: Thu Jul 11, 2013 2:37 pm

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 4:08 pm

Hotplug is fine on anything that's a Pi 1 B+ or later. We have enough reservoir capacitance on VBus downstream of the USB current limiting switch to handle a *compliant* device getting hotplugged.

Compliant means they have no more than 10uF of decoupling capacitance on Vbus, at least on initial connect. Of course, manufacturers often exceed this because "it works in a PC" and makes peripheral design simpler, as they need no power staging circuitry. Plugging one of these devices in means you get brownouts on Vbus that don't trigger the overcurrent detection but disrupt other connected devices.

Hard drive spinup is one of the other bugbears - some drive motors a) don't limit what they draw from Vbus and b) will trip if they detect a brownout and c) can detect this faster than our current limiter does, so the drive sits in a loop repeatedly trying to start up.

OP should try using a powered USB3.0 hub.
Rockets are loud.
https://astro-pi.org

LTolledo
Posts: 3816
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 10:08 pm

Ok I did a few experiments on this
RP4B-2G 2xHDD in USB3 at boot.jpg
RP4B-2G 2xHDD in USB3 at boot.jpg (233.94 KiB) Viewed 511 times
RP4B-2G 2xHDD in USB3 at boot HWcloseup.jpg
RP4B-2G 2xHDD in USB3 at boot HWcloseup.jpg (215.36 KiB) Viewed 511 times
RP4B-2G 2xHDD in USB3 at boot desktop view.jpg
RP4B-2G 2xHDD in USB3 at boot desktop view.jpg (54.43 KiB) Viewed 511 times

the setup did boot without any problems.... I was able to access and play some of the media files on each HDD
the HDD adapters are
Eluteng Blue (on WD 1TB HDD)
Eluteng Blue "clone" (on the Marshal 2TB HDD)

setup is powered using 12v adapter
with a MP1584EN based buck converter providing 5.1v at GPIO header 4 and 6

keyboard and mouse connected from KVM switch via USB2 port.

One thing I learned from this experiment is NEVER PAIR any Seagate HDD with a bus-powered dual HDD setup on the RPi4B connected at bootup.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
HawaiianPi
Posts: 5958
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Fri May 29, 2020 11:10 pm

I frequently use multiple USB 3.0 devices on my Pi 4B2 and 4B4 and have not had any trouble with wired devices.

USB 3.0 is known to cause interference with 2.4GHz wireless devices, which is a common frequency for wireless keyboard and mouse (not to mention, Bluetooth and WiFi). So if you are having issues with a 2.4GHz wireless keyboard/mouse dongle, try putting it on the end of a short extension cable and moving it away from the Pi4 (or you could try moving the USB 3.0 devices away).

As far as storage devices go, I frequently connect a USB 3.0 card reader, or even another SSD to the other 3.0 port for making backups of my OS SSD with the SD Card Copier utility. I've done that on the older setup with /boot on SD card, and with the new beta USB bootloader, and it works fine. I even ran a 4B2 from dual SSD for awhile as an experiment (/boot on SD card, / rootfs on one SSD and /home on the other).

Some of what I'm reading sounds like power issues. The Pi4B's USB ports are limited to 1.2A total for all 4 ports, like previous models, which is far below the 900mA per port of the USB 3.0 power spec. However, there are no per-port limits, so all 1.2A can come out of 1 port when it's the only port in use. Connecting HDD and SSD could easily surpass that limit in some cases, which is why the poster above could not boot with both connected (hot plugging it after booting reduces the load, since the SoC and boot drive are mostly idle at that point).

I recall once getting dual HDD mounted on a Pi3, but it wasn't a reliable or usable system. Any action that used both would result in disconnects and failure (like trying to copy files from one HDD to the other HDD, although either could be used individually). Dual SSD, sure, but not HDD.

If you want to use dual HDD reliably, you need to power them externally (even SSD + HDD is iffy, it might work with some drive combinations, but not all). Dual SSD should work with modern, power efficient SSD models (some SSD models have shockingly high power requirements).

LTolledo wrote:
Fri May 29, 2020 10:08 pm
One thing I learned from this experiment is NEVER PAIR any Seagate HDD with a bus-powered dual HDD setup on the RPi4B connected at bootup.
LOL, yea, Seagates are hungry little buggers. The WD Blue hard drives are pretty frugal (I have several, and they're all rated at 550mA).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

LTolledo
Posts: 3816
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Sat May 30, 2020 3:05 am

yeah, I've listed the current requirements of the 2.5" drives that I have.... seagate (and Toshiba) takes the top for the current requirement.
viewtopic.php?f=29&t=256256&p=1653650#p1653650
first cost cheaper than WD drive
but with continuous operating cost (power cost) the seagate drives will probably overtake the WD drive within a few weeks....
thus becoming more expensive in the long run...

oh this image might interest the OP:
RPi4B-2G-external HDDs v2.jpg
RPi4B-2G-external HDDs v2.jpg (106.49 KiB) Viewed 475 times
(violent reactions welcome! :mrgreen: )
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Tonkatron
Posts: 3
Joined: Thu May 28, 2020 11:53 pm

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Sat May 30, 2020 11:18 am

jdb wrote:
Fri May 29, 2020 4:08 pm
Hotplug is fine on anything that's a Pi 1 B+ or later. We have enough reservoir capacitance on VBus downstream of the USB current limiting switch to handle a *compliant* device getting hotplugged.

Compliant means they have no more than 10uF of decoupling capacitance on Vbus, at least on initial connect. Of course, manufacturers often exceed this because "it works in a PC" and makes peripheral design simpler, as they need no power staging circuitry. Plugging one of these devices in means you get brownouts on Vbus that don't trigger the overcurrent detection but disrupt other connected devices.

Hard drive spinup is one of the other bugbears - some drive motors a) don't limit what they draw from Vbus and b) will trip if they detect a brownout and c) can detect this faster than our current limiter does, so the drive sits in a loop repeatedly trying to start up.

OP should try using a powered USB3.0 hub.
I will try that out.

Is there any reason why this is only an issue with the USB3.0 ports?

LTolledo
Posts: 3816
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 2 x Pi4 Locking up and freezing when using more than one USB3.0 port

Sat May 30, 2020 12:35 pm

It's not an issue in my setups, that's for sure.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Troubleshooting”