2

I've got a powered USB hub with an ethernet port connected to my Pi. When the Pi boots with it plugged, the boot process hangs until I unplug it. This seemingly includes the clock, as /var/log/syslog doesn't show any indication of the hang, as there is no gap between the different events.

To demonstrate this, I've registered a systemd service after network.target which simply knocks on an FTP server that I'm running on a different machine. When the hub is not plugged in, the FTP server receives a connection ~30 seconds after a reboot. Whereas when it is plugged in, the connection doesn't happen until ~30 seconds after I unplug the hub.

You can observe this in these two short clips:

In the latter, I unplug the hub at exactly 02:00, and click "Split" once I return to my computer around 10 seconds later.

Aug  8 18:13:13 blueberry kernel: [    0.767670] usb 1-1: new high-speed USB device number 2 using xhci_hcd
Aug  8 18:13:13 blueberry kernel: [    0.950324] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
Aug  8 18:13:13 blueberry kernel: [    0.950365] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Aug  8 18:13:13 blueberry kernel: [    0.950393] usb 1-1: Product: USB2.0 Hub
Aug  8 18:13:13 blueberry kernel: [    0.952444] hub 1-1:1.0: USB hub found
Aug  8 18:13:13 blueberry kernel: [    0.952780] hub 1-1:1.0: 4 ports detected
Aug  8 18:13:13 blueberry kernel: [    1.141534] NET: Registered protocol family 10
Aug  8 18:13:13 blueberry kernel: [    1.142765] Segment Routing with IPv6
--- snip ---
Aug  8 18:13:24 blueberry dhcpcd[358]: eth0: adding route to 192.168.1.0/24
Aug  8 18:13:24 blueberry dhcpcd[358]: eth0: adding default route via 192.168.1.1
Aug  8 18:13:24 blueberry dhcpcd[358]: forked to background, child pid 549
Aug  8 18:13:24 blueberry systemd[1]: Started dhcpcd on all interfaces.
Aug  8 18:13:24 blueberry systemd[1]: Reached target Network.
Aug  8 18:13:24 blueberry systemd[1]: Starting Permit User Sessions...
Aug  8 18:13:24 blueberry systemd[1]: Started Interfaces.
Aug  8 18:13:24 blueberry systemd[1]: Starting /etc/rc.local Compatibility...
Aug  8 18:13:24 blueberry systemd[1]: Starting OpenBSD Secure Shell server...
Aug  8 18:13:24 blueberry systemd[1]: Condition check resulted in fast remote file copy program daemon being skipped.
Aug  8 18:13:24 blueberry log.sh[551]: Knocking on FTP...
Aug  8 18:13:24 blueberry systemd[1]: Started Permit User Sessions.

As you can see, there is barely any difference in time between when the hub is found and when the FTP connection is made. Yet in real time, the time spent is a few minutes.

I should add that the Pi does NOT hang if it is plugged in after it has already fully booted. This is the exact USB hub I'm using: https://www.amazon.com/UGREEN-Ethernet-Adapter-Converter-Chromebook/dp/B07TWGHM99/

I initally thought it was the ethernet interface on the hub conflicting with the on-board one, as I'm running it headlessly and I could not connect to the SSH service. As such I opened this other question, which pointed me towards adding the following bit to /etc/dhcpcd.conf, that disables said interface: denyinterfaces enx2c16dba05ff7

6
  • Please add two things to your question: 1. Explain "blueberry kernel", 2. contents of /boot/config.txt.
    – Seamus
    Aug 8, 2020 at 19:44
  • "As you can see, there is barely any difference in time between when the hub is found and when the FTP connection is made. Yet in real time, the time spent is a few minutes." -> Don't look at it that way or you will be looking in the wrong place. There's no reason to believe (based on what you present here) that those times aren't 100% accurate, and whatever the hang-up is happens before or after that point, not somewhere in the middle of the log output. Ie., the clock issue is a red herring here. @Seamus blueberry is just the hostname, it is used in the system logs.
    – goldilocks
    Aug 8, 2020 at 19:51
  • @goldilocks In that case it would have to be at the very beggining, as the system becomes responsive once the FTP receives the connection and the boot sequence ends. Aug 8, 2020 at 20:00
  • @Seamus I'm running a fresh Raspbian install. Here's my config.txt: pastebin.com/FAbn4uc5 Aug 8, 2020 at 20:00
  • @goldilocks: "blueberry" I wondered that, but there's also a blueberry builder project... a RPi-like device. That's why I asked.
    – Seamus
    Aug 8, 2020 at 20:01

1 Answer 1

3

After hours of troubleshooting, getting a different hub from Amazon without an ethernet port. Upgrading the kernel, reflashing, trying a different power supply, etc. I believe that my Pi could have been defective so I got a replacement.

EDIT: Got the new replacement yet the issue persists. This is not a one-off defect, this affects all Raspberry Pi 4 boards and the only solution seems to be to get a more expensive hub which doesn't backfeed power into the Pi. This looks like an issue with the USB 3.0 ports as these will still work fine on the USB 2.0 ones.

https://www.reddit.com/r/raspberry_pi/comments/cg290a/issues_with_pi4_booting_while_usb_power_hub_is/

https://github.com/raspberrypi/firmware/issues/1352

Be careful when buying powered USB 3.0 ports from Amazon. Some will claim to be compatible with Raspbery Pi 4 but then present this issue.

Amazon item

I have two UGREEN Powered USB 3.0 hubs from Amazon, one with Ethernet and one without. The latter claims to be compatible with Raspberry Pi 4, but neither are!

3
  • It would be good if you could mark your answer as "Accepted" - that will take it "out of circulation".
    – Seamus
    Aug 10, 2020 at 22:35
  • @Seamus I wanted to make sure that indeed it was a one-off issue but it turns out it wasn't. Updated my answer. Aug 11, 2020 at 14:33
  • Good! I'm glad you've chased this one down. +1 for persistence :)
    – Seamus
    Aug 11, 2020 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.