The officially official Devuan Forum!

You are not logged in.

#1 2018-04-13 00:07:02

Registered: 2017-03-16
Posts: 463  

ejected usb device immediately remounts itself

I have an ExpressCard in my T400 laptop that provides two USB3 ports. I've noticed that when running a wide range of kernels (3.18.x-4.3.x), whenever I right-click on a USB3 device's desktop icon and choose to "Safely Remove" it, the device is unmounted and powered down as expected...but almost immediately it powers back up and is mounted again. Therefore, I have to shut down the laptop in order to feel comfortable unplugging the device.

The expected behavior, of course, is for "Eject" or "Safely Remove" to unmount the device and power it off, and for it to remain unmounted and powered off until I unplug the device and plug it back in.

This strange behavior does not occur with the native (USB2) ports on my laptop--it only affects the USB3 ports on the ExpressCard. The card uses the xhci_hcd kernel module.

I could simply avoid the kernels in the problem range, of course, but other kernels (both older and newer) cause more subtle issues (primarily graphics-related) that are more difficult to describe/search for.

Please, do you know a workaround/hack/configuration setting that will prevent USB devices plugged in to my ExpressCard from immediately remounting themselves after I eject them? If not, any idea how to go about troubleshooting this?

I scoured the internet for any information on this issue, and this unsolved thread is all I could find: … ust-remoun

System details:
- Devuan ASCII, fully up to date
- MATE 1.16.2
- udisks2 2.1.8-1+devuan2
- lightdm 1.18.3-1

Last edited by GNUser (2018-04-13 13:51:46)


#2 2018-04-13 12:46:30

Registered: 2017-03-16
Posts: 463  

Re: ejected usb device immediately remounts itself

Here is an example of the problem, with kernel image 4.0.8-2 amd64 (from Debian snapshots). The relevant output from dmesg, from the time I give the "Safely Remove Drive" command is below. The output shows the device disconnecting then about 0.4 seconds later it is detected as a new device (see lines I marked with asterisks):

[   59.310643] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
[   59.428081] sd 4:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
***** [   59.464441] usb 2-2: USB disconnect, device number 2
***** [   59.841273] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
[   59.863925] usb 2-2: New USB device found, idVendor=0bc2, idProduct=2322
[   59.863937] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[   59.863944] usb 2-2: Product: Expansion
[   59.863950] usb 2-2: Manufacturer: Seagate
[   59.863956] usb 2-2: SerialNumber: NA8DFHL6
[   59.871807] scsi host5: uas
[   59.874809] scsi 5:0:0:0: Direct-Access     Seagate  Expansion        9300 PQ: 0 ANSI: 6
[   59.876620] sd 5:0:0:0: Attached scsi generic sg2 type 0
[   59.876695] sd 5:0:0:0: [sdb] 1953525167 512-byte logical blocks: (1.00 TB/931 GiB)
[   59.876698] sd 5:0:0:0: [sdb] 4096-byte physical blocks
[   59.877103] sd 5:0:0:0: [sdb] Write Protect is off
[   59.877107] sd 5:0:0:0: [sdb] Mode Sense: 4f 00 00 00
[   59.877297] sd 5:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   59.877677] xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or incorrect stream ring
[   59.877681] xhci_hcd 0000:04:00.0: @000000026312df00 00000000 00000000 1b000000 01038000
[   60.646377]  sdb: sdb1
[   60.647569] sd 5:0:0:0: [sdb] Attached SCSI disk
[   61.378077] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)

Any idea why the disconnected device is then immediately being detected as a new device?

P.S. I have no idea what to do with this information, but I've noticed a pattern:
- In the old kernels that don't have this issue (e.g., 3.16.x), only xhci_hcd kernel module exists
- In the kernels that have the issue (3.18-4.3), which I would like to use once I can fix this, both xhci_hcd and xhci_pci kernel modules exist
- In newer kernels that don't have this issue (but give me graphics artifacts) (4.4+) neither kernel module exists

Last edited by GNUser (2018-04-13 13:53:06)


#3 2018-04-13 15:33:30

Registered: 2017-03-16
Posts: 463  

Re: ejected usb device immediately remounts itself

I am giving up on this for now. I'm sticking with a newer kernel that doesn't have this issue. Using "nomodeset" boot option with the newer kernels has (so far) eliminated the graphics artifacts I was trying to avoid.

Last edited by GNUser (2018-04-13 15:33:56)


Board footer