Odd problem USB HD, keeps disconnecting

I have a strange problem with one specific USB HD. Upon plugging it in or switching on the power to the drive housing, it is detected by the kernel and it is possible to mount and access the drive. However, at random times, I receive a disconnect. This can be right after connecting the drive, sometimes after a few minutes. Even if the disk is not in use. I can’t put my finger on what might cause this problem.

Here is the output from dmesg:

  812.041844] usb 3-3: new high-speed USB device number 124 using xhci_hcd
  812.055149] usb 3-3: New USB device found, idVendor=152d, idProduct=2336
  812.055158] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
  812.055164] usb 3-3: Product: JM20336 SATA, USB Combo
  812.055168] usb 3-3: Manufacturer: JMicron
  812.055172] usb 3-3: SerialNumber: DCAA71766928
  812.105870] usb-storage 3-3:1.0: USB Mass Storage device detected
  812.105949] scsi7 : usb-storage 3-3:1.0
  812.106000] usbcore: registered new interface driver usb-storage
  813.109641] scsi 7:0:0:0: Direct-Access     WDC WD20 EARS-00MVWB0          PQ: 0 ANSI: 2 CCS
  813.110062] sd 7:0:0:0: Attached scsi generic sg3 type 0
  813.110707] sd 7:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
  813.111402] sd 7:0:0:0: [sdc] Write Protect is off
  813.111411] sd 7:0:0:0: [sdc] Mode Sense: 00 38 00 00
  813.113591] sd 7:0:0:0: [sdc] Asking for cache data failed
  813.113600] sd 7:0:0:0: [sdc] Assuming drive cache: write through
  813.116594] sd 7:0:0:0: [sdc] Asking for cache data failed
  813.116596] sd 7:0:0:0: [sdc] Assuming drive cache: write through
  813.134564]  sdc: sdc1 sdc2
  813.137007] sd 7:0:0:0: [sdc] Asking for cache data failed
  813.137009] sd 7:0:0:0: [sdc] Assuming drive cache: write through
  813.137011] sd 7:0:0:0: [sdc] Attached SCSI disk
  816.825638] usb 3-3: USB disconnect, device number 124

As you can see, the disconnect is almost immediate.

For testing purposes, I have already tried swapping the USB cable for another one but this makes no difference. Also, if I use the same cable that came with the drive and I hook it up to a laptop, the disk can be mounted and I can use it as expected. No disconnections and transfer rates high enough to be able to watch video.
I have tried hooking up the drive to another USB port of the system but this makes no difference. However, if I plug in a USB thumb drive, I can use that normally, transfer files and watch video without interruption. So I doubt there’s anything wrong with the USB hardware on the PC.
I have also tried disabling legacy USB support in the BIOS, without effect.

Here is the relevant output from lspci and lsusb:

# lspci | grep USB
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)

# lsusb
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 002: ID 046d:09a4 Logitech, Inc. QuickCam E 3500
Bus 003 Device 003: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 003 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

I am running openSUSE 13.1, up to date with patches and all.

Is there anything else I could try to fix this or an area where I could look into?

I note the ‘xhci_hcd’ reference. Are you connecting via a USB 3 port? This can present issues for some USB 2 hardware. Do you have a USB 2 port to try?

According to the specs, this machine has two rear USB 3 ports, two rear USB 2 ports and one USB 3 port in front. And no matter which port I connect the HD to, it always says xhci_hcd. The USB 3 ports are all marked with the the text “USB 3” so my guess is that the two remaining ones are USB 2.

What I also don’t understand is how two weeks ago, the mount on this disc was stable. There were no disconnects and I was able to restore roughly 500 GB from it to the computer without so much as a hiccup. Somewhere around 2 weeks ago, the issues began, but there’s hardly a pattern. Yesterday, I was able to use it normally. Today, the disc connected and disconnected for the first 15 minutes after booting the PC. Now it appears stable…

I’m really confused. Any ideas of where to look or what logs or output I could supply that would help?

Is the USB HDD a USB 2 device?

If you don’t actually need USB 3 functionality, it might be possible to disable in the BIOS?

As a test, you could also try blacklisting the ‘xhci_hcd’ module. It will prevent USB 3 functionality, but hopefully the USB 2 host controller and driver will operate as expected. To do this

echo xhci_hcd  > /etc/modprobe.d/blacklist.conf

then reboot. Then, try plugging in the HDD again. Hopefully the ehci_hcd module will load instead. (IIRC, this is built-in to the kernel). If this doesn’t work, you’ll need to remove blacklist.conf (as root).

There are lots of bug reports concerning the xhci_hcd module and various USB 3 hardware, so you may need to search and read. Consider submitting a bug report.

Yes, this HD is a USB 2 device.
I’ve checked the BIOS and the only two options I have there concerning USB functionality, are to enable or disable legacy USB support. I’ve tried both settings and neither makes a difference.

I’ll try blacklisting hp-wmi and see what that does.
For testing purposes, wouldn’t a “rmmod xhci_hcd” and “insmod ehci_hcd” have the same effect without requiring a reboot? Or is that a false assumption?

Good to know I’m not the only one with this type of problem, at least.

No, not hp-wmi. That was a mistake. I meant xhci_hcd…

For testing purposes, wouldn’t a “rmmod xhci_hcd” and “insmod ehci_hcd” have the same effect without requiring a reboot?

No, because the host controllers are detected at boot and module loaded AFAIU, but won’t be if blacklisted. (I’m open to being corrected on that. I don’t have USB 3 hardware to play with)

And I knew what you meant and simply copied it over anyway. Guess it’s time for bed…

Afraid you’re right on that one. At least, when I try to do that, the module ehci_hcd isn’t found.

On Fri 31 Jan 2014 01:36:01 PM CST, joopberis wrote:

I have a strange problem with one specific USB HD. Upon plugging it in
or switching on the power to the drive housing, it is detected by the
kernel and it is possible to mount and access the drive. However, at
random times, I receive a disconnect. This can be right after connecting
the drive, sometimes after a few minutes. Even if the disk is not in
use. I can’t put my finger on what might cause this problem.

Here is the output from dmesg:

Code:

812.041844] usb 3-3: new high-speed USB device number 124 using
xhci_hcd 812.055149] usb 3-3: New USB device found, idVendor=152d,
idProduct=2336 812.055158] usb 3-3: New USB device strings: Mfr=1,
Product=2, SerialNumber=5 812.055164] usb 3-3: Product: JM20336
SATA, USB Combo 812.055168] usb 3-3: Manufacturer: JMicron
812.055172] usb 3-3: SerialNumber: DCAA71766928
812.105870] usb-storage 3-3:1.0: USB Mass Storage device detected
812.105949] scsi7 : usb-storage 3-3:1.0
812.106000] usbcore: registered new interface driver usb-storage
813.109641] scsi 7:0:0:0: Direct-Access WDC WD20
EARS-00MVWB0 PQ: 0 ANSI: 2 CCS 813.110062] sd 7:0:0:0:
Attached scsi generic sg3 type 0 813.110707] sd 7:0:0:0: [sdc]
3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB) 813.111402]
sd 7:0:0:0: [sdc] Write Protect is off 813.111411] sd 7:0:0:0: [sdc]
Mode Sense: 00 38 00 00 813.113591] sd 7:0:0:0: [sdc] Asking for
cache data failed 813.113600] sd 7:0:0:0: [sdc] Assuming drive
cache: write through 813.116594] sd 7:0:0:0: [sdc] Asking for cache
data failed 813.116596] sd 7:0:0:0: [sdc] Assuming drive cache:
write through 813.134564] sdc: sdc1 sdc2
813.137007] sd 7:0:0:0: [sdc] Asking for cache data failed
813.137009] sd 7:0:0:0: [sdc] Assuming drive cache: write through
813.137011] sd 7:0:0:0: [sdc] Attached SCSI disk
816.825638] usb 3-3: USB disconnect, device number 124


As you can see, the disconnect is almost immediate.

For testing purposes, I have already tried swapping the USB cable for
another one but this makes no difference. Also, if I use the same cable
that came with the drive and I hook it up to a laptop, the disk can be
mounted and I can use it as expected. No disconnections and transfer
rates high enough to be able to watch video.
I have tried hooking up the drive to another USB port of the system but
this makes no difference. However, if I plug in a USB thumb drive, I can
use that normally, transfer files and watch video without interruption.
So I doubt there’s anything wrong with the USB hardware on the PC.
I have also tried disabling legacy USB support in the BIOS, without
effect.

Here is the relevant output from lspci and lsusb:

Code:

lspci | grep USB

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series
Chipset Family USB xHCI (rev 05) 00:1a.0 USB controller: Intel
Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset
Family USB EHCI #1 (rev 05) # lsusb
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 002: ID 046d:09a4 Logitech, Inc. QuickCam E 3500
Bus 003 Device 003: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 003 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129
Card Reader Controller Bus 001 Device 001: ID 1d6b:0002 Linux
Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux
Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux
Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux
Foundation 3.0 root hub

I am running openSUSE 13.1, up to date with patches and all.

Is there anything else I could try to fix this or an area where I could
look into?

Hi
That would indicate power loss from your external power source, can you
check it’s all ok and provides enough power to drive the installed
device.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

That was my initial thought too. A good idea to check, especially since the OP does claim it is intermittent…possibly heat-related?

On Mon 03 Feb 2014 11:16:01 PM CST, deano ferrari wrote:

malcolmlewis;2621906 Wrote:
> Hi
> That would indicate power loss from your external power source, can
> you check it’s all ok and provides enough power to drive the installed
> device.
That was my initial thought too. A good idea to check, especially since
the OP does claim it is intermittent…possibly heat-related?

Hi
If it’s not that then I would suspect a faulty drive. You need to
connect it to a system though as smartctl won’t work on usb devices…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I very much doubt the drive itself is faulty. As I stated above, I have successfully attached and used it with a laptop. That worked perfectly. However, the laptop did have a USB 2 port, not USB 3.

Faulty power is something to consider. I find the power connector on the rear of the drive housing to be somewhat loose. Not terribly loose, but I’ll see about tightening it all the same.

If that makes no difference, I’ll blacklist the xhci_hcd module to see if that helps things along.

Thanks again for both your suggestions!

OK, here’s an update on what I’ve been testing.

Blacklisting xhci_hcd in /etc/modprobe.d/50-blacklist.conf makes no difference. The module is still loaded upon reboot.
Made sure the power was connected properly. The drive housing is powered from a wall outlet, not over USB, so power being insufficient would hardly be the case.
Swapped USB cables again, with no difference.
Attached drive to a laptop with USB 2: works like a charm…

Thanks for the update. Yes, I think based on the bug reports and anecdotal threads I’ve read, you’ve stumbled across a bug (hardware and driver compatibility). In general, USB 3 host controllers are supposed to be backwards compatible with USB 2 devices. Usually the USB 3 interfaces also have USB 2 host controllers incorporated for this AFAIU. However, the exact architecture probably depends on the manufacturer involved.

Hi
It may be in your initrd, after you blacklisted, did you run mkinitrd? If you run that command anyway, it will list the modules included when it rebuilds before trying to blacklist… else you can blacklist with a grub option.

On Tue 04 Feb 2014 10:36:02 PM CST, deano ferrari wrote:

joopberis;2622122 Wrote:
> OK, here’s an update on what I’ve been testing.
>
> Blacklisting xhci_hcd in /etc/modprobe.d/50-blacklist.conf makes no
> difference. The module is still loaded upon reboot.
> Made sure the power was connected properly. The drive housing is
> powered from a wall outlet, not over USB, so power being insufficient
> would hardly be the case.
> Swapped USB cables again, with no difference.
> Attached drive to a laptop with USB 2: works like a charm…
Thanks for the update. Yes, I think based on the bug reports and
anecdotal threads I’ve read, you’ve stumbled across a bug (hardware and
driver compatibility). In general, USB 3 host controllers are supposed
to be backwards compatible with USB 2 devices. Usually the USB 3
interfaces also have USB 2 host controllers incorporated for this AFAIU.
However, the exact architecture probably depends on the manufacturer
involved.

Hi
So in the system BIOS, can legacy (or such) not be selected for the USB
3.0 ports?

Maybe a usb 2.0 hub will suffice?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

A good suggestion for test purposes. :slight_smile:

Thank you again for the tips.

The BIOS settings are of little help, I’m afraid. All I can do it enable (which is default) or disable legacy USB device support. However, neither seems to have much influence on the drive disconnecting.
Blacklisting xhci_hcd through grub2 results in not having any USB support at all, no alternative driver is loaded.

I did have a USB 2 card reader/USB hub lying around and placing that between the disk and the PC, does seem to help with the problem. The disk is more stable and can be used for some time. I’ve even managed to make a backup again. Today at least: no disconnects so far…

Yes, you did mention that previously.

Blacklisting xhci_hcd through grub2 results in not having any USB support at all, no alternative driver is loaded.

That may be due to the way that the USB 3 interface is designed. I’d read that some hardware has a USB host controller in parallel. Perhaps yours doesn’t.

I did have a USB 2 card reader/USB hub lying around and placing that between the disk and the PC, does seem to help with the problem. The disk is more stable and can be used for some time. I’ve even managed to make a backup again. Today at least: no disconnects so far…

That’s good. (I’m assuming that the ehci_hcd driver takes over?) In any case it suggests your device is not quite compatible with the xhci_hcd driver, and you should probably report this with the relevant dmesg output.

No, the ehci_hcd driver doesn’t take over, see below:

2014-02-05T22:53:53.492635+01:00 gorgoroth kernel:   455.925667] usb 3-4.4: new high-speed USB device number 7 using **xhci_hcd**
2014-02-05T22:53:53.505630+01:00 gorgoroth kernel:   455.939013] usb 3-4.4: New USB device found, idVendor=152d, idProduct=2336
2014-02-05T22:53:53.505655+01:00 gorgoroth kernel:   455.939022] usb 3-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=5
2014-02-05T22:53:53.505672+01:00 gorgoroth kernel:   455.939028] usb 3-4.4: Product: JM20336 SATA, USB Combo
2014-02-05T22:53:53.505674+01:00 gorgoroth kernel:   455.939032] usb 3-4.4: Manufacturer: JMicron
2014-02-05T22:53:53.505677+01:00 gorgoroth kernel:   455.939036] usb 3-4.4: SerialNumber: DCAA71766928
2014-02-05T22:53:53.507610+01:00 gorgoroth kernel:   455.940583] usb-storage 3-4.4:1.0: USB Mass Storage device detected
2014-02-05T22:53:53.507622+01:00 gorgoroth kernel:   455.940794] scsi8 : usb-storage 3-4.4:1.0
2014-02-05T22:53:53.509689+01:00 gorgoroth mtp-probe: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4.4"
2014-02-05T22:53:53.510263+01:00 gorgoroth mtp-probe: bus: 3, device: 7 was not an MTP device
2014-02-05T22:53:54.508612+01:00 gorgoroth kernel:   456.942185] scsi 8:0:0:0: Direct-Access     WDC WD20 EARS-00MVWB0          PQ: 0 ANSI: 2 CCS
2014-02-05T22:53:54.509593+01:00 gorgoroth kernel:   456.942471] sd 8:0:0:0: Attached scsi generic sg7 type 0
2014-02-05T22:53:54.509602+01:00 gorgoroth kernel:   456.943007] sd 8:0:0:0: [sdg] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
2014-02-05T22:53:54.512609+01:00 gorgoroth kernel:   456.946235] sd 8:0:0:0: [sdg] Write Protect is off
2014-02-05T22:53:54.512636+01:00 gorgoroth kernel:   456.946272] sd 8:0:0:0: [sdg] Mode Sense: 00 38 00 00
2014-02-05T22:53:54.513609+01:00 gorgoroth kernel:   456.947077] sd 8:0:0:0: [sdg] Asking for cache data failed
2014-02-05T22:53:54.513629+01:00 gorgoroth kernel:   456.947085] sd 8:0:0:0: [sdg] Assuming drive cache: write through
2014-02-05T22:53:54.515620+01:00 gorgoroth kernel:   456.949061] sd 8:0:0:0: [sdg] Asking for cache data failed
2014-02-05T22:53:54.515626+01:00 gorgoroth kernel:   456.949070] sd 8:0:0:0: [sdg] Assuming drive cache: write through
2014-02-05T22:53:54.534597+01:00 gorgoroth kernel:   456.968034]  sdg: sdg1 sdg2
2014-02-05T22:53:54.537609+01:00 gorgoroth kernel:   456.970433] sd 8:0:0:0: [sdg] Asking for cache data failed
2014-02-05T22:53:54.537615+01:00 gorgoroth kernel:   456.970436] sd 8:0:0:0: [sdg] Assuming drive cache: write through
2014-02-05T22:53:54.537616+01:00 gorgoroth kernel:   456.970438] sd 8:0:0:0: [sdg] Attached SCSI disk

You mean file a report of the issue in the openSUSE bugzilla?

Okay, thanks for clarifying. I note that you’re still getting ‘Asking for cache data failed’ messages, but no ‘USB disconnect…’ message. It is not clear about the cause of this. (A common cause is USB power supply issues, but you are using a powered device.)