Score:0

USB 3.0 drive disconnects / XHCI controller dies after 15 minutes or so

es flag

I am attempting to restore some data I backed up to an external 2TB Toshiba USB drive. It's a USB 3.0 drive and is connected to a USB 3.0 port on my desktop machine running Ubuntu 20.04.03 with kernel 5.4.0-92-generic.

After about 15 minutes of rsynching files, the transfer dies with a bunch of I/O errors, and dmesg shows: xhci_hcd 0000:02:00.0: xHCI host controller not responding, assume dead

I can get the drive to reconnect by unbinding and rebinding the XHCI driver.

I have tried disabling APM for the drive, disabling USB auto-suspend with tlp, and changing the writeback cache settings. Changing the cache settings seemed to improve throughput, but nothing has solved the disconnect/dead issue.

Other ideas here? I don't remember having the issue when I wrote the data to the drive. That was the same machine, but back in 2018 and thus running 16.04 (I think) at that time.

Edit (solution): This is an ASRock 970 Extreme3 2.0 motherboard. The BIOS was quite old (version 1.4, which wasn't even listed on their changelog anymore). Updating to the current/latest (2.6) fixed the issue.

Edit (more detail about storage and USB devices):

grep -i FPDMA /var/log/syslog*

returns nothing

fdisk -l:

Disk /dev/loop0: 141.52 MiB, 148385792 bytes, 289816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 99.38 MiB, 104202240 bytes, 203520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 147.58 MiB, 154738688 bytes, 302224 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 99.45 MiB, 104267776 bytes, 203648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 55.45 MiB, 58134528 bytes, 113544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 55.5 MiB, 58183680 bytes, 113640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 61.75 MiB, 64729088 bytes, 126424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-21M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7E2A25AD-5A8E-4FE8-BB98-D20C69E77FD5

Device          Start        End    Sectors   Size Type
/dev/sda1          34 1126199937 1126199904   537G Microsoft basic data
/dev/sda2  1126201344 1126203391       2048     1M BIOS boot
/dev/sda3  1126203392 1936838655  810635264 386.6G Linux filesystem
/dev/sda4  1936838656 1953523711   16685056     8G Linux swap

Partition 1 does not start on physical sector boundary.


Disk /dev/sdc: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x2c506c3f

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdc1        2048 3907028991 3907026944  1.8T fd Linux raid autodetect


Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x5c276006

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907028991 3907026944  1.8T fd Linux raid autodetect


Disk /dev/sdd: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x85a02131

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdd1        2048 3907028991 3907026944  1.8T fd Linux raid autodetect


Disk /dev/md0: 3.65 TiB, 4000525058048 bytes, 7813525504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes


Disk /dev/sde: 1.84 TiB, 2000398931968 bytes, 3907029164 sectors
Disk model: External USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xae167031

Device     Boot Start        End    Sectors  Size Id Type
/dev/sde1  *     2048 3907026943 3907024896  1.8T  7 HPFS/NTFS/exFAT


Disk /dev/loop8: 61.93 MiB, 64913408 bytes, 126784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 140.68 MiB, 147492864 bytes, 288072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 140.7 MiB, 147517440 bytes, 288120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 162.89 MiB, 170778624 bytes, 333552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 219 MiB, 229638144 bytes, 448512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 219 MiB, 229638144 bytes, 448512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 164.78 MiB, 172761088 bytes, 337424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 243.94 MiB, 255762432 bytes, 499536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop16: 247.93 MiB, 259948544 bytes, 507712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop17: 65.22 MiB, 68378624 bytes, 133552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop18: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop19: 2.55 MiB, 2658304 bytes, 5192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop20: 2.51 MiB, 2621440 bytes, 5120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

lsusb

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 045e:07b2 Microsoft Corp. 2.4GHz Transceiver v8.0 used by mouse Wireless Desktop 900
Bus 004 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 002: ID 0480:0820 Toshiba America Inc Canvio Advance Disk
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

No option for SMART data from Disks for the external drive.

heynnema avatar
ru flag
Edit your question and show me `grep -i FPDMA /var/log/syslog*` and `sudo fdisk -l` and `lsusb`, and a screenshot of the `Disks` app SMART Data & Tests window. Enlarge this window to capture all of the data. Does the 3TB disk have its own external power supply? Start comments to me with @heynnema or I'll miss them.
es flag
@heynnema No, no external power supply for the Toshiba drive. Also, correction, it's 2TB.
es flag
One other update. I found that my BIOS was really old. I have updated it to the latest and am trying again with that. IOMMU is off in BIOS. If the current try fails again, I'll try turning it on.
heynnema avatar
ru flag
I assume that we're talking about the sde drive, yes? Didn't the drive come with an external power adapter? Do you have access to a POWERED USB hub? Do you have Windows installed? If so, have you run `chkdsk` on the partition?
es flag
@heynnema No, the drive only has a USB 3.0 connector on it, and that's the only way it gets power. You can see similar drives (no power adapter) on Amazon. I have a Windows system, but the problem is the controller dying, not anything with the drive or the data on it. When restarting the rsync, it picks up where it left off and makes further progress.
es flag
Hope I don't jinx it, but the BIOS update seems to have solved this. Previously, 2600 or so files was the furthest it got. One time it failed after only 400. Right now it's up to 4700, and many of those were pretty large files.
Hannu avatar
ca flag
BIOS somehow believed the drive to not be in use and turned off power, as it seems.
heynnema avatar
ru flag
@SQLGuy It wasn't clear from your comment... did it fail again with the new BIOS? If so, buy/borrow a POWERED USB 3.x hub and see if that doesn't fix this problem.
heynnema avatar
ru flag
@SQLGuy If we're talking about sde, then edit your question again and show me `grep -i sde /var/log/syslog*`. Change sde to the correct disk, if required. If the output is lengthy, drop it into https://paste.ubuntu.com.
heynnema avatar
ru flag
@SQLGuy Please don't put "Solved" in the title of your question... even if you think it is.
es flag
@heynnema It most certainly was solved by updating the BIOS, as I indicated in the details of the question. But, OK.
heynnema avatar
ru flag
@SQLGuy OK. I'm glad it's solved for you. Go ahead and create an answer with the details, and mark your answer as the accepted solution :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.