remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Pi freezing when plugging in a new SSD

Tue Jan 21, 2020 11:43 pm

Hi,

I recently bought an SSD:
https://www.amazon.co.uk/gp/product/B01KFLH1WS/

and enclosure:
https://www.amazon.co.uk/gp/product/B079FR7H5H

For my RPi 4b. However as soon as I plug the drive in, the Pi freezes. I would be really surprised if it was immediately underpowered, but I don't know what else would cause this to happen?

Any way I can figure out what the issue might be? (I'm also aware of the USB 3.0 issues on the RPi 4, but not sure that's the problem here...)

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

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 9:07 am

you haven't told us how you are powering your setup (guessing is ill-advised)
"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!"

pcmanbob
Posts: 8361
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 9:09 am

Hi.

As the pi crashes when you plug the SSD in it would suggest power is 1st on the list of suspects.

It depends on what you are using as a power supply for your pi and the SSD

what does the red LED on the pi do when you plug in the SSD ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 9:18 am

Ok so the power is coming from a 5v 3A adapter, the one that comes with this kit:

https://thepihut.com/collections/raspbe ... 6446079038

The SSD is plugged directly into the PI.
The only other thing plugged in at the moment is the HDMI lead and a Wireless keyboard + mouse dongle.

The other thing to note is that I can SSH into the PI and the terminal seems to be running fine, but the wireless mouse and keyboard directly connected basically stop working. It’s therefore hard to tell whether the PI has indeed frozen or somehow it’s just stopping the wireless keyboard and mouse...

I will have to check the power light situation later today...

Thanks for the help!!

pcmanbob
Posts: 8361
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 9:22 am

So the pi is not crashing then only the keyboard and mouse.

I suspect plugging in the SSD is consuming all the current available on the USB ports, which is causing the Wireless keyboard + mouse dongle to drop out.

There is only 1.2A available on the USB ports in total.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 10:31 am

Ah ok, that's interesting, and makes sense, although surprised that the drive draws that much...

I've tried to find a technical data sheet for the enclosure, but cannot find anything. My current calculations are:
- SSD drive itself seems to draw 2W, so = 0.4A
- The keyboard receiver = 0.1A

so that means 0.7A to play with for the enclosure... does it seem likely that it would draw that much?

In any event, it sounds like I should invest in a powered USB hub. Do you have any recommendations?

Thanks!
Rob

dgordon42
Posts: 782
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 11:29 am

2 things to try:

First, power down your Pi, plug in your USB Drive, and power up again. Does the Pi work normally now, and does the drive work? It's possible that your power supply can't handle hot plugging of the Drive.

Next, read the sticky post about poor performance with SSD's attached to the Pi's USB 3 ports here. Some posters have found it necessary to use Quirks to get the JSMicron JMS578 chip-set in your adapter to work with the Pi.

Hope this helps,
Dave.

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

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 11:43 am

What, exactly "freezes" on the Pi4?

Are you sure it's actually freezing, or does the wireless keyboard just stop working? USB 3.0 is known to cause interference with 2.4GHz wireless devices, and that is a common frequency for wireless keyboard dongles. Usually putting the dongle on a short USB 2.0 extension cable will fix it. Replacing cheap non-shielded USB cables with better ones could help as well.

I'd say it's very unlikely a power problem. It's more likely the JSM578 chipset quirks problem, or 2.4GHx interference, or both.
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?

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

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 11:52 am

HawaiianPi wrote:
Wed Jan 22, 2020 11:43 am
I'd say it's very unlikely a power problem. It's more likely the JSM578 chipset quirks problem, or 2.4GHx interference, or both.
Power would be my first choice for problems when hot plugging USB devices.

When you plug something into a USB port there will be a short current surge while any decoupling capacitors in the device charge up. It could be much greater than the steady operating current needed by the device and with an upper limit of 1.2A it could cause the USB 5V line to droop.

I can't "hot plug" any of my USB HDDs but they all run fine from start up. In this case it's probable that the higher spin-up current for the motor is causing the problem.

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

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

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 12:28 pm

But the OP isn't using a hard drive. They are using an SSD, and a recent model at that (which are usually pretty power efficient). I've run my Pi 4B2 with dual SSD using the older 2.5A official PSU (with a USB-C adapter). The OP is using the 5.1V/3A official USB-C PSU with a single SSD.

If I was a betting man, my money would be on the system not actually freezing, and it's just a problem with the 2.4GHz interference borking the wireless keyboard/mouse. Which seems to be supported by this later post from the OP.
remcinerney wrote:
Wed Jan 22, 2020 9:18 am
The other thing to note is that I can SSH into the PI and the terminal seems to be running fine, but the wireless mouse and keyboard directly connected basically stop working. It’s therefore hard to tell whether the PI has indeed frozen or somehow it’s just stopping the wireless keyboard and mouse...
Put the dongle on a short USB 2.0 extension cable (preferably shielded) and let us know if that helps.
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?

remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 1:35 pm

So, responses to a few questions:

- Hot plugging does not seem to make a difference. The issue presents itself when Pi is booted with SSD plugged in, and / or SSD is hot plugged after booting

- I enabled the quirks solution in the cmdline.txt, and the problem still presented itself.

I had no idea about the USB 3.0 / 2.4Ghz interference issue, but given the evidence so far, I also agree that seems the most likely issue. As others have said, I don't think a new SSD like that should exceed power requirements. I was also able to ssh into the Pi + copy a load of files onto the SSD with no issues at all (suggesting the Pi itself was not experiencing any issues...)

In regards to the interference and 2.4GHz Wifi - is it likely that the Pi will experience wifi connectivity issues with use of the USB 3.0 ports?

I'll give the USB extension a go later, and report back!

remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 1:44 pm

Also...

Do you guys think a cable like these will be adequately shielded?:

https://www.amazon.co.uk/gp/product/B01KWOBK84/
OR
https://www.amazon.co.uk/UGREEN-10373-E ... B00P0ES0YE


Thanks

remcinerney
Posts: 6
Joined: Tue Jan 21, 2020 11:36 pm

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 7:55 pm

UPDATE - I can confirm that the issue is with the USB 3.0 interference in the 2.4GHz range, and not the power...

The interference is actually atrocious, I need to buy a more expensive shielded cable as the one I'm currently using still requires some movement to prevent the interference.
I also might find some other way to shield the drive - I saw someone wrap their SSD in foil to help... anyone else had experience with that?

Thanks for the help in diagnosing the problem - I am now enjoying a much faster drive experience than my old SD card!

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

Re: Pi freezing when plugging in a new SSD

Wed Jan 22, 2020 8:02 pm

HawaiianPi wrote:
Wed Jan 22, 2020 12:28 pm
But the OP isn't using a hard drive.
"When you plug anything into a USB port there will be a short current surge "

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

renice123
Posts: 165
Joined: Tue Oct 15, 2019 3:56 pm

Re: Pi freezing when plugging in a new SSD

Thu Jan 23, 2020 7:25 am

Well, you can check out old ways to deal with broadband radiation from amateur radio.
Start with the simplest: buy a good usb & hdmi cable, with ferrites, and buy an aluminum box (I prefer copper) for an SSD. Electrically connect the case of the disk box to the ground (if the design allows this). Sometimes the Chinese “forget” to do this. And boxing works like a good antenna. And the interference comes from the connectors mainly, so they need to be "isolated" (see below)
Image

Hang ferrite rings on all wires - this cheap method will save you some more potential problems. Ferrite rings are an old way and time-tested. The usb3 interference is broadband there, so it's quite possible to crush it.
Image
Image

You can solder the lowpass filter. Image
Buy a quality power supply. A normal power supply is filtering the input and output voltages, preferably with voltage isolation, because in cheap power supplies, such turbidity climbs on the network, it is all noise too, it's scary to watch. Two or three inductors output / output, capacitors, fuses and posistors, protective diodes and high-speed diodes, shunted by capacitors, electrolytic capacitors are shunted by ceramic and happiness comes. What else? Just galvanically disconnect the power of the disk (for example, feed it with a separate high-quality power unit) and Raspberries.
Perhaps all these tips are read scary, but in fact, almost all high-quality power supplies by default include such methods of dealing with microwave interference

PS Yes, it’s very effective to deal with broadband interference by changing the location of the antenna.

Gadgetguy
Posts: 131
Joined: Fri Aug 15, 2014 2:55 am

Re: Pi freezing when plugging in a new SSD

Fri Jan 24, 2020 3:58 am

I too encountered problems when I plugged my ssd and enclosure (via a long usb 3 extender cable )into the pi 4 usb 3 port. I already had a pre-existing usb 2 flash drive plugged into the other usb 3 port and two wireless dongles in the 2 usb ports, one for keyboard the other for mouse. Upon plugging in the ssd I experienced intermittent problems with the mouse pointer freezing or behaving somewhat erratically ie. lagging jerkiness. I solved the problem completely by plugging the 2 wireless dongles and the usb 2 flash drive into an inexpensive and unpowered 4 port usb hub situated a foot and one half from the pi. Now i am wondering if it was necessary to use quirks to run the os from the ssd.

Return to “Troubleshooting”