Kernel stopped detecting my USB drive

I have an external hard drive that I connect to my computers by USB. One of these computers (running openSUSE Tumbleweed) recently stopped recognizing the drive when I plug it in. lsusb no longer lists the drive when it’s plugged in, and /var/log/messages no longer shows the kernel’s usbcore detecting the drive. I’ve tried plugging the drive into different USB ports, but that doesn’t help. The computer has no trouble recognizing other USB drives plugged into these same ports. And the same drive is recognized by my other computers running openSUSE Leap 15.0. I’ve also tried using a different USB cable but that doesn’t help.

Is there any further testing I can do to determine where the problem lies? The fact that the drive works with other computers suggests that it’s not a hardware problem with the drive itself, and the fact that other drives work with the computer suggests that it’s not a hardware problem with my computer.

I would try with

sudo hwinfo --usb
  • can you see the drive? If yes, try
sudo fdisk -l

can you see /dev/sdx - (x can be b, c, d…) with size of your usb drive?
You may need to install hwinfo with

sudo zypper in hwinfo

This is not one of works, doesn’t work issues (drive is not dead, your USB is not dead), so it’s hard to troubleshoot. Could be not enough USB power or drive controller failing. What kind of computer is the problematic one? Desktop, laptop? Back up data on that drive. Do you have another drive of same make or can you borrow one? If you have a desktop, can you borrow/try PCIe USB card?

Do you get any kernel messaging at all when it is first plugged in?

Run the following

dmesg -w

then attach and capture any output generated.

No.

Could be not enough USB power or drive controller failing.
The drive is definitely getting at least some power from the computer because its LED turns on. If the drive controller is failing, why is it failing with one computer but not others?

What kind of computer is the problematic one? Desktop, laptop?
It’s a fairly recent desktop machine, purchased in the last year. It’s running an Intel Core i7-7700K CPU on an ASRock B250M-HDV motherboard. The USB ports are connected to the motherboard.

Back up data on that drive.
Already done. :slight_smile: In fact, I used the desktop machine to do the backup. The drive stopped working with the desktop machine some time after the backup. (Possibly after a system update; I do a zypper dup about every week.)

Do you have another drive of same make or can you borrow one? If you have a desktop, can you borrow/try PCIe USB card?
No, I don’t have access to another make of the same drive, nor a PCIe USB card.

No, dmesg shows no kernel messages at all when connecting the drive.

This reads like a (USB) current supply issue. Does this USB HDD behave the same way with all other available USB ports? FWIW, there was a recent thread describing strange behaviour (following a recent Leap update) with a USB barcode scanner that seemed to be power-related…
https://forums.opensuse.org/showthread.php/532312-Neither-Nisuta-nor-Motorola-Symbol-LS1203-barcode-scanner-working-anymore-on-leap-15

Can you boot from an earlier kernel, or rollback if using snapper (if applicable), and check behaviour?

What about powered USB hub?

That’s a possible workaround, (as would be a USB power injector Y-cable), but it would be more useful to identify what has changed with respect to the USB subsystem drivers that might have impacted here.

OK, I did some further testing. The external drive does not work with either of the USB ports on the front of the desktop machine (although it used to). However, it does work with the USB ports on the back of the machine. All the ports are USB 3.1. I don’t have any USB 2 ports on this machine.

One of my other machines (the one I happen to have with me at the moment) is a laptop with two USB 2 ports and one USB 3.1 port. The drive is recognized when plugged into the USB 2 ports, but not the USB 3.1 port.

FWIW, there was a recent thread describing strange behaviour (following a recent Leap update) with a USB barcode scanner that seemed to be power-related…
Neither Nisuta nor Motorola Symbol LS1203 barcode scanner working anymore on leap 15 - Hardware - openSUSE Forums

Yes, that problem is similar to mine, and just as strange.

The last time I can confirm the drive worked with the front ports on my desktop machine was on 2 April 2018. My /var/log/zypp/history and snapper snapshots don’t go back that far. If anyone knows which kernel version Tumbleweed was using in late March 2018, and if Tumbleweed RPMs for that version are still available somewhere, then I can try what you suggest.

You can try live CD / USB - for example Knoppix from last year. It’s enough to see if the drive is detected under Knoppix and it’s your kernel or if Knoppix also doesn’t see the drive and it’s USB power problem. Also go in BIOS and check if there are any sleep or power management settings.

After that also try opening case and reseating USB headers. See if there are other USB headers on motherboards and try different header. Make sure you unplug PSU from wall and drain current before by pressing power button with cord unplugged.

OK, I tried with Knoppix 7.7.1 from 2016. Same problem—drive isn’t detected. So I think we can rule out a kernel problem. And since the problem occurs on all the computers I’ve tested (at least with some USB ports), I don’t think it’s worth the bother of opening up my case to reseat the USB connectors. The problem is most likely with the drive itself or with the USB cable between the drive and the computers. I’ll try yet another USB cable but if that still doesn’t work, I’ll assume the drive is misbehaving and stop using it entirely.

Thanks to everyone for their troubleshooting suggestions!

I have the following TW kernels saved locally. Ask via PM if you want to try one.

62547184 Jan 31  2018 kernel-default-4.14.15-2.3.x86_64.rpm
64949060 Apr  4 22:24 kernel-default-4.15.13-2.4.x86_64.rpm
66152028 Jun 13 21:10 kernel-default-4.16.12-3.5.x86_64.rpm
66755196 Aug  4 21:15 kernel-default-4.17.12-1.4.x86_64.rpm

Front USB ports are usually provided by an accessory device cabled to one or more ports on the motherboard. You may have one that has failed. Such devices are often available for $10USD or so from newegg.com, certainly for under $20. https://www.newegg.com/Product/Product.aspx?Item=9SIAA5W4WG1112 is an example.

If your external HD was purchased as a single integrated USB device, likely you can extract the HD from it and use it successfully in a generic USB HD enclosure.