User avatar
meinside
Posts: 8
Joined: Mon Apr 23, 2012 4:04 am
Location: South Korea

Raspberry Pi 4 reboot fails when a powered usb hub is attached

Wed Jul 10, 2019 1:04 am

I've got a model 4B 4GB model with two usb peripherals:

- portable ssd (Intel SSD covered with a usb outlet / no external power-in)
- portable hdd (Seagate USB HDD / no external power-in)

I had issues with power shortage, (root partition unmounts automatically on heavy I/O loads)

so I bought an externally powered usb 3.0 hub and connected all of them like this:

Code: Select all

[RPi 4B] ----(usb 3.0)---- [SSD: root partition]
        \----(usb 3.0)---- [usb 3.0 hub] ---- [HDD: data partition]

Now everything works fine, except that I cannot reboot the board gracefully.

When I try rebooting with just `sudo shutdown -r now`, nothing happens, they just stand there and do not respond.

I have to unpower model 4B and usb hub, disconnect all usb connectors, reconnect them back, and power up usb hub and model 4B again.

Then it boots up and responds correctly.


I currently have no monitor to see what really happens there, (it is running headless for now)

so I just suspect there is a problem with the powered usb hub.


I will attach a monitor and see what is wrong with them tonight,

but before that, does anyone have similar experience or know about this issue?

Andyroo

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Wed Jul 10, 2019 11:18 am

There was a note yesterday that the hub was back powering the Pi and causing issues.

The poster had cut the +ve power lead on the connector to the Pi (leaving ground connected) and that had fixed the issue.


User avatar
meinside
Posts: 8
Joined: Mon Apr 23, 2012 4:04 am
Location: South Korea

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Thu Jul 11, 2019 1:12 am

I tested many times and the outcomes are nearly random.


Sometimes it reboots okay, but with weird messages:

(removed redundant ones)

Code: Select all

usb 2-2: cmd cmplt err -71
scsi host1: uas_eh_device_reset_handler FAILED to get lock err -16
scsi 1:0:0:0: Device offlined - not ready after error recovery
usb 2-2: USB disconnect, device number 5
usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
usb 2-2: Device not responding to setup address.
usb 2-2: device not accepting address 8, error -71
usb usb2-port2: attempt power cycle
It takes about 20~30 seconds passing these messages by.


But when it fails to reboot, messages are shown that are related to some file system errors like this:

Image

I checked the root partition with fsck, but there was no issue.


As others say, my powered usb hub seems to be the source of this problem.

Maybe for now, I have to unplug my hdd and wait for a new firmware.

JAFO69
Posts: 1
Joined: Thu Jul 11, 2019 4:59 am

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Thu Jul 11, 2019 5:10 am

I'm not in the least surprised. This is a known issue with the RPi-3 B+ as well.

I recently built a mini desktop computer for my father with the 3-B+, using a powered hub for the external DVD drive. Same issue.. won't boot or reboot with the hub powered up. I told him if he needed to, un-power the hub first. But I also told him, "It's Linux. It should almost never need rebooting.. it doesn't use much power, so don't bother shutting it down, just leave it running."

Hallie
Posts: 1
Joined: Thu Sep 26, 2019 10:17 am

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Thu Sep 26, 2019 10:24 am

This text about my experiences with Pi4 reboot and USB hubs was first submitted to the forums on Stackexchange, but may be useful here, too:


Same problem here. A Pi4 will not reboot if a powered USB 3.0 hub with HDD is connected.

I have opened up a cheap Chinese USB 3.0 hub, and de-soldered the red 5V power cable to the computer, so, this one will always need external power to work, and it does. But the Pi4 will not reboot while it is connected. This indicates that the problem is not back powering from the HUB to the PI.

I have, however, found two hubs that work fine. The Pi4 will reboot with one of these connected and powered externally. They are both from a Chinese company called Ugreen. One is a USB 3.0 hub with gigabit Ethernet added, "Ugreen Model: 20265". Everything works with this one attached, including Ethernet. The other one working is "Ugreen Model: 20291" I also bought another USB 3.0 hub marketed under the label Ugreen, but this does not work, and there is no model number sticker on it, only the letters "UGREEN" embossed on top of it.

Many other USB 3.0 hubs I own work OK, but the Pi4 will not reboot when connected to one of them with external power and a HDD. If they are unplugged, the Pi will reboot, and then the hub can be reconnected and all works fine.

A Banana Pi was my previous small server because of SATA and gigabit Ethernet, but I have now at last been able to switch to a Pi because of gigabit and USB 3.0. It runs headless, and it must be able to reboot when necessary. Pi is the preferred platform because of the community around it and that the software is being updated, not so with most of the alternatives, like Banana Pi. It delivered speed, but the software was not being updated.

I have given the Pi4 a big passive aluminium cooler, and the CPU temp is always below 40 degrees Celsius.

Pi4 will only boot from an SD card, so only the boot partition is on the mini SD card, while the root partition is on an SSD. I believe the Pi will then only write on the SD card if something is changed on the boot partition.

mark-aus-51
Posts: 1
Joined: Wed Jul 30, 2014 9:06 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Thu Sep 26, 2019 8:59 pm

...a cheap self powered USB 3.0 Hub causes the same issues with my Pi 4, but with a more expensive ANKER self powered USB 3.0 Hub the Raspberry Pi 4 boots without problems...

RossDv8
Posts: 262
Joined: Thu Jan 21, 2016 12:35 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Mon Sep 30, 2019 8:43 am

I've been having boot and reboot problems with the Pi 4 whether using the Menu or the Terminal., using a non-powered USB 3 hub. I suspected it was due to overclocking, but I set everything as default and still had the problem. I had the WD 256GB SSD plugged in (just to access data because I haven't set up a microSD to boot to the SSD) and it is on a splitter cable with a male going to the Pi 4, a female going to the SSD and the red male going to a 2A power adapter.

Ejecting and Disconnecting the SSD got me back to normal booting. The it started failing to boot again. Turns out I had left a microSD card in an adapter plugged into the hub :-(

When I remember to unplug any external drives I don;t seem to have the problem. (y e t ! )
Remember, nobody is listening to you
until you fart ...

hippy
Posts: 12712
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Mon Sep 30, 2019 10:44 am

Hallie wrote:
Thu Sep 26, 2019 10:24 am
I have opened up a cheap Chinese USB 3.0 hub, and de-soldered the red 5V power cable to the computer, so, this one will always need external power to work, and it does. But the Pi4 will not reboot while it is connected. This indicates that the problem is not back powering from the HUB to the PI.
I have a similar situation; a Pi Zero W in gadget mode connected to a non-hub device which is self-powered, without the 5V connected between the two. That does not always reboot or shutdown, sometimes hangs for some considerable time when attempting either.

My hypothesis is that some ongoing activity or handshaking on the USB bus is somehow keeping the Pi alive and preventing it from completing its reboot or shutdown. That my not however be a correct hypothesis and I am still investigating.

The Pi Zero W and Pi 4B do have very different USB-related hardware architectures so there may be different things going on.
RossDv8 wrote:
Mon Sep 30, 2019 8:43 am
Ejecting and Disconnecting the SSD got me back to normal booting. The it started failing to boot again. Turns out I had left a microSD card in an adapter plugged into the hub :-(

When I remember to unplug any external drives I don;t seem to have the problem. (y e t ! )
That appears to reflect my situation; disconnect the device and it all works as expected. Which is what leads to my hypothesis that it may be USB communications involved. Mostly because I am out of other plausible explanations.

RossDv8
Posts: 262
Joined: Thu Jan 21, 2016 12:35 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Tue Oct 01, 2019 1:57 am

I had a couple of large capacity (3TB) external USB drives running from a powered USB hub, which is when I noticed the reboot and boot issues.
Plugging either 3TB drives (or sometimes one of my older 2TB drives) directly to the Pi without the external power boost, fails to mount.

Swapping to a non-powered USB 3 hub and using a splitter cable (RED male end to a power adapter and black male end to the data port of the hub) so the3TB drives are externally powered, they mount, but must be physically removed to get a clean reboot, or a clean start after shutdown.

The WD 240GB bootable SSD I used to use with the Pi 3B+ was also on a splitter cable and powered externally for the Pi 3B+. At teh moment it is connected to the non-powered USB 3 hub and rebooting ok without needing to be ejected..

In my case, I suspect that wen I had a large drive with power into one lead of the splitter cable, there might have been power getting back to the data port, thence to the USB 3 hub, and to the Pi.

So perhaps the Pi 4 doesn't like power fed back into it through the USB 3 ports and perhaps power can leak back to the Pi from some 'powered' USB 3 hubs.

U P D A T E - - 3 hours later

I have been writing .desktop files so that I can start some of my shell scripts from icons on the panel. That involved lots of reboots to make sure they each worked, and remained in the panel after booting.

Since swapping the powered USB 3 hub for an un-powered USB 3 hub, I have been booting and rebooting with the SSD remaining connected to the hub.
Next step is to see if it works with a conventional external SATA drives other than the ones that I know can't handle not getting enough power from the Pi.

And that was fun !! As soon as I plugged a conventional 1TB drive in, regardless of whether it was on the hub or in the Pi directly, the wireless keyboard trackpad developed lots of lag for a while (it does have fresh batteries). After date had loaded in File Manager though (about 20 seconds), it seems back almost to normal, but the cursor is still a little laggy on the screen compared to when an SSD is mounted SSD.

EDIT
It is still rebooting normally with a traditional external USB drive connected to the un-powered USB 3 hub that is connected to a USB 3 port on the Pi.

I don;t know if anyone more familiar with the Pi 4 workings can make anything of all this testing, but at least not plugging in anything self powered seems to be working for me at the moment.
Remember, nobody is listening to you
until you fart ...

navyseai
Posts: 11
Joined: Sat Feb 16, 2019 10:31 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Fri Oct 04, 2019 12:20 pm

Same issue here. I cannot reboot it remotely cause it requires me to unplug the usb hub.

RossDv8
Posts: 262
Joined: Thu Jan 21, 2016 12:35 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Sat Oct 05, 2019 11:30 pm

UPDATE - 4 days later.
I have no idea why, but my 3TB Toshiba USB 3 external drive that would not spin up when plugged into either the Pi 4 USB 3 port (unless it was powered externally by a Y-cable with the positive input leading to a separate 5V adapter), or the non-powered USB 3 hub, is now spinning up and working perfectly. AND - rebooting the Pi has been working perfectly with the drive attached and without ejecting it first.

The only things I can recall changing are:
When I was experimenting with the 64 bit kernel I think there was firmware that was flashed.
I changed my 64GB microSD card for a 128GB microSD card

I do notice though, that the 128GB Samsung EVO plus microSD seems to be performing at a better speed than the 64GB Sandisk Extreme did. In fact the performance now seems similar to reading/writing to the SSD. Probably a placebo effect, but still interestering.

For the moment, for me at least, removing powered external devices form the Pi USB ports has fixed the boot/reboot problem.
Remember, nobody is listening to you
until you fart ...

peddanet
Posts: 2
Joined: Tue Mar 10, 2020 10:27 am

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Wed Apr 22, 2020 8:03 pm

I have a raspberry pi 4b with 32 GB ssd and 4 GB RAM. Nice part :D!

But:
I have the same problem like the thread owner but vice versa (it shuts down, but on power shortage, there is no usb drive mounted automatically (it is set by uuid in fstab), I hope anybody could help:

When I have power shortages, the system is coming up again but without the usb drive connected with an own external power supply (it is a red WD 4GB!). If I do the shutdown correctly via:

Code: Select all

$ reboot
Then it comes up again - this time with the usb drive!

Why is this? Unfortunately there are sometimes power shortages in this region, so I do not know the state and I want to do my Syncs with my usb stick (it was automatically mounting and syncing, now it has stopped, but that is a different topic :-() and then automatically rsnapshot it to another server once a week. That works from time to time. I guess it stops because of unknown power shortages. At least If I force to switch brutally power off, the system comes up again without mounting the usb drive!!

I run DietPi on my system. Any Ideas? Please help This is awkward!


navyseai
Posts: 11
Joined: Sat Feb 16, 2019 10:31 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Tue May 26, 2020 4:50 pm

i made a workarround, i bought a smart plug, so when i want to reboot, i use the smart plug :lol:

lolaf
Posts: 1
Joined: Sun Jun 07, 2020 3:14 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Sun Jun 07, 2020 3:24 pm

I'm using a universal power supply for the usb hub that comes with a variety of plugs and therefor has a selector for the voltage. I had the same boot problem when set to 5V. I changed it to 3V and now it boots and mounts perfectly :D

navyseai
Posts: 11
Joined: Sat Feb 16, 2019 10:31 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Wed Jun 10, 2020 12:03 pm

lolaf wrote:
Sun Jun 07, 2020 3:24 pm
I'm using a universal power supply for the usb hub that comes with a variety of plugs and therefor has a selector for the voltage. I had the same boot problem when set to 5V. I changed it to 3V and now it boots and mounts perfectly :D
I haven't tried it, but feels really stupid that we need to do that since im using the official power supply...

martinu
Posts: 20
Joined: Mon Oct 08, 2018 1:09 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Sun Sep 13, 2020 11:16 pm

Does anyone have any recommendations for a powered USB3 hub which doesn't back-power the Pi 4 and which allows the Pi to boot from power-off with the hub powered. I'm thinking of the case where the Pi and hub suffer a power cut. The Pi 3B+ with the same hub and HDD booted fine even if the hub was powered and I shutdown and then power-cycled the Pi - or if the house suffered a power cut - ut it seems the Pi 4 is less tolerant.

I have found that if the Pi is warm-rebooted (as opposed to shutdown and power-cycled) it boots perfectly. If the power to the Pi is removed (either following shutdown, or after a power cut) and then reapplied, the Pi sits with no flashing of the green light and no output on the HDMI - nothing to give you a clue where the problem lies :-( Unplugging and then immediately plugging back in either the hub from the Pi or the hub's PSU from the hub allows booting to continue.

The Pi Hut sell https://thepihut.com/products/usb-2-0-p ... wer-supply, but is there an equivalent USB3 version? I'd like to take full advantage of the Pi 4's USB3 ports, especially when copying between USB drives on the hub.

Has the list https://elinux.org/RPi_Powered_USB_Hubs been updated so its information and recommendations is relevant to the Raspberry Pi 4? If, not, is there an equivalent P 4 list? I'm not bothered about a hub that can supply the only power to the Pi (ie no USB-C power): I'm quite happy with a hub PSU and a Pi PSU.

I've read that Is it right that if the +5V (red) wire is cut in the USB lead between the hub and the Pi, this will allow the Pi to boot? Sadly this did not solve the problem for me.

My present hub is an Atolla: https://www.amazon.co.uk/gp/product/B07 ... le_o03_s01

martinu
Posts: 20
Joined: Mon Oct 08, 2018 1:09 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Mon Sep 14, 2020 2:33 pm

navyseai wrote:
Tue May 26, 2020 4:50 pm
i made a workarround, i bought a smart plug, so when i want to reboot, i use the smart plug :lol:
So do you find that if the power to the pi and the power to the hub are turned on at the same time (as would happen if you turned on the smart plug, or if the power was restored after a power cut) your Pi 4 will boot OK?

It's the next thingfor me to try: up to now I've powered the Pi on with the hub already on. Since the main situation I want to avoid is the Pi hanging after a power cut, I suppose I need to test in "simulated power cut" conditions. ;-)

Have any Pi design engineers reviewed any of these threads and come up with a definitive list of the powered hubs that don't provoke the problem? My hub has worked fine with my Pi 3B+ through numerous (sometimes upwards of 30 a day!!!!) brief power blips (vegetation touching high voltage lines last year in the feed to my village), but the Pi 4 refuses to boot if the hub is powered on, irrespective of whether any devices (eg HDD) are plugged into the hub.

I don't need the hub as means of converting one USB into many; I simply need it to power the HDD because the Pi itself, with the authorised Pi 4 power supply, will not power the HDD plus a few digital TV tuners. I'd buy a dedicated externally-powered HDD (or an externally-powered caddy for a SATA disk) but I'm not confident that this would solve the problem, given that it happens even though I've cut the red 5V line in the USB cable from hub to Pi, so back-powering shouldn't be a problem. Some people have suggested that it's voltages that the hub is applying to data lines - and goodness knows how you solve that one, except find a hub that doesn't do this - if only there was a definitive list of those!

It's annoying. The new Pi is doing a damn good job as a PVR - for some reason I get far fewer (if any) continuity errors in recordings, using the same tuners and satellite/aerial feed that I used for the Pi 3B that it replaces - but I'm not sure I can take the risk that the Pi might not recover after a power blip, and I'd lose all the programmes I'd set to record.

wolfmanjm
Posts: 3
Joined: Thu Apr 20, 2017 10:48 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Fri Jan 15, 2021 5:01 pm

I also have the Atolla powered hub, and also get the "won't boot from power up when Powered hub is connected" on RPI4.
I am not convinced this is a backpowering issue at least with this hub as I checked the vbus line that plugs into the host and there is no voltage on it at all when the hub is powered, so at least the vbus is not being backpowered by this hub. However there is voltage on the two data lines, however I would think this is normal.

I am suspecting this may have something to do with booting from a USB disk, not sure where the powered hub issue comes in but maybe it is not liking a disk on the USB hub when it boots. I'll check if I disconnect the disk from the hub and just have a camera and input device and see if it still refuses to boot.

wolfmanjm
Posts: 3
Joined: Thu Apr 20, 2017 10:48 pm

Re: Raspberry Pi 4 reboot fails when a powered usb hub is attached

Fri Jan 15, 2021 7:51 pm

I think this may be the issue in my case viewtopic.php?f=28&t=250990#p1532221 as there is definitely power on the D+/D- lines (but not on the VBus). I did test with no disk on the hub and it still did not boot.
Apparently a very old version of the firmware did not exhibit this issue, indicating that a change in the firmware enabled this bug.

Return to “Troubleshooting”