Score:0

External USB disk I/O error after sleep/wake

my flag

I have a 1TB Toshiba USB HDD connected to the USB 3.0 port in my laptop (Asus X550C). I am using Ubuntu 18.04 (kernel 4.15.0-166-generic).

I used to sleep/wake up the computer with the USB drive attached and everything resumed normally. However, since one Ubuntu update (I cannot tell which one) I get I/O errors from the USB disk after waking up:

user@asus:/media/user/HDD$ ls
ls: reading directory '.': Input/output error

All programs that have a file opened from the USB disk crash after resume because they cannot access the disk.

What I have observed by trial and error:

  • New programs can access the disk successfully. However, those programs that went through the sleep/wake up cycle never recover access, even though the disk is working again
  • There is one exception: if I leave a shell opened and pointing to a directory in the disk, I get I/O errors. However, if I type cd . errors go away and HDD works again (only cd ., any other command results in IO error)
  • If I attach the HDD to the USB 2.0 port, it wakes up successfully
  • If I attach a USB flash drive (not HDD), it wakes up successfully

It is like the current directory is somehow lost for programs that go through the sleep/wake up process. Programs opened after wake up work nicely. This only happens for an HDD connected to the USB 3.0 (like some kind of racing condition).

$ sudo fdisk -l
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 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
Disklabel type: dos
Disk identifier: 0x8cc1ecc7

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048    206847    204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2          206848 440526847 440320000   210G  7 HPFS/NTFS/exFAT
/dev/sda3       440526848 937701375 497174528 237.1G 83 Linux


Disk /dev/sdc: 931.5 GiB, 1000204883968 bytes, 1953525164 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
Disklabel type: dos
Disk identifier: 0x9b0f78c0

Device     Boot     Start        End   Sectors   Size Id Type
/dev/sdc1            2048  983042047 983040000 468.8G  7 HPFS/NTFS/exFAT
/dev/sdc2       983042048 1953525163 970483116 462.8G 83 Linux
$ lsusb 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04f2:b40a Chicony Electronics Co., Ltd 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 021: ID 0480:a00c Toshiba America Inc 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 0835:8502 Action Star Enterprise Co., Ltd 
Bus 003 Device 006: ID 0835:8500 Action Star Enterprise Co., Ltd 
Bus 003 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 003 Device 004: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse (M-BT58)
Bus 003 Device 003: ID 0835:8501 Action Star Enterprise Co., Ltd 
Bus 003 Device 002: ID 0835:8500 Action Star Enterprise Co., Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmes output with USB 3.0 (error reproduced):

[   80.707547] wlp2s0: deauthenticating from 54:a0:50:e4:82:30 by local choice (Reason: 3=DEAUTH_LEAVING)
[   83.020979] PM: suspend entry (deep)
[   83.020982] PM: Syncing filesystems ... done.
[   83.034082] Freezing user space processes ... (elapsed 0.002 seconds) done.
[   83.036245] OOM killer disabled.
[   83.036246] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   83.037516] Suspending console(s) (use no_console_suspend to debug)
[   83.056384] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[   83.056445] sd 0:0:0:0: [sda] Stopping disk
[   83.064227] sd 6:0:0:0: [sdb] Synchronizing SCSI cache
[   83.225059] ACPI: EC: interrupt blocked
[   83.244915] ACPI: Preparing to enter system sleep state S3
[   83.252323] ACPI: EC: event blocked
[   83.252325] ACPI: EC: EC stopped
[   83.252326] PM: Saving platform NVS memory
[   83.252516] Disabling non-boot CPUs ...
[   83.268409] IRQ 31: no longer affine to CPU1
[   83.269427] smpboot: CPU 1 is now offline
[   83.294105] smpboot: CPU 2 is now offline
[   83.316526] IRQ 23: no longer affine to CPU3
[   83.316533] IRQ 26: no longer affine to CPU3
[   83.316541] IRQ 29: no longer affine to CPU3
[   83.317557] smpboot: CPU 3 is now offline
[   83.319808] ACPI: Low-level resume complete
[   83.319884] ACPI: EC: EC started
[   83.319885] PM: Restoring platform NVS memory
[   83.321732] Enabling non-boot CPUs ...
[   83.321805] x86: Booting SMP configuration:
[   83.321806] smpboot: Booting Node 0 Processor 1 APIC 0x2
[   83.325400]  cache: parent cpu1 should not be sleeping
[   83.325731] CPU1 is up
[   83.325772] smpboot: Booting Node 0 Processor 2 APIC 0x1
[   83.328403]  cache: parent cpu2 should not be sleeping
[   83.329072] CPU2 is up
[   83.329111] smpboot: Booting Node 0 Processor 3 APIC 0x3
[   83.331670]  cache: parent cpu3 should not be sleeping
[   83.332147] CPU3 is up
[   83.336322] ACPI: Waking up from system sleep state S3
[   83.415767] ACPI: EC: interrupt unblocked
[   83.436652] ACPI: EC: event unblocked
[   83.436704] usb usb3: root hub lost power or was reset
[   83.436709] usb usb4: root hub lost power or was reset
[   83.437112] usb usb1: root hub lost power or was reset
[   83.437889] usb usb2: root hub lost power or was reset
[   83.441029] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[   83.441796] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[   83.444014] sd 0:0:0:0: [sda] Starting disk
[   83.552768] r8169 0000:03:00.2 enp3s0f2: link down
[   83.734197] usb 2-1: reset high-speed USB device number 2 using ehci-pci
[   83.734220] usb 1-1: reset high-speed USB device number 2 using ehci-pci
[   83.768919] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   83.768963] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[   83.770066] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[   83.770934] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[   83.770939] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[   83.771145] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[   83.771152] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[   83.772458] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[   83.772534] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[   83.772539] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[   83.772644] ata1.00: configured for UDMA/133
[   83.776606] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[   83.776612] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[   83.778387] ata3.00: configured for UDMA/133
[   84.205989] usb 1-1.3: reset high-speed USB device number 3 using ehci-pci
[   86.415072] OOM killer enabled.
[   86.415075] Restarting tasks ... 
[   86.415368] usb 4-1: USB disconnect, device number 2
[   86.422799] done.
[   86.425772] print_req_error: I/O error, dev sdb, sector 0
[   86.437800] sd 6:0:0:0: [sdb] Synchronizing SCSI cache
[   86.437843] sd 6:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[   86.493540] blk_partition_remap: fail for partition 2
[   86.493568] Buffer I/O error on dev sdb2, logical block 60325888, lost sync page write
[   86.493581] JBD2: Error -5 detected when updating journal superblock for sdb2-8.
[   86.493583] Aborting journal on device sdb2-8.
[   86.493587] blk_partition_remap: fail for partition 2
[   86.493588] Buffer I/O error on dev sdb2, logical block 60325888, lost sync page write
[   86.493590] JBD2: Error -5 detected when updating journal superblock for sdb2-8.
[   86.638576] PM: suspend exit
[   86.746072] IPv6: ADDRCONF(NETDEV_UP): enp3s0f2: link is not ready
[   86.843335] r8169 0000:03:00.2 enp3s0f2: link down
[   86.843517] IPv6: ADDRCONF(NETDEV_UP): enp3s0f2: link is not ready
[   86.846125] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   86.996625] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   87.053851] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[   87.320988] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[   87.344753] usb 4-1: New USB device found, idVendor=0480, idProduct=a00c
[   87.344757] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   87.344759] usb 4-1: Product: External USB 3.0
[   87.344760] usb 4-1: Manufacturer: TOSHIBA
[   87.344762] usb 4-1: SerialNumber: 20140114057420
[   87.345967] usb-storage 4-1:1.0: USB Mass Storage device detected
[   87.347590] usb-storage 4-1:1.0: Quirks match for vid 0480 pid a00c: 800000
[   87.347626] scsi host6: usb-storage 4-1:1.0
[   88.175858] wlp2s0: authenticate with 54:a0:50:e4:82:30
[   88.185166] wlp2s0: send auth to 54:a0:50:e4:82:30 (try 1/3)
[   88.186656] wlp2s0: authenticated
[   88.188952] wlp2s0: associate with 54:a0:50:e4:82:30 (try 1/3)
[   88.192934] wlp2s0: RX AssocResp from 54:a0:50:e4:82:30 (capab=0x1411 status=0 aid=5)
[   88.193029] wlp2s0: associated
[   88.214555] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[   88.377019] scsi 6:0:0:0: Direct-Access     TOSHIBA  External USB 3.0 5438 PQ: 0 ANSI: 6
[   88.381543] sd 6:0:0:0: Attached scsi generic sg2 type 0
[   88.382630] sd 6:0:0:0: [sdb] 1953525164 512-byte logical blocks: (1.00 TB/932 GiB)
[   88.382979] sd 6:0:0:0: [sdb] Write Protect is off
[   88.382982] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
[   88.383327] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   90.948674]  sdb: sdb1 sdb2
[   90.960736] sd 6:0:0:0: [sdb] Attached SCSI disk
[   92.224427] EXT4-fs (sdb2): recovery complete
[   92.284931] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)

dmes output with USB 2.0 (no errors):

[  101.037552] wlp2s0: deauthenticating from 54:a0:50:e4:82:30 by local choice (Reason: 3=DEAUTH_LEAVING)
[  103.385167] PM: suspend entry (deep)
[  103.385170] PM: Syncing filesystems ... done.
[  103.397551] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  103.399954] OOM killer disabled.
[  103.399955] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  103.401220] Suspending console(s) (use no_console_suspend to debug)
[  103.433979] sd 6:0:0:0: [sdb] Synchronizing SCSI cache
[  103.433981] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  103.434395] sd 0:0:0:0: [sda] Stopping disk
[  103.603845] ACPI: EC: interrupt blocked
[  103.623791] ACPI: Preparing to enter system sleep state S3
[  103.755715] ACPI: EC: event blocked
[  103.755717] ACPI: EC: EC stopped
[  103.755718] PM: Saving platform NVS memory
[  103.755866] Disabling non-boot CPUs ...
[  103.771717] IRQ 31: no longer affine to CPU1
[  103.772734] smpboot: CPU 1 is now offline
[  103.797121] smpboot: CPU 2 is now offline
[  103.819706] IRQ 23: no longer affine to CPU3
[  103.819714] IRQ 26: no longer affine to CPU3
[  103.819719] IRQ 27: no longer affine to CPU3
[  103.820738] smpboot: CPU 3 is now offline
[  103.823007] ACPI: Low-level resume complete
[  103.823087] ACPI: EC: EC started
[  103.823089] PM: Restoring platform NVS memory
[  103.824934] Enabling non-boot CPUs ...
[  103.825037] x86: Booting SMP configuration:
[  103.825038] smpboot: Booting Node 0 Processor 1 APIC 0x2
[  103.828655]  cache: parent cpu1 should not be sleeping
[  103.828991] CPU1 is up
[  103.829030] smpboot: Booting Node 0 Processor 2 APIC 0x1
[  103.831690]  cache: parent cpu2 should not be sleeping
[  103.832340] CPU2 is up
[  103.832389] smpboot: Booting Node 0 Processor 3 APIC 0x3
[  103.834918]  cache: parent cpu3 should not be sleeping
[  103.835416] CPU3 is up
[  103.839605] ACPI: Waking up from system sleep state S3
[  103.902963] ACPI: EC: interrupt unblocked
[  103.923403] ACPI: EC: event unblocked
[  103.923449] usb usb3: root hub lost power or was reset
[  103.923454] usb usb4: root hub lost power or was reset
[  103.925642] usb usb1: root hub lost power or was reset
[  103.927446] usb usb2: root hub lost power or was reset
[  103.929543] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[  103.931347] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[  103.935308] sd 0:0:0:0: [sda] Starting disk
[  104.035971] r8169 0000:03:00.2 enp3s0f2: link down
[  104.225463] usb 1-1: reset high-speed USB device number 2 using ehci-pci
[  104.225473] usb 2-1: reset high-speed USB device number 2 using ehci-pci
[  104.320371] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[  104.320409] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[  104.321734] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[  104.322970] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[  104.322978] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  104.323150] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[  104.323158] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  104.324340] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[  104.324379] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[  104.324383] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  104.324562] ata1.00: configured for UDMA/133
[  104.328629] ata3.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded
[  104.328647] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[  104.330415] ata3.00: configured for UDMA/133
[  104.341631] usb 3-2: reset high-speed USB device number 2 using xhci_hcd
[  104.697412] usb 1-1.3: reset high-speed USB device number 3 using ehci-pci
[  104.837895] OOM killer enabled.
[  104.837899] Restarting tasks ... done.
[  105.098906] PM: suspend exit
[  105.182497] IPv6: ADDRCONF(NETDEV_UP): enp3s0f2: link is not ready
[  105.283583] r8169 0000:03:00.2 enp3s0f2: link down
[  105.283671] IPv6: ADDRCONF(NETDEV_UP): enp3s0f2: link is not ready
[  105.285124] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  105.433822] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  105.482910] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[  106.622874] wlp2s0: authenticate with 54:a0:50:e4:82:30
[  106.627239] wlp2s0: send auth to 54:a0:50:e4:82:30 (try 1/3)
[  106.630373] wlp2s0: authenticated
[  106.633249] wlp2s0: associate with 54:a0:50:e4:82:30 (try 1/3)
[  106.649449] wlp2s0: RX AssocResp from 54:a0:50:e4:82:30 (capab=0x1411 status=0 aid=5)
[  106.649543] wlp2s0: associated
[  106.671964] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready

As you can see, the only difference between the two logs is that in the USB 3.0 the HDD gets disconnected from the USB bus:

...
[   86.415368] usb 4-1: USB disconnect, device number 2
...

So when the OS tries to access files from the HDD, the HDD is not ready and the error happens.

Any idea what might be causing this disconnection only under USB 3.0?

Thank you very much in advance.

Antonio Petricca avatar
ug flag
Same issue for me on a Dell E5495 with external WD SSD equipped with Ubuntu 22.04. Any solution?
in flag
Sounds like a power-related issue. The drive would “disappear” when sleep disconnects power to the USB ports, and external devices — particularly spinning disks — need time to spin up before being visible to the host OS. As a result, open files will appear to “point to nowhere”, making applications unprepared for such a situation unstable
heynnema avatar
ru flag
Does the external disk have its own AC power supply? Edit your question and show me `grep -i FPDMA /var/log/syslog*`. Start comments to me with @heynnema or I'll miss them.
heynnema avatar
ru flag
Edit your question and show me a screenshot of the `Disks` app SMART Data & Tests window. Enlarge the window to capture all of the data. Start comments to me with @heynnema or I'll miss them.
heynnema avatar
ru flag
I just noticed that you're getting errors on both sdc2 and sdb1. Please describe your disk configuration, both internal and external. Edit your question and show me `sudo fdisk -l` and `lsusb`.
my flag
@heynnema Thanks for your support. This is interesting. The device /dev/sdX sometimes changes after sleep/wake-up. I have an internal SSD and an external HDD.
heynnema avatar
ru flag
Status please...
heynnema avatar
ru flag
Status please...
Score:0
ru flag

Sounds like a USB3 UAS problem. Do this...

Bus 004 Device 021: ID 0480:a00c Toshiba America Inc

USB Attached SCSI (UAS) or USB Attached SCSI Protocol (UASP) is a computer protocol used to move data to and from USB storage devices such as hard drives (HDDs), solid-state drives (SSDs), and thumb drives. UAS depends on the USB protocol, and uses the standard SCSI command set. Use of UAS generally provides faster transfers compared to the older USB Mass Storage Bulk-Only Transport (BOT) drivers.

UAS was introduced as part of the USB 3.0 standard, but can also be used with devices complying with the slower USB 2.0 standard, assuming use of compatible hardware, firmware and drivers.

UAS drivers generally provide faster transfers when compared to the older USB Mass Storage Bulk-Only Transport (BOT) protocol drivers. Although UAS was added in the USB 3.0 standard, it can also be used at USB 2.0 speeds, assuming compatible hardware.

When used with an SSD, UAS is considerably faster than BOT for random reads and writes, but still well below the speed of a native SATA 3 interface for certain write tasks.

Source: https://en.wikipedia.org/wiki/USB_Attached_SCSI

# drop this into /etc/modprobe.d/disable_uas.conf
# should look like this:
# -rw-r--r--   1 root root  505 Apr 30 11:36 disable-uas.conf
#
# sources:
# https://unix.stackexchange.com/questions/525290/usb-hdd-not-found
# https://unix.stackexchange.com/questions/239782/connection-problem-with-usb3-external-storage-on-linux-uas-driver-problem
#
# examples for single/multiple disks:
# options usb-storage quirks=059f:105e:u 
# options usb-storage quirks=059f:105f:u,059f:105e:u,174c:1351:u
#
# commands to complete this install:
# sudo update-initramfs -u
# reboot
#
# Toshiba drive
options usb-storage quirks=0480:a00c:u

Update #1:

  • In Windows, run chkdsk D: /f and chkdsk D: /r changing the D: to the correct drive letter for the NTFS partition.

  • In Ubuntu, bad block the EXT4 partition...

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.
my flag
Disabling UAS did not solve the issue (I had to blacklist the UAS module in addition to apply the quirk to usb-storage). I am starting to think some kind of racing condition in the kernel sleep/wake-up procedure, since the kernel is trying to access the filesystem after the disk has been put to sleep (or before it has been fully woken-up). What do you reckon? Is it possible to set/modify the sleep sequence?
heynnema avatar
ru flag
@jcdevel83 Show me `grep -v "#" /etc/modprobe.d/disable_uas.conf`. Did you `sudo update-initramfs -u` and `reboot`?
heynnema avatar
ru flag
@jcdevel83 Remove the UAS kernel module blacklist and reboot.
heynnema avatar
ru flag
@jcdevel83 Show me `ls -al /etc/modprobe.d/disable_uas.conf`.
my flag
File `/etc/modprobe.d/disable_uas.conf` content is as you suggested: `options usb-storage quirks=0480:a00c:u`. Also I added `blacklist uas` to fully disable UAS. Neither option worked, although I did notice that the UAS module was no longer loaded when blacklisted (neither dmesg nor lsmod showed the module). I did `update-initramfs -u` and `reboot` multiple times. Permission flags for `disable_uas.conf` is 0644 (`-rw-r--r-- 1 root root`).
heynnema avatar
ru flag
@jcdevel83 That all looks good. I guess UAS isn't the problem. You never showed me the `grep -i FPDMA /var/log/syslog*` and the SMART Data that I requested back on Jan 9. Check your BIOS for a setting for USB power.
my flag
`grep -i FPDMA /var/log/syslog*` returns no hits. SMART Data & Self-Tests option is disabled for the external USB disk (but available for the internal SDD). Drive Settings option is also disabled in the Disk tool.
heynnema avatar
ru flag
@jcdevel83 Since this is a NTFS disk, please boot into Windows and do `chkdsk d: /f` and `chkdsk d: /r`, change the d: to the appropriate drive letter. This problem sure sounds like a USB3 problem, or a power problem... but let's eliminate the chkdsk commands to getting/fixing any other problems.
my flag
Thanks for your suggestions. The disk is dual partitioned (NTFS + EXT4). Disk checks show no errors in neither partition. As I mentioned, sleep/wake-up works perfectly when disk is attached to the USB 2.0 port, as it used to work in USB 3.0 before I applied one of the Ubuntu updates. I downgraded the kernel to the last working version (4.15.0-88), but did not help. This makes me think the issue must have been introduced by another Ubuntu package (power manager, configuration file or something like that).
heynnema avatar
ru flag
@jcdevel83 Please see Update #1 in my answer.
my flag
Disk checks are all correct. I have updated the dmesg output for both USB 2.0 and 3.0. The difference is that under USB 3.0, the HDD gets disconnected fro the bus, causing the IO errors right afterwards. It seems a power issue, although it is weird, because it worked fine for years.
heynnema avatar
ru flag
@jcdevel83 Gosh it sure sounds like a UAS problem. Did you do BOTH chkdsk commands on the NTFS partition, and bad block the EXT4 partition? Did we check your BIOS version? Do `sudo dmidecode -s bios-version` and tell me the EXACT model # of your computer or motherboard.
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.