-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Pi4 crash when using 2nd USB3 device when booting from USB3 SSD #3485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you tried connecting the USB disks using a powered USB hub? The pi4 might now have enough juice to power 2 external disks. I've struggled with this in the past and solved it with a powered hub. Not sure how this relates to it working on the USB2 ports, not sure if the USB3 port is pulling more power. |
Good point. The SSD and its USB3 interface are bus powered and working standalone when booting from it. The additional USB3 HDD has a power supply attached. My expectation is, that there is not more current drawn from USB3 port when plugging in a powered device. |
I don't think that is a valid expectation. Often the power supply to a drive just supplies, say 12V for the motor. There may be significant 5V still drawn from the Pi over USB. |
Thanks for your replies so far. |
I don't think there's any bug here to be solved. It's an electronic limitation. When you draw more current then the pi can provide, it restarts. No way around that. Maybe this should be better documented -- this issue might do just that for those who have the same problem in the future. I guess this can be closed, but I'll leave that feedback to @popcornmix who's the expert here. |
Maybe my formulation was too complicated: I don't draw more current than the Pi can provide... Otherwise I would see the same issue with the passive hub, which is not the case. |
Plug an optical mouse into one of the spare USB ports. When the crash occurs, does the LED on the bottom of the mouse turn off? |
Thanks for the hint. |
I did another experiment, maybe this refers better to your question: |
Do you have a powered USB3.0 hub, and if so, what is the behaviour with one or both SSDs plugged into the hub? |
I have a powered USB3 hub (combined with a HDD). I did some more investigations on the issue and found out, that a message appears at the boot screen, which was not visible in dmesg. It took several trials to take a photo at the right point in time. The output of the mentioned "systemctl" command was:
"Datei oder Verzeichnis nicht gefunden" is translated: "File or directory not found". Maybe this is related to the issue I described at the beginning and you know what's going on there... |
Hey Poliboy, Did you ever determine the exact issue? I experienced a similar problem; I booted and ran an HP laptop from a USB3 attached external SSD Ubuntu 20.04 installation. This setup worked fine until I plugged a second SSD into the other USB3 port, at which point Ubuntu crashed and I got a black screen full of a rapidly repeating I/O error. If this is the same problem, I'm glad to hear that using a USB2 port for one of the drives or booting from an SD card works (though I'm unsure is this means you're booting the OS on your SSD with a bootloader on your SD card, or booting fully from the SD card and leaving the SSD-based OS to languish.). I plan to use the SSD-based OS on a pi4, but have you tried recreating the issue on any other type of computer? I share your suspicion that something besides power is causing the problem, though that's probably usually a fair bet for a pi, and hence why everyone seems so hung up on it even after you ran both through a passive hub. My gut feeling is that the problem lies with the usb3 driver (probably UAS) integrated into the Linux kernel. USB3s cause interference; I'm guessing part of the solution to that was a bit of a hack job that involved blocking all/the other USB3 ports temporarily whenever something new was plugged into one. That would obviously be a problem for this kind of setup, because it cuts of the OS, so the interrupt handler is never reached and the request just keeps running because it's supposed to be non-blocking. That's just my guess, would like to hear if you or anyone else figured it out. |
Hi everyone, Good to know I'm not alone, though it's a bit quiet in here while I can't believe we're the only ones with that particular use-case and problem. Edit: Looks like I finally found my problem. It seems to be well known (see for example #3070) that some JMicron USB3 chipsets cause problems like mine and can be circumvented using a "quirk". Searching for the term "usb uas JMicron" there's a lot more information about the incompatibility (both Linux and Windows seems to be affected). Shopping for USB3 adapters you should search for UASP compatible devices - or disable UASP with the quirks. |
Hi, I am also facing the same problem. My setup is :- I am booting system with USB SSD and connecting HDD later on. but as soon as I connect the HDD it crashes. Any feedback on resolving it would be greatly appreciated. |
Use a decent quality powered hub. That applies to anyone with USB problems with drives attached, even just one drive. An example of a decent quality powered USB 3.0 hub is the D-Link DUB-1340, which is what I use and it works great. See https://eu.dlink.com/uk/en/products/dub-1340-4-port-superspeed-usb-3-hub. The rest of the problems with using USB drives with the Pi can be traced to poor quality drives and enclosures - usually it's the enclosure. I recommend startech.com enclosures. There are very few problems which can be attributed to the Pi itself. |
Hi, |
Hi, |
Hi, thanks all for sharing the issue here. Same issue for pi4b 8G. The HDDs crash sometimes when there are large data writes into one of the HDD, because I am running a Bitcoin node to sync IBD with PI 4B.
Updated: May, 15 |
I've had some similar issues. This article provides some insight and good suggestions. https://www.pragmaticlinux.com/2021/03/fix-for-getting-your-ssd-working-via-usb-3-on-your-raspberry-pi/ |
thanks to @daedalia , disabling UASP ('Fix 2' in above article) enabled me to have two 'active devices' (SSD) in raid1. Before the second SSD was reported 'removed' by |
Hi! I have the same problem, as soon as I connect a second drive (with external power) the GUI of raspberian goes black and nothing is clickable anymore on the desktop. I will try it with an active hub, but it's weird, that the external power of the second hard drive is not enough?? My setup (not working with both drives attached; works only with SSD only): |
I have some similar issues with Ubuntu Server 22.04, but its happing also on USB 2.0 ports. |
A lot of issues with powered USB 3.0 hubs, Raspberry Pi 4 and a HDD/SSD with a SATA-USB 3.0 cable or in a Case may be solved by adding a command into your /boot/cmdline.txt file of your Raspberry Pi 4. This solution solved everything for me! Read here how you can fix that: https://www.pragmaticlinux.com/2021/03/fix-for-getting-your-ssd-working-via-usb-3-on-your-raspberry-pi/#:~:text=For%20some%20reason%20the%20Raspberry%20PI%204%20does,connecting%20your%20SSD%20to%20your%20Raspberry%20PI%204. |
Raspi 4B with Bookworm Everything worked fine for weeks, until i plugged an external Intenso SSD on the second USB-3 port. Copying small files are okay, but had a 9GB video file in my data. That was the last response, the usb-adapter went lost until reboot. The Gemini 2.5 is powered by a 12V adapter that feed the raspi over the ports. So only the Intenso SSD could be the problem. Fix above is in use now. |
I use the Pi4 booting with a USB3 connected SSD.
This works nicely, but when I connect in addition an external USB3 HDD to the USB3 port, then the system crashes with "IO errors". Any commands like "dmesg" are not available any longer.
Connection of the HDD to USB2 port works. Booting from SD card and connecting the USB3 SSD and the USB3 HDD at the same time works.
Actual behaviour
The GUI disappears (only background is visible). Some "IO errors" are indicated.
System
System Information
Raspberry Pi 4 Model B Rev 1.1
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
Raspberry Pi reference 2019-09-26
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 80d486687ea77d31fc
3fc13cf3a2f8b464e129be, stage5
Linux toni4 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
Revision : c03111
Serial : 100000000824fe4c
Model : Raspberry Pi 4 Model B Rev 1.1
Throttled flag : throttled=0x0
Camera : supported=0 detected=0
Which model of Raspberry Pi? Pi4
Which OS and version (
cat /etc/rpi-issue
)?Raspberry Pi reference 2019-09-26
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 80d486687ea77d31fc3fc13cf3a2f8b464e129be, stage5
Which firmware version (
vcgencmd version
)?Feb 12 2020 12:36:21
Copyright (c) 2012 Broadcom
version c3c8dbdf147686fb0c3f32aece709d0653368810 (clean) (release) (start)
Which kernel version (
uname -a
)?Linux toni4 4.19.97-v7l+ problem with device tree overlay at86rf233 #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
Logs
unfortunately demsg is not available any longer
Additional context
Add any other relevant context for the problem.
The text was updated successfully, but these errors were encountered: