External USB drive keeps on disconnecting randomly
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
External USB drive keeps on disconnecting randomly
Hello Linux users!
I have just registered on this forum seeking help for my problem with an external USB disk drive. Hopefully somebody would be able to assist me with troubleshooting and resolving the following issue.
I have just installed Fedora 20 on my brand new Dell XPS 13. Unfortunately, my external USB disk drive constantly disconnects and reconnects. Now, what is important, is that disconnection might happen both during a data transfer and when drive is idle.
Here are my device details as well as some basic info (if you need more information, please tell me what kind of data could be valuable):
Code:
# smartctl -i /dev/sdc
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.3-201.fc20.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus SpinPoint M8 (AF)
Device Model: ST1000LM024 HN-M101MBB
Serial Number: S2S6J9DD220733
LU WWN Device Id: 5 0004cf 209b1af87
Firmware Version: 2AR10001
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Sat Feb 22 13:56:32 2014 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
# uname -a
Linux localhost.localdomain 3.13.3-201.fc20.x86_64 #1 SMP Fri Feb 14 19:08:32 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Here is an example output of a disconnection as encountered in the /var/log/messages file:
Code:
Feb 22 11:44:22 localhost kernel: [ 6283.144884] usb 3-2: USB disconnect, device number 9
Feb 22 11:44:27 localhost kernel: [ 6287.784334] usb 3-2: Disable of device-initiated U1 failed.
Feb 22 11:44:27 localhost kernel: [ 6288.287999] usb 3-2: device not accepting address 9, error -22
Feb 22 11:44:27 localhost kernel: [ 6288.345028] sd 11:0:0:0: [sdb] Unhandled error code
Feb 22 11:44:27 localhost kernel: [ 6288.345033] sd 11:0:0:0: [sdb]
Feb 22 11:44:27 localhost kernel: [ 6288.345035] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Feb 22 11:44:27 localhost kernel: [ 6288.345038] sd 11:0:0:0: [sdb] CDB:
Feb 22 11:44:27 localhost kernel: [ 6288.345039] Write(10): 2a 00 57 ea c2 c6 00 00 f0 00
Feb 22 11:44:27 localhost kernel: [ 6288.345048] end_request: I/O error, dev sdb, sector 1475003078
Feb 22 11:44:27 localhost kernel: [ 6288.345108] sd 11:0:0:0: [sdb] Unhandled error code
Feb 22 11:44:27 localhost kernel: [ 6288.345110] sd 11:0:0:0: [sdb]
Feb 22 11:44:27 localhost kernel: [ 6288.345111] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Feb 22 11:44:27 localhost kernel: [ 6288.345113] sd 11:0:0:0: [sdb] CDB:
Feb 22 11:44:27 localhost kernel: [ 6288.345114] Write(10): 2a 00 57 ea c3 b6 00 00 10 00
Feb 22 11:44:27 localhost kernel: [ 6288.345121] end_request: I/O error, dev sdb, sector 1475003318
Feb 22 11:44:27 localhost kernel: [ 6288.345132] quiet_error: 446 callbacks suppressed
Feb 22 11:44:27 localhost kernel: [ 6288.345134] Buffer I/O error on device dm-3, logical block 204
Feb 22 11:44:27 localhost kernel: [ 6288.345136] lost page write due to I/O error on dm-3
Feb 22 11:44:27 localhost kernel: [ 6288.345140] Buffer I/O error on device dm-3, logical block 205
Feb 22 11:44:27 localhost kernel: [ 6288.345141] lost page write due to I/O error on dm-3
Feb 22 11:44:27 localhost kernel: [ 6288.345459] Aborting journal on device dm-4-8.
Feb 22 11:44:27 localhost kernel: [ 6288.345460] Aborting journal on device dm-3-8.
Feb 22 11:44:27 localhost kernel: [ 6288.345473] Buffer I/O error on device dm-3, logical block 97656833
Feb 22 11:44:27 localhost kernel: [ 6288.345475] lost page write due to I/O error on dm-3
Feb 22 11:44:27 localhost kernel: [ 6288.345480] JBD2: Error -5 detected when updating journal superblock for dm-3-8.
Feb 22 11:44:27 localhost kernel: [ 6288.345496] Buffer I/O error on device dm-4, logical block 24395776
Feb 22 11:44:27 localhost kernel: [ 6288.345498] lost page write due to I/O error on dm-4
Feb 22 11:44:27 localhost kernel: [ 6288.345505] JBD2: Error -5 detected when updating journal superblock for dm-4-8.
Feb 22 11:44:27 localhost kernel: [ 6288.346628] sd 11:0:0:0: [sdb] Synchronizing SCSI cache
Feb 22 11:44:27 localhost kernel: [ 6288.346686] sd 11:0:0:0: [sdb]
Feb 22 11:44:27 localhost kernel: [ 6288.346689] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Feb 22 11:44:27 localhost kernel: [ 6288.346764] EXT4-fs error (device dm-4) in ext4_init_inode_table:1299: IO failure
Feb 22 11:44:27 localhost kernel: [ 6288.346787] Buffer I/O error on device dm-4, logical block 0
Feb 22 11:44:27 localhost kernel: [ 6288.346789] lost page write due to I/O error on dm-4
Feb 22 11:44:27 localhost kernel: [ 6288.346941] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88021127ce00
Feb 22 11:44:27 localhost kernel: [ 6288.346948] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88021127ce40
Feb 22 11:44:27 localhost kernel: [ 6288.668132] usb 3-2: new SuperSpeed USB device number 10 using xhci_hcd
Feb 22 11:44:27 localhost kernel: [ 6288.679391] usb 3-2: New USB device found, idVendor=174c, idProduct=5106
Feb 22 11:44:27 localhost kernel: [ 6288.679395] usb 3-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Feb 22 11:44:27 localhost kernel: [ 6288.679397] usb 3-2: Product: StoreJet Transcend
Feb 22 11:44:27 localhost kernel: [ 6288.679399] usb 3-2: Manufacturer: StoreJet Transcend
Feb 22 11:44:27 localhost kernel: [ 6288.679400] usb 3-2: SerialNumber: S2S6J9DD220733
Feb 22 11:44:27 localhost kernel: [ 6288.681301] usb-storage 3-2:1.0: USB Mass Storage device detected
Feb 22 11:44:27 localhost kernel: [ 6288.682127] scsi12 : usb-storage 3-2:1.0
Feb 22 11:44:27 localhost mtp-probe: checking bus 3, device 10: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Feb 22 11:44:27 localhost mtp-probe: bus: 3, device: 10 was not an MTP device
Feb 22 11:44:28 localhost kernel: [ 6289.683623] scsi 12:0:0:0: Direct-Access StoreJet Transcend 0 PQ: 0 ANSI: 6
Feb 22 11:44:28 localhost kernel: [ 6289.684063] sd 12:0:0:0: Attached scsi generic sg1 type 0
Feb 22 11:44:28 localhost kernel: [ 6289.684887] sd 12:0:0:0: [sdd] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
Feb 22 11:44:28 localhost kernel: [ 6289.685136] sd 12:0:0:0: [sdd] Write Protect is off
Feb 22 11:44:28 localhost kernel: [ 6289.685374] sd 12:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 22 11:44:29 localhost kernel: [ 6290.333235] sdd: sdd1 sdd2 sdd3 sdd4 < sdd5 sdd6 sdd7 >
Feb 22 11:44:29 localhost kernel: [ 6290.334802] sd 12:0:0:0: [sdd] Attached SCSI disk
Feb 22 11:44:30 localhost kernel: [ 6290.949631] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #8126465: block 32505888: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6290.949662] Buffer I/O error on device dm-1, logical block 0
Feb 22 11:44:30 localhost kernel: [ 6290.949664] lost page write due to I/O error on dm-1
Feb 22 11:44:30 localhost kernel: [ 6290.949797] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #8126465: block 32505888: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6290.949800] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6290.949816] Buffer I/O error on device dm-1, logical block 0
Feb 22 11:44:30 localhost kernel: [ 6290.949818] lost page write due to I/O error on dm-1
Feb 22 11:44:30 localhost kernel: [ 6290.949976] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #8126465: block 32505888: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6290.949994] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6290.950011] Buffer I/O error on device dm-1, logical block 0
Feb 22 11:44:30 localhost kernel: [ 6290.950013] lost page write due to I/O error on dm-1
Feb 22 11:44:30 localhost kernel: [ 6290.990778] EXT4-fs warning (device dm-1): __ext4_read_dirblock:1372: error reading directory block (ino 8388609, block 4)
Feb 22 11:44:30 localhost kernel: [ 6291.035726] EXT4-fs error (device dm-1): ext4_find_entry:1309: inode #131189: comm audacious: reading directory lblock 0
Feb 22 11:44:30 localhost kernel: [ 6291.035732] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.035756] Buffer I/O error on device dm-1, logical block 0
Feb 22 11:44:30 localhost kernel: [ 6291.035758] lost page write due to I/O error on dm-1
Feb 22 11:44:30 localhost kernel: [ 6291.035820] EXT4-fs warning (device dm-1): __ext4_read_dirblock:908: error reading directory block (ino 131189, block 0)
Feb 22 11:44:30 localhost kernel: [ 6291.056463] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #4194305: block 16777248: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.056469] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.056492] Buffer I/O error on device dm-1, logical block 0
Feb 22 11:44:30 localhost kernel: [ 6291.056494] lost page write due to I/O error on dm-1
Feb 22 11:44:30 localhost kernel: [ 6291.056937] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #4194305: block 16777248: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.056940] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.089272] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #4194305: block 16777248: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.089279] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.144286] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #2883585: block 11534368: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.144292] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.144636] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #2883585: block 11534368: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.144640] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.150254] EXT4-fs error (device dm-1): __ext4_get_inode_loc:3909: inode #2883585: block 11534368: comm audacious: unable to read itable block
Feb 22 11:44:30 localhost kernel: [ 6291.150259] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.163885] EXT4-fs (dm-1): previous I/O error to superblock detected
Feb 22 11:44:30 localhost kernel: [ 6291.189790] EXT4-fs warning (device dm-1): __ext4_read_dirblock:1372: error reading directory block (ino 8388609, block 4)
Feb 22 11:44:35 localhost kernel: [ 6296.250760] Aborting journal on device dm-1-8.
Feb 22 11:44:35 localhost kernel: [ 6296.250787] quiet_error: 17 callbacks suppressed
Feb 22 11:44:35 localhost kernel: [ 6296.250790] Buffer I/O error on device dm-1, logical block 24150016
Feb 22 11:44:35 localhost kernel: [ 6296.250792] lost page write due to I/O error on dm-1
Feb 22 11:44:35 localhost kernel: [ 6296.250818] JBD2: Error -5 detected when updating journal superblock for dm-1-8.
I have tried asking the same question on Fedora Forums one week ago, but no luck so far (nobody has even bothered to respond, so it might be a though one to tackle).
Please note that the drive works perfectly fine on my older laptop running Fedora 17, so I can instantly eliminate all suspicions about drive or cable defect. It must be something related to a USB 3.0 or a newer Kernel drivers, but I honestly have no clue where and what to look for.
Any ideas what is going on there? I would very much appreciate any help from you!
First thing I would do is run a 'short' and 'conveyance' test on it using 'smartctl -t short' and 'smartctl -t conveyance'. Wait for each to finish and post 'smartctl -a /dev/sdd'. Running a 'long' test takes forever on external drives, so don't bother.
Is this drive USB 2.0 or 3.0 ? Does the older laptop use 2.0 ? Does the newer computer use 3.0 ?
Try pulling it into the black 2.0 ports on the newer computer, to try and eliminate controller driver issues.
The HDD looks good, so I think it might be a problem with the USB 3.0 controller. Are you sure there are no USB 2.0 ports ? Because that would mean you cannot plug a printer into your new computer. USB 3.0 ports are usually blue, and USB 2.0 ones are black.
The HDD looks good, so I think it might be a problem with the USB 3.0 controller. Are you sure there are no USB 2.0 ports ? Because that would mean you cannot plug a printer into your new computer. USB 3.0 ports are usually blue, and USB 2.0 ones are black.
Glad to hear that HDD looks good. Yes, I am positively sure that there is no USB 2.0 port, just two USB 3.0 ports. That's confirmed by a laptop specification too.
Did you try the drive in both ports ? Try another USB cable as well, a high-quality short cable. I know even USB 2.0 HDDs disconnect with longer bad-quality cables. Or you can try a two-headed cable one for power and one for data, which might help.
I think there is only one controller, but it could be a driver issue.
If only there were a way to force it to use USB 2.0 for the HDD. Do you have any other USB 3.0 devices that you use ? You could try blacklisting the xhci driver, but that would prevent USB 3.0 devices from working.
Yes, I have tried the drive in both ports. I will have to buy a high-quality short cable first before trying it. Two-headed cable wouldn't work here, because both ports are located on the opposed sides of a laptop.
Yes, indeed, I have another USB 3.0 HDD, and this one is working perfectly fine. I absolutely agree that forcing this drive to somehow operate in a 2.0 mode would probably solve the issue. But I have no idea, how to make it.
Alright, now it seems like something interesting is happening. I have removed the other USB 3.0 drive from its slot. The previously disconnecting one is working stable so far. It has been running fine since two hours already. No breaks, no disconnection happened. So... I do not want to announce a success yet, but it seems like either this laptop or this Linux system simply cannot handle having two external disk drives connected and active at the same time. Let me wait a bit more and see if that is actually the case. Thanks!
Sometimes, if you plug an external HDD in, then you plug another one in, the first disconnects. I'm not sure why it happens, but I have observed this. Usually it happens if the two HDDs are the same brand and type.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.