You are not logged in.
When using either an extender cable, a hub a cardreader or even just the front panel USB ports (which is an extender I guess) I get errors when disconnecting any thumbdrive or sdcard. That doesn't happen when working on the USB ports directly on the motherboard on the rear IO panel. I thought it was a problem with my drives, but I tried a dozen of them and it's very consistent.
I must say, apart from the error, the drives seem to be working without problems. Any suggestion?
Errors as follow:
journalctl
kernel: blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
kernel: Buffer I/O error on dev sdc, logical block 0, async page read
kernel: blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
kernel: Buffer I/O error on dev sdc, logical block 0, async page read
kernel: blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
kernel: Buffer I/O error on dev sdc, logical block 0, async page read
kernel: blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
kernel: Buffer I/O error on dev sdc, logical block 0, async page read
kernel: blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
kernel: Buffer I/O error on dev sdc, logical block 0, async page read
dmesg
[ 1421.859001] scsi 1:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 6
[ 1421.871582] sd 1:0:0:0: [sdc] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[ 1421.874574] sd 1:0:0:0: [sdc] Write Protect is off
[ 1421.874576] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 1421.876579] sd 1:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1421.937340] sdc: sdc1
[ 1421.950629] sd 1:0:0:0: [sdc] Attached SCSI removable disk
[ 1673.380230] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 1673.380233] sd 1:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current]
[ 1673.380234] sd 1:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 1673.380235] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1673.380237] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1673.380240] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1673.607242] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 1673.607246] sd 1:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current]
[ 1673.607248] sd 1:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 1673.607250] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1673.607252] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1673.607256] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1673.607290] ldm_validate_partition_table(): Disk read failed.
[ 1673.847236] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 1673.847240] sd 1:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current]
[ 1673.847242] sd 1:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 1673.847245] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1673.847247] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1673.847252] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1674.087266] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 1674.087270] sd 1:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current]
[ 1674.087272] sd 1:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 1674.087274] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1674.087277] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1674.087281] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1674.354233] sd 1:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 1674.354238] sd 1:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current]
[ 1674.354240] sd 1:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 1674.354242] sd 1:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1674.354244] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1674.354249] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1674.354283] sdc: unable to read partition table
[ 1701.128510] usb 1-3: USB disconnect, device number 5
PS1: I tried with ferrite rings.
PS2: Fixing the drives with fsck doesn't report errors
Last edited by Matt3o (2021-03-22 16:17:37)
Offline
It turned out that if I do "unpower device" instead of "eject" I get no error, but this still doesn't explain why it works with the back panel IO USB...
Offline
What is "eject"? /usr/bin/eject? (which operates tray of optical drives…)
Is this related to some filemanger?
You're supposed to sync+umount the device, the hub might be mistaken for a removable device (ie. eject passes w/o "-F" because it doesn't know what's behind)
Offline
What is "eject"? /usr/bin/eject? (which operates tray of optical drives…)
from man page:
eject allows removable media (typically a CD-ROM, floppy disk, tape, JAZ, ZIP or USB disk) to be ejected under software control.
I have had no issues with ejecting USB drives... but mine is never connected to a hub. OTOH, I had mixed results with extender cables, so I try and avoid those cables.
Offline
What is "eject"? /usr/bin/eject? (which operates tray of optical drives…)
Is this related to some filemanger?
PCManFM and udiskie mostly.
Offline
Do you get the same errors when running "eject -F /dev/sdb1" on the "good" port?
Offline
Do you get the same errors when running "eject -F /dev/sdb1" on the "good" port?
nope, all good
udisksd[759]: Mounted /dev/sda at /run/media/matteo/7206-45B1 on behalf of uid 1000
udisksd[759]: Cleaning up mount point /run/media/matteo/7206-45B1 (device 8:0 is not mounted)
udisksd[759]: Unmounted /dev/sda on behalf of uid 1000
Offline
Looked at pcmanfm sources, it uses udisks, so let's compare
qdbus --system org.freedesktop.UDisks /org/freedesktop/UDisks/devices/sda org.freedesktop.UDisks.Device.DriveIsMediaEjectable
on a good and a bad port.
Offline
Thanks for your continued support seth.
I'm not able to execute the command you posted. I can do this
qdbus --system org.freedesktop.UDisks2 /org/freedesktop/UDisks2/block_devices/sda
and options from there are:
org.freedesktop.UDisks2.Block.Configuration -- read {D-Bus type "a(sa{sv})"}
org.freedesktop.UDisks2.Block.CryptoBackingDevice -- read QDBusObjectPath
org.freedesktop.UDisks2.Block.DeviceNumber -- read qulonglong
org.freedesktop.UDisks2.Block.Device -- read QByteArray
org.freedesktop.UDisks2.Block.Drive -- read QDBusObjectPath
org.freedesktop.UDisks2.Block.HintAuto -- read bool
org.freedesktop.UDisks2.Block.HintIconName -- read QString
org.freedesktop.UDisks2.Block.HintIgnore -- read bool
org.freedesktop.UDisks2.Block.HintName -- read QString
org.freedesktop.UDisks2.Block.HintPartitionable -- read bool
org.freedesktop.UDisks2.Block.HintSymbolicIconName -- read QString
org.freedesktop.UDisks2.Block.HintSystem -- read bool
org.freedesktop.UDisks2.Block.IdLabel -- read QString
org.freedesktop.UDisks2.Block.Id -- read QString
org.freedesktop.UDisks2.Block.IdType -- read QString
org.freedesktop.UDisks2.Block.IdUsage -- read QString
org.freedesktop.UDisks2.Block.IdUUID -- read QString
org.freedesktop.UDisks2.Block.IdVersion -- read QString
org.freedesktop.UDisks2.Block.MDRaidMember -- read QDBusObjectPath
org.freedesktop.UDisks2.Block.MDRaid -- read QDBusObjectPath
org.freedesktop.UDisks2.Block.PreferredDevice -- read QByteArray
org.freedesktop.UDisks2.Block.ReadOnly -- read bool
org.freedesktop.UDisks2.Block.Size -- read qulonglong
org.freedesktop.UDisks2.Block.Symlinks -- read {D-Bus type "aay"}
org.freedesktop.UDisks2.Block.UserspaceMountOptions -- read QStringList
org.freedesktop.UDisks2.Filesystem.MountPoints -- read {D-Bus type "aay"}
org.freedesktop.UDisks2.Filesystem.Size -- read qulonglong
org.freedesktop.UDisks2.Block.Format -- void(QString type, QVariantMap options)
org.freedesktop.UDisks2.Block.GetSecretConfiguration -- {D-Bus type "a(sa{sv})"}(QVariantMap options)
org.freedesktop.UDisks2.Block.OpenDevice -- QDBusUnixFileDescriptor(QString mode, QVariantMap options)
org.freedesktop.UDisks2.Block.OpenForBackup -- QDBusUnixFileDescriptor(QVariantMap options)
org.freedesktop.UDisks2.Block.OpenForBenchmark -- QDBusUnixFileDescriptor(QVariantMap options)
org.freedesktop.UDisks2.Block.OpenForRestore -- QDBusUnixFileDescriptor(QVariantMap options)
org.freedesktop.UDisks2.Block.Rescan -- void(QVariantMap options)
org.freedesktop.UDisks2.Filesystem.Check -- bool(QVariantMap options)
org.freedesktop.UDisks2.Filesystem.Mount -- QString(QVariantMap options)
org.freedesktop.UDisks2.Filesystem.Repair -- bool(QVariantMap options)
org.freedesktop.UDisks2.Filesystem.Resize -- void(qulonglong size, QVariantMap options)
org.freedesktop.UDisks2.Filesystem.SetLabel -- void(QString label, QVariantMap options)
org.freedesktop.UDisks2.Filesystem.TakeOwnership -- void(QVariantMap options)
org.freedesktop.UDisks2.Filesystem.Unmount -- void(QVariantMap options)
I looked around I can't find anything about "ejectable"
UPDATE.
So I found this instead
qdbus --system org.freedesktop.UDisks2 /org/freedesktop/UDisks2/drives/***DRIVENAME*** org.freedesktop.UDisks2.Drive.Ejectable
which gives me true from all USB ports
Last edited by Matt3o (2021-02-12 08:30:41)
Offline
Meh.
lsblk -Ppno NAME,LABEL,MOUNTPOINT,FSTYPE,SIZE,TYPE,RM,MODEL,UUID
Edit: for good and bad port.
Last edited by seth (2021-02-12 08:23:52)
Offline
it seems to be this for all of them
NAME="/dev/sdb" LABEL="" MOUNTPOINT="/run/media/matteo/7206-45B1" FSTYPE="vfat" SIZE="7.5G" TYPE="disk" RM="1" MODEL="Trans-It_Drive" UUID="7206-45B1"
okay looking at that message I had an idea.. I use these drives and cards mostly for 3d printers so they have to be FAT... could that be the problem. I installed all I think that is necessary to handle those drives (dosfstools, exfat-utils, ...). I'll make some tests with other partitions
Offline
could that be the problem.
No.
And nothing there looks like the drive would be "ejectable".
qdbus --system org.freedesktop.UDisks2 /org/freedesktop/UDisks2/drives/<yourdrivehere> org.freedesktop.UDisks2.Drive.Ejectable
Offline
% qdbus --system org.freedesktop.UDisks2 /org/freedesktop/UDisks2/drives/TDKMedia_Trans_It_Drive_07990A03DA891CAE org.freedesktop.UDisks2.Drive.Ejectable
true
% lsblk -Ppno NAME,LABEL,MOUNTPOINT,FSTYPE,SIZE,TYPE,RM,MODEL,UUID /dev/sda
NAME="/dev/sda" LABEL="" MOUNTPOINT="/run/media/matteo/7206-45B1" FSTYPE="vfat" SIZE="7.5G" TYPE="disk" RM="1" MODEL="Trans-It_Drive" UUID="7206-45B1"
Last edited by Matt3o (2021-02-12 09:18:27)
Offline
Same issue when disconnecting an sd card in gnome, kernel 5.11.2:
[ 4650.495265] sdb: sdb1
[ 4650.500295] sd 1:0:0:1: [sdb] Attached SCSI removable disk
[ 4886.836046] sd 1:0:0:1: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 4886.836051] sd 1:0:0:1: [sdb] tag#0 Sense Key : Not Ready [current]
[ 4886.836055] sd 1:0:0:1: [sdb] tag#0 Add. Sense: Medium not present
[ 4886.836057] sd 1:0:0:1: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 4886.836059] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 4886.836063] Buffer I/O error on dev sdb, logical block 0, async page read
[ 4886.836998] sd 1:0:0:1: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 4886.837004] sd 1:0:0:1: [sdb] tag#0 Sense Key : Not Ready [current]
[ 4886.837008] sd 1:0:0:1: [sdb] tag#0 Add. Sense: Medium not present
[ 4886.837012] sd 1:0:0:1: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 4886.837015] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 4886.837020] Buffer I/O error on dev sdb, logical block 0, async page read
[ 4886.837031] ldm_validate_partition_table(): Disk read failed.
[ 4886.837919] sd 1:0:0:1: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 4886.837924] sd 1:0:0:1: [sdb] tag#0 Sense Key : Not Ready [current]
[ 4886.837927] sd 1:0:0:1: [sdb] tag#0 Add. Sense: Medium not present
[ 4886.837930] sd 1:0:0:1: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 4886.837932] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 4886.837936] Buffer I/O error on dev sdb, logical block 0, async page read
[ 4886.838963] sd 1:0:0:1: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 4886.838966] sd 1:0:0:1: [sdb] tag#0 Sense Key : Not Ready [current]
[ 4886.838969] sd 1:0:0:1: [sdb] tag#0 Add. Sense: Medium not present
[ 4886.838972] sd 1:0:0:1: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 4886.838973] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 4886.838976] Buffer I/O error on dev sdb, logical block 0, async page read
[ 4886.839857] sd 1:0:0:1: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[ 4886.839860] sd 1:0:0:1: [sdb] tag#0 Sense Key : Not Ready [current]
[ 4886.839863] sd 1:0:0:1: [sdb] tag#0 Add. Sense: Medium not present
[ 4886.839865] sd 1:0:0:1: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 4886.839867] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 4886.839870] Buffer I/O error on dev sdb, logical block 0, async page read
[ 4886.839901] sdb: unable to read partition table
[ 4886.841969] sdb: detected capacity change from 0 to 62521344
Offline
unfortunately I can't seem to be able to fix this issue.
The best thing I can do is unmount the volume first and the eject it (or use eject from command line). I think the problem here is udisk... I'll try to contact them and report if anything comes out.
Offline
I made some tests. LXDE (pcmanfm without udiskie and pcmanfm with udiskie)
The problem there is even without being installed the udiskie package.
But in an other system with XFCE and thunar (not with pcmanfm), there is not the problem.
So i believe it is a pcmanfm's bug and you can to ignore it.
I used a SanDisk Cruzer Blade USB stick 32GB in NTFS
Last edited by giannis-arch (2021-03-15 14:59:59)
Offline
But in an other system with XFCE and thunar (not with pcmanfm)
if I use udisksctl from command line I get the same issue, so I tend to believe the problem is still udisk. Maybe thunar does something different (like it uses eject instead of udisk)
Offline
https://archlinux.org/packages/community/any/udiskie/ is not "udisks" but an automount service, it is unrelated to anything here.
The thing that actually handles the mounts is gvfs
udisks2 considers regular usb keys "ejectable", so that's not the problem either.
[ 1673.607290] ldm_validate_partition_table(): Disk read failed.
It looks like the device is probed immediately after being "ejected" and the drive isn't quite ready to respond (ie. a race condition) - I guess gvfs should™ not partprobe "ejected" drives but do so when the (re-)appear?
Offline
Okay, this is the darn weirdest thing...
I changed monitor (the previous one was also an USB hub) and now all ports work as normal. I can use extensions, hubs, card readers with no issue whatsoever.
The new monitor is also an USB hub but it doesn't cause any issue. I would have never imagined....
Offline